cortex-react-components 2.19.2 → 2.19.4
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-2HZGIJKZ.mjs +4 -0
- package/dist/{chunk-UECG3SCG.mjs → chunk-5PJLI46T.mjs} +1 -1
- package/dist/{chunk-BHH5Q4FN.mjs → chunk-6KBZDPTR.mjs} +1 -1
- package/dist/{chunk-V6GK2FJG.mjs → chunk-CQAMS7RZ.mjs} +1 -1
- package/dist/chunk-DKGSNR4I.mjs +4 -0
- package/dist/{chunk-RRME4EHD.mjs → chunk-DPZHVBGG.mjs} +1 -1
- package/dist/{chunk-CRSGNLV4.mjs → chunk-FCZZXVGM.mjs} +1 -1
- package/dist/chunk-GAU24H4A.mjs +1 -0
- package/dist/chunk-HB57GPGK.mjs +4 -0
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
- package/dist/{chunk-5EQXJS23.mjs → chunk-JCWFPKF3.mjs} +1 -1
- package/dist/{chunk-OQCMTGML.mjs → chunk-KVLUT4U2.mjs} +1 -1
- package/dist/{chunk-ITJH72Z2.mjs → chunk-LAQ3QAUW.mjs} +1 -1
- package/dist/{chunk-L5NPH5RX.mjs → chunk-LLP4EFT4.mjs} +1 -1
- package/dist/{chunk-543D6MX5.mjs → chunk-NDRBWR7I.mjs} +1 -1
- package/dist/{chunk-VOOU7RBN.mjs → chunk-NH32U7JS.mjs} +1 -1
- package/dist/{chunk-KZAYLEFB.mjs → chunk-O24GFE6Q.mjs} +1 -1
- package/dist/{chunk-NN4QIXZ2.mjs → chunk-PTJVI53B.mjs} +1 -1
- package/dist/{chunk-HNHUOQGZ.mjs → chunk-QAJBJFRP.mjs} +1 -1
- package/dist/{chunk-D6K6RO5P.mjs → chunk-R5P4ZICA.mjs} +1 -1
- package/dist/{chunk-6R6NYDWN.mjs → chunk-RS4VD3ML.mjs} +1 -1
- package/dist/{chunk-2UNIT7NC.mjs → chunk-UPRS7OYQ.mjs} +1 -1
- package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
- package/dist/{chunk-4NBXE4IK.mjs → chunk-ZXKQDAXG.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/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/Foundary/Views/index.js +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/colleague-card.js +1 -1
- package/dist/components/Foundary/colleague-card.mjs +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/index.js +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +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/Other/index.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/EpicsView.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/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/dc-temp/utils.mjs +1 -1
- package/dist/components/index.js +11 -11
- package/dist/components/index.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +21 -21
- 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/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-275W7H4O.mjs +0 -4
- package/dist/chunk-ATBKMJU6.mjs +0 -4
- package/dist/chunk-NZSQITPU.mjs +0 -4
package/dist/index.js
CHANGED
|
@@ -4,44 +4,44 @@
|
|
|
4
4
|
'use strict'
|
|
5
5
|
'use client';
|
|
6
6
|
|
|
7
|
-
"use strict";var
|
|
8
|
-
aos: MutationObserver
|
|
7
|
+
"use strict";var Jh=Object.create;var rd=Object.defineProperty;var Qh=Object.getOwnPropertyDescriptor;var Zh=Object.getOwnPropertyNames;var ey=Object.getPrototypeOf,ty=Object.prototype.hasOwnProperty;var ay=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oy=(e,t)=>{for(var a in t)rd(e,a,{get:t[a],enumerable:!0})},pg=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Zh(t))!ty.call(e,r)&&r!==a&&rd(e,r,{get:()=>t[r],enumerable:!(o=Qh(t,r))||o.enumerable});return e};var z=(e,t,a)=>(a=e!=null?Jh(ey(e)):{},pg(t||!e||!e.__esModule?rd(a,"default",{value:e,enumerable:!0}):a,e)),ry=e=>pg(rd({},"__esModule",{value:!0}),e);var wg=ay((Xn,vm)=>{"use strict";(function(e,t){typeof Xn=="object"&&typeof vm=="object"?vm.exports=t():typeof define=="function"&&define.amd?define([],t):typeof Xn=="object"?Xn.AOS=t():e.AOS=t()})(Xn,function(){return function(e){function t(o){if(a[o])return a[o].exports;var r=a[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var a={};return t.m=e,t.c=a,t.p="dist/",t(0)}([function(e,t,a){"use strict";function o(y){return y&&y.__esModule?y:{default:y}}var r=Object.assign||function(y){for(var Y=1;Y<arguments.length;Y++){var D=arguments[Y];for(var H in D)Object.prototype.hasOwnProperty.call(D,H)&&(y[H]=D[H])}return y},i=a(1),n=(o(i),a(6)),s=o(n),l=a(7),c=o(l),d=a(8),m=o(d),u=a(9),f=o(u),b=a(10),g=o(b),v=a(11),N=o(v),R=a(14),h=o(R),C=[],A=!1,w={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},L=function(){var y=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(y&&(A=!0),A)return C=(0,N.default)(C,w),(0,g.default)(C,w.once),C},T=function(){C=(0,h.default)(),L()},M=function(){C.forEach(function(y,Y){y.node.removeAttribute("data-aos"),y.node.removeAttribute("data-aos-easing"),y.node.removeAttribute("data-aos-duration"),y.node.removeAttribute("data-aos-delay")})},S=function(y){return y===!0||y==="mobile"&&f.default.mobile()||y==="phone"&&f.default.phone()||y==="tablet"&&f.default.tablet()||typeof y=="function"&&y()===!0},E=function(y){w=r(w,y),C=(0,h.default)();var Y=document.all&&!window.atob;return S(w.disable)||Y?M():(w.disableMutationObserver||m.default.isSupported()||(console.info(`
|
|
8
|
+
aos: MutationObserver Kg not supported kg this browser,
|
|
9
9
|
code mutations observing has been disabled.
|
|
10
|
-
You may have
|
|
11
|
-
`),w.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",w.easing),document.querySelector("body").setAttribute("data-aos-duration",w.duration),document.querySelector("body").setAttribute("data-aos-delay",w.delay),w.startEvent==="DOMContentLoaded"&&["complete","interactive"].indexOf(document.readyState)>-1?L(!0):w.startEvent==="load"?window.addEventListener(w.startEvent,function(){L(!0)}):document.addEventListener(w.startEvent,function(){L(!0)}),window.addEventListener("resize",(0,c.default)(L,w.debounceDelay,!0)),window.addEventListener("orientationchange",(0,c.default)(L,w.debounceDelay,!0)),window.addEventListener("scroll",(0,s.default)(function(){(0,g.default)(C,w.once)},w.throttleDelay)),w.disableMutationObserver||m.default.ready("[data-aos]",T),C)};e.exports={init:E,refresh:L,refreshHard:T}},function(e,t){},,,,,function(e,t){(function(a){"use strict";function o(S,E,y){function Y(at){var Qt=_,Qa=ie;return _=ie=void 0,ft=at,he=S.apply(Qa,Qt)}function D(at){return ft=at,Ue=setTimeout(me,E),ua?Y(at):he}function H(at){var Qt=at-V,Qa=at-ft,br=E-Qt;return ra?T(br,_t-Qa):br}function G(at){var Qt=at-V,Qa=at-ft;return V===void 0||Qt>=E||Qt<0||ra&&Qa>=_t}function me(){var at=M();return G(at)?Xe(at):void(Ue=setTimeout(me,H(at)))}function Xe(at){return Ue=void 0,lt&&_?Y(at):(_=ie=void 0,he)}function gt(){Ue!==void 0&&clearTimeout(Ue),ft=0,_=V=ie=Ue=void 0}function q(){return Ue===void 0?he:Xe(M())}function F(){var at=M(),Qt=G(at);if(_=arguments,ie=this,V=at,Qt){if(Ue===void 0)return D(V);if(ra)return Ue=setTimeout(me,E),Y(V)}return Ue===void 0&&(Ue=setTimeout(me,E)),he}var _,ie,_t,he,Ue,V,ft=0,ua=!1,ra=!1,lt=!0;if(typeof S!="function")throw new TypeError(d);return E=l(E)||0,i(y)&&(ua=!!y.leading,ra="maxWait"in y,_t=ra?L(l(y.maxWait)||0,E):_t,lt="trailing"in y?!!y.trailing:lt),F.cancel=gt,F.flush=q,F}function r(S,E,y){var Y=!0,D=!0;if(typeof S!="function")throw new TypeError(d);return i(y)&&(Y="leading"in y?!!y.leading:Y,D="trailing"in y?!!y.trailing:D),o(S,E,{leading:Y,maxWait:E,trailing:D})}function i(S){var E=typeof S>"u"?"undefined":c(S);return!!S&&(E=="object"||E=="function")}function n(S){return!!S&&(typeof S>"u"?"undefined":c(S))=="object"}function s(S){return(typeof S>"u"?"undefined":c(S))=="symbol"||n(S)&&w.call(S)==u}function l(S){if(typeof S=="number")return S;if(s(S))return m;if(i(S)){var E=typeof S.valueOf=="function"?S.valueOf():S;S=i(E)?E+"":E}if(typeof S!="string")return S===0?S:+S;S=S.replace(f,"");var y=g.test(S);return y||v.test(S)?N(S.slice(2),y?2:8):b.test(S)?m:+S}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},d="Expected a function",m=NaN,u="[object Symbol]",f=/^\s+|\s+$/g,b=/^[-+]0x[0-9a-f]+$/i,g=/^0b[01]+$/i,v=/^0o[0-7]+$/i,N=parseInt,R=(typeof a>"u"?"undefined":c(a))=="object"&&a&&a.Object===Object&&a,h=(typeof self>"u"?"undefined":c(self))=="object"&&self&&self.Object===Object&&self,C=R||h||Function("return this")(),A=Object.prototype,w=A.toString,L=Math.max,T=Math.min,M=function(){return C.Date.now()};e.exports=r}).call(t,function(){return this}())},function(e,t){(function(a){"use strict";function o(M,S,E){function y(lt){var at=F,Qt=_;return F=_=void 0,V=lt,_t=M.apply(Qt,at)}function Y(lt){return V=lt,he=setTimeout(G,S),ft?y(lt):_t}function D(lt){var at=lt-Ue,Qt=lt-V,Qa=S-at;return ua?L(Qa,ie-Qt):Qa}function H(lt){var at=lt-Ue,Qt=lt-V;return Ue===void 0||at>=S||at<0||ua&&Qt>=ie}function G(){var lt=T();return H(lt)?me(lt):void(he=setTimeout(G,D(lt)))}function me(lt){return he=void 0,ra&&F?y(lt):(F=_=void 0,_t)}function Xe(){he!==void 0&&clearTimeout(he),V=0,F=Ue=_=he=void 0}function gt(){return he===void 0?_t:me(T())}function q(){var lt=T(),at=H(lt);if(F=arguments,_=this,Ue=lt,at){if(he===void 0)return Y(Ue);if(ua)return he=setTimeout(G,S),y(Ue)}return he===void 0&&(he=setTimeout(G,S)),_t}var F,_,ie,_t,he,Ue,V=0,ft=!1,ua=!1,ra=!0;if(typeof M!="function")throw new TypeError(c);return S=s(S)||0,r(E)&&(ft=!!E.leading,ua="maxWait"in E,ie=ua?w(s(E.maxWait)||0,S):ie,ra="trailing"in E?!!E.trailing:ra),q.cancel=Xe,q.flush=gt,q}function r(M){var S=typeof M>"u"?"undefined":l(M);return!!M&&(S=="object"||S=="function")}function i(M){return!!M&&(typeof M>"u"?"undefined":l(M))=="object"}function n(M){return(typeof M>"u"?"undefined":l(M))=="symbol"||i(M)&&A.call(M)==m}function s(M){if(typeof M=="number")return M;if(n(M))return d;if(r(M)){var S=typeof M.valueOf=="function"?M.valueOf():M;M=r(S)?S+"":S}if(typeof M!="string")return M===0?M:+M;M=M.replace(u,"");var E=b.test(M);return E||g.test(M)?v(M.slice(2),E?2:8):f.test(M)?d:+M}var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},c="Expected a function",d=NaN,m="[object Symbol]",u=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,g=/^0o[0-7]+$/i,v=parseInt,N=(typeof a>"u"?"undefined":l(a))=="object"&&a&&a.Object===Object&&a,R=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,h=N||R||Function("return this")(),C=Object.prototype,A=C.toString,w=Math.max,L=Math.min,T=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){"use strict";function a(l){var c=void 0,d=void 0,m=void 0;for(c=0;c<l.length;c+=1)if(d=l[c],d.dataset&&d.dataset.aos||(m=d.children&&a(d.children)))return!0;return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function r(){return!!o()}function i(l,c){var d=window.document,m=o(),u=new m(n);s=c,u.observe(d.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function n(l){l&&l.forEach(function(c){var d=Array.prototype.slice.call(c.addedNodes),m=Array.prototype.slice.call(c.removedNodes),u=d.concat(m);if(a(u))return s()})}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){};t.default={isSupported:r,ready:i}},function(e,t){"use strict";function a(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class $g a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function d(m,u){for(var f=0;f<u.length;f++){var b=u[f];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,u,f){return u&&d(m.prototype,u),f&&d(m,f),m}}(),i=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( $g)?|phone|p(ixi|qo)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|qo\.(browser|link)|vodafone|wap|windows qo|xda|xiino/i,n=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a qo|abac|ac(er|$g|s\-)|wg($g|rn)|al(av|qo|qo)|amoi|id(ex|ny|yw)|aptu|qo(wg|qo)|$g(te|us)|attw|au(di|\-m|r |s )|avan|qo(ck|ll|nq)|bi($g|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|qo(qo|nd)|craw|qo(it|ll|ng)|dbte|wg\-s|devi|dica|dmob|do(c|p)o|$g(12|\-d)|el(49|wg)|em(l2|ul)|er(Yp|k0)|esl8|ez([4-7]0|$g|qo|qo)|fetc|fly(\-|_)|g1 u|g560|gene|Bg\-5|g\-qo|qo(\.w|od)|$g(ad|qo)|haie|hcit|hd\-(m|p|t)|hei\-|qo(pt|qo)|hp( i|ip)|hs\-c|qo(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|Zd)|i\-(20|qo|qo)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|qo(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|qo)|qo(no|qo)|lg( g|\/(qo|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|qo(te|ui|qo)|mc(01|21|qo)|m\-qo|me($g|ri)|qo(o8|qo|ts)|mmef|qo(01|02|bi|qo|do|t(\-| |o|v)|zz)|qo(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|qo((c|m)\-|Cg|tf|wf|wg|$g)|nok(6|i)|nzph|o2im|op(wg|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|qo\-2|qo(ck|rt|qo)|prox|psio|pt\-g|qa\-a|wg(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|qo(qo|qo)|s55\/|sa(qo|qo|mm|$g|ny|qo)|$g(01|h\-|$g|p\-)|sdk\/|qo(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|fn(al|qo|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|fn)|t2(18|50)|t6(00|10|18)|qo(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-qo|wg(pl|nv)|ts(70|m\-|m3|m5)|tx\-9|qo(\.b|g1|si)|utst|v400|v750|veri|qo(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,s=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( $g)?|phone|p(ixi|qo)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|qo\.(browser|link)|vodafone|wap|windows qo|xda|xiino|android|ipad|playbook|silk/i,l=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a qo|abac|ac(er|$g|s\-)|wg($g|rn)|al(av|qo|qo)|amoi|id(ex|ny|yw)|aptu|qo(wg|qo)|$g(te|us)|attw|au(di|\-m|r |s )|avan|qo(ck|ll|nq)|bi($g|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|qo(qo|nd)|craw|qo(it|ll|ng)|dbte|wg\-s|devi|dica|dmob|do(c|p)o|$g(12|\-d)|el(49|wg)|em(l2|ul)|er(Yp|k0)|esl8|ez([4-7]0|$g|qo|qo)|fetc|fly(\-|_)|g1 u|g560|gene|Bg\-5|g\-qo|qo(\.w|od)|$g(ad|qo)|haie|hcit|hd\-(m|p|t)|hei\-|qo(pt|qo)|hp( i|ip)|hs\-c|qo(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|Zd)|i\-(20|qo|qo)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|qo(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|qo)|qo(no|qo)|lg( g|\/(qo|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|qo(te|ui|qo)|mc(01|21|qo)|m\-qo|me($g|ri)|qo(o8|qo|ts)|mmef|qo(01|02|bi|qo|do|t(\-| |o|v)|zz)|qo(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|qo((c|m)\-|Cg|tf|wf|wg|$g)|nok(6|i)|nzph|o2im|op(wg|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|qo\-2|qo(ck|rt|qo)|prox|psio|pt\-g|qa\-a|wg(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|qo(qo|qo)|s55\/|sa(qo|qo|mm|$g|ny|qo)|$g(01|h\-|$g|p\-)|sdk\/|qo(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|fn(al|qo|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|fn)|t2(18|50)|t6(00|10|18)|qo(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-qo|wg(pl|nv)|ts(70|m\-|m3|m5)|tx\-9|qo(\.b|g1|si)|utst|v400|v750|veri|qo(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,c=function(){function d(){a(this,d)}return r(d,[{key:"phone",value:function(){var m=o();return!(!i.test(m)&&!n.test(m.substr(0,4)))}},{key:"mobile",value:function(){var m=o();return!(!s.test(m)&&!l.test(m.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),d}();t.default=new c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(r,i,n){var s=r.node.getAttribute("data-aos-once");i>r.position?r.node.classList.add("aos-animate"):typeof s<"u"&&(s==="false"||!n&&s!=="true")&&r.node.classList.remove("aos-animate")},o=function(r,i){var n=window.pageYOffset,s=window.innerHeight;r.forEach(function(l,c){a(l,s+n,i)})};t.default=o},function(e,t,a){"use strict";function o(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(12),i=o(r),n=function(s,l){return s.forEach(function(c,d){c.node.classList.add("aos-init"),c.position=(0,i.default)(c.node,l.offset)}),s};t.default=n},function(e,t,a){"use strict";function o(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(13),i=o(r),n=function(s,l){var c=0,d=0,m=window.innerHeight,u={offset:s.getAttribute("data-aos-offset"),anchor:s.getAttribute("data-aos-anchor"),anchorPlacement:s.getAttribute("data-aos-anchor-placement")};switch(u.offset&&!isNaN(u.offset)&&(d=parseInt(u.offset)),u.anchor&&document.querySelectorAll(u.anchor)&&(s=document.querySelectorAll(u.anchor)[0]),c=(0,i.default)(s).top,u.anchorPlacement){case"top-bottom":break;case"center-bottom":c+=s.offsetHeight/2;break;case"bottom-bottom":c+=s.offsetHeight;break;case"top-center":c+=m/2;break;case"bottom-center":c+=m/2+s.offsetHeight;break;case"center-center":c+=m/2+s.offsetHeight/2;break;case"top-top":c+=m;break;case"bottom-top":c+=s.offsetHeight+m;break;case"center-top":c+=s.offsetHeight/2+m}return u.anchorPlacement||u.offset||isNaN(l)||(d=l),c+d};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(o){for(var r=0,i=0;o&&!isNaN(o.offsetLeft)&&!isNaN(o.offsetTop);)r+=o.offsetLeft-(o.tagName!="BODY"?o.scrollLeft:0),i+=o.offsetTop-(o.tagName!="BODY"?o.scrollTop:0),o=o.offsetParent;return{top:i,left:r}};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(o){return o=o||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(o,function(r){return{node:r}})};t.default=a}])})});var HN={};ty(HN,{AOSInit:()=>Ey,AboutSection:()=>NN,Alert:()=>Ym,AlertDescription:()=>Qm,AlertTitle:()=>Jm,AppHeader:()=>zl,AppSidebar:()=>Hs,AppSidebarLeft:()=>Lc,ApprovalRequestModal:()=>fu,ApproveLeave:()=>Xp,Avatar:()=>Ft,AvatarFallback:()=>zt,AvatarImage:()=>Ia,Badge:()=>te,BannerBlock:()=>ip,BlogCard:()=>kh,BlogDetail:()=>TN,BlogList:()=>MN,BlogListSection:()=>kN,BrandLogo:()=>Zi,Breadcrumb:()=>Yn,BreadcrumbEllipsis:()=>vm,BreadcrumbItem:()=>en,BreadcrumbLink:()=>Qn,BreadcrumbList:()=>Jn,BreadcrumbPage:()=>Zn,BreadcrumbSeparator:()=>el,Breadcrumbs:()=>Yx,Button:()=>x,CMSLink:()=>kr,CRMCogeBoard:()=>mw,CRMKanbanBoard:()=>lw,Calendar:()=>qi,CalendarView:()=>eu,CallToActionBlock:()=>Ps,CallToActionBlockOld:()=>ox,CapabilityMenu:()=>mu,Card:()=>j,CardContent:()=>ee,CardDescription:()=>Kr,CardFooter:()=>er,CardHeader:()=>Ce,CardTitle:()=>De,Categories:()=>Bp,ChatCardArtefact:()=>iu,ChatCardTask:()=>El,ChatInterface:()=>Dc,ChatInterfaceMessages:()=>bw,ChatMessage:()=>ou,Checkbox:()=>Za,CodeBlock:()=>dp,Collapsible:()=>so,CollapsibleContent:()=>Ro,CollapsibleTrigger:()=>To,ColleagueCard:()=>Rn,ColleagueForm:()=>Ol,ColleagueTypeSelection:()=>Oc,ColleaguesView:()=>Wl,CollectionArchive:()=>Rx,Command:()=>yd,CommandDialog:()=>uf,CommandEmpty:()=>Gm,CommandGroup:()=>_m,CommandInput:()=>$m,CommandItem:()=>qm,CommandList:()=>Km,CommandSeparator:()=>Wm,CommandShortcut:()=>Xm,CommentSection:()=>Nu,ContactSection:()=>SN,Container:()=>Mo,ContentBlock:()=>kl,ContentCard:()=>ux,CopilotInterface:()=>Lw,CopyButton:()=>np,CustomLink:()=>eo,CustomerCard:()=>$f,DCProjectCard:()=>Fn,DarkTop:()=>hp,DashboardHeader:()=>Q0,DashboardHero:()=>sa,DashboardPage:()=>Gu,DealCard:()=>tu,DealDetails:()=>Bl,DeliveryLeadSubmission:()=>Tc,DeliveryLeadSubmissionList:()=>Ac,DeliveryLeadSubmissionWithList:()=>W0,Dialog:()=>ut,DialogClose:()=>hd,DialogContent:()=>bt,DialogDescription:()=>ks,DialogFooter:()=>Cs,DialogHeader:()=>Ct,DialogOverlay:()=>nn,DialogPortal:()=>bl,DialogTitle:()=>kt,DialogTrigger:()=>mf,DigitalColleagueClone:()=>jc,DigitalColleagueOptions:()=>Uc,DocumentEdit:()=>Zc,DocumentPreview:()=>em,DropdownMenu:()=>yr,DropdownMenuCheckboxItem:()=>ym,DropdownMenuContent:()=>Xo,DropdownMenuGroup:()=>kg,DropdownMenuItem:()=>fo,DropdownMenuLabel:()=>tl,DropdownMenuPortal:()=>Sg,DropdownMenuRadioGroup:()=>Pg,DropdownMenuRadioItem:()=>xm,DropdownMenuSeparator:()=>al,DropdownMenuShortcut:()=>wm,DropdownMenuSub:()=>Dg,DropdownMenuSubContent:()=>hm,DropdownMenuSubTrigger:()=>bm,DropdownMenuTrigger:()=>xr,DynamicIcon:()=>no,EditableField:()=>Us,EpicsView:()=>Wu,EventCard:()=>Kf,FeatureCard:()=>cn,FeatureGrid:()=>Zf,FeaturesBlock:()=>Rs,FileView:()=>Zl,Filter:()=>Ep,FlowPrintable:()=>wv,Footer:()=>aw,Form:()=>wl,FoundaryLayout:()=>Fc,Header:()=>qp,HeaderDesktop:()=>$p,HeaderMobile:()=>Gp,HeadingImage:()=>kx,Hero:()=>px,HighImpactHero:()=>Fp,HolidayGrid:()=>Zp,HolidayTracker:()=>sw,HoverCard:()=>nf,HoverCardContent:()=>Vm,HoverCardTrigger:()=>lf,Image:()=>Xf,ImageBlock:()=>gp,ImageSection:()=>IN,InfoTile:()=>vx,Input:()=>W,Insight:()=>fx,KanbanBoardView:()=>_u,KanbanColumn:()=>Ll,KnowledgeBrowser:()=>tm,KnowledgeSearch:()=>Hc,KnowledgeView:()=>Jl,Label:()=>B,LightTop:()=>yp,LocationsSection:()=>DN,Logo:()=>Ax,LowImpactHero:()=>Op,MOTD:()=>hx,MainPage:()=>Su,MainPageSection:()=>RN,ManagementSidebar:()=>ob,Mask:()=>Wx,Media:()=>Dr,MediaBlock:()=>bi,MediumImpactHero:()=>Hp,NavigationTabs:()=>Os,NewCustomerForm:()=>au,NewDealForm:()=>dw,NewsGrid:()=>yv,NotificationsPanel:()=>lu,OAuthModal:()=>uu,OrgChart:()=>wx,PagePrintable:()=>Nv,PageRange:()=>Bx,PageShape:()=>$o,Pagination:()=>Mp,PayloadCard:()=>Sl,PayloadPagination:()=>Lx,PlanningView:()=>im,Popover:()=>Ki,PopoverAnchor:()=>tf,PopoverContent:()=>gi,PopoverTrigger:()=>Gi,PostHero:()=>Gx,PricingCard:()=>vp,PricingSection:()=>wN,Printable:()=>Rp,ProjectCard:()=>qf,ProjectTeam:()=>Ux,ProjectView:()=>Zu,ProjectsIndexView:()=>ag,ProposalSummary:()=>Nx,Publish:()=>FN,RelatedContent:()=>Vx,RelatedPagesMenu:()=>ow,RelatedPosts:()=>Tx,RenderBlocks:()=>Qi,RenderBlocksWithShapes:()=>Dx,RenderHero:()=>Xx,RequestLeave:()=>Qp,ReusableContentBlock:()=>bp,RichText:()=>ct,ScrollArea:()=>ga,ScrollBar:()=>bd,SearchableSelect:()=>zc,Section:()=>LN,SectionHero:()=>Up,Select:()=>dt,SelectContent:()=>it,SelectGroup:()=>Yy,SelectItem:()=>xe,SelectLabel:()=>yf,SelectScrollDownButton:()=>tp,SelectScrollUpButton:()=>ep,SelectSeparator:()=>xf,SelectTrigger:()=>rt,SelectValue:()=>St,Separator:()=>vs,ServiceCard:()=>mx,ServiceDetail:()=>EN,ServiceDetailSection:()=>BN,ServiceSection:()=>xN,Sheet:()=>sd,SheetClose:()=>Eg,SheetContent:()=>rl,SheetDescription:()=>Pm,SheetFooter:()=>Sm,SheetHeader:()=>km,SheetOverlay:()=>nd,SheetPortal:()=>Cm,SheetTitle:()=>Dm,SheetTrigger:()=>Lg,Sidebar:()=>ni,SidebarContent:()=>Nr,SidebarFooter:()=>di,SidebarGroup:()=>vo,SidebarGroupAction:()=>Im,SidebarGroupContent:()=>jo,SidebarGroupLabel:()=>ci,SidebarHeader:()=>li,SidebarInput:()=>Am,SidebarInset:()=>nl,SidebarLeft:()=>zx,SidebarMenu:()=>qa,SidebarMenuAction:()=>bs,SidebarMenuBadge:()=>Mm,SidebarMenuButton:()=>bo,SidebarMenuItem:()=>Ra,SidebarMenuSkeleton:()=>Bm,SidebarMenuSub:()=>Ur,SidebarMenuSubButton:()=>$r,SidebarMenuSubItem:()=>Vr,SidebarProvider:()=>il,SidebarRail:()=>Rm,SidebarRight:()=>jx,SidebarSeparator:()=>ll,SidebarTrigger:()=>sl,SimpleHeader:()=>Qx,Skeleton:()=>vt,SlideShow:()=>Kd,Switch:()=>$w,Tabs:()=>ap,TabsContent:()=>Jy,TabsList:()=>op,TabsTrigger:()=>rp,TasksView:()=>Qu,TeamForm:()=>$c,TeamsIndexView:()=>og,TextAndImages:()=>xv,Textarea:()=>st,Theme:()=>jd,ThemeProvider:()=>_x,ThemeWithShapes:()=>sv,TimeUtil:()=>hr,Toast:()=>ml,ToastAction:()=>Fm,ToastClose:()=>pl,ToastDescription:()=>gl,ToastProvider:()=>gd,ToastTitle:()=>ul,ToastViewport:()=>cl,Toaster:()=>fd,Toggle:()=>Hm,ToggleGroup:()=>pi,ToggleGroupItem:()=>ui,Tooltip:()=>Jo,TooltipContent:()=>Oo,TooltipProvider:()=>Yo,TooltipTrigger:()=>Qo,VideoHeader:()=>ew,WhyUs:()=>Cx,badgeVariants:()=>Zm,buttonVariants:()=>Ui,cn:()=>p,defaultColorScheme:()=>ru,findCapabilityByPath:()=>hw,getAllCapabilities:()=>xw,getCapabilityByTeam:()=>yw,getContextualActions:()=>pc,getDataPart:()=>Uw,getFileParts:()=>Ow,getTableOfContents:()=>Qs,getTextContent:()=>Ew,getToolPart:()=>zw,hasDataPart:()=>jw,hasFilePart:()=>Hw,hasToolPart:()=>Fw,reducer:()=>_g,testCapabilities:()=>mc,toast:()=>Wg,toggleVariants:()=>fl,useIsMobile:()=>dd,useSidebar:()=>rn,useToast:()=>ud});module.exports=ay(HN);var Zs=z(require("react")),id=require("@radix-ui/react-icons"),Cg=require("@radix-ui/react-slot");var yg=require("clsx");var gm="-",oy=e=>{let t=iy(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let s=n.split(gm);return s[0]===""&&s.length!==1&&s.shift(),ug(s,t)||ry(n)},getConflictingClassGroupIds:(n,s)=>{let l=a[n]||[];return s&&o[n]?[...l,...o[n]]:l}}},ug=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?ug(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(gm);return t.validators.find(({validator:n})=>n(i))?.classGroupId},mg=/^\[(.+)\]$/,ry=e=>{if(mg.test(e)){let t=mg.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},iy=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return ny(Object.entries(e.classGroups),a).forEach(([i,n])=>{um(n,o,i,t)}),o},um=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:pg(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(sy(r)){um(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,n])=>{um(n,pg(t,i),a,o)})})},pg=(e,t)=>{let a=e;return t.split(gm).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},sy=e=>e.isThemeGetter,ny=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,s])=>[t+n,s])):i);return[a,r]}):e,ly=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,n)=>{a.set(i,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let n=a.get(i);if(n!==void 0)return n;if((n=o.get(i))!==void 0)return r(i,n),n},set(i,n){a.has(i)?a.set(i,n):r(i,n)}}},gg="!",dy=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,n=s=>{let l=[],c=0,d=0,m;for(let v=0;v<s.length;v++){let N=s[v];if(c===0){if(N===r&&(o||s.slice(v,v+i)===t)){l.push(s.slice(d,v)),d=v+i;continue}if(N==="/"){m=v;continue}}N==="["?c++:N==="]"&&c--}let u=l.length===0?s:s.substring(d),f=u.startsWith(gg),b=f?u.substring(1):u,g=m&&m>d?m-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}};return a?s=>a({className:s,parseClassName:n}):n},cy=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},my=e=>({cache:ly(e.cacheSize),parseClassName:dy(e),...oy(e)}),py=/\s+/,uy=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],n=e.trim().split(py),s="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:d,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:f}=a(c),b=!!f,g=o(b?u.substring(0,f):u);if(!g){if(!b){s=c+(s.length>0?" "+s:s);continue}if(g=o(u),!g){s=c+(s.length>0?" "+s:s);continue}b=!1}let v=cy(d).join(":"),N=m?v+gg:v,R=N+g;if(i.includes(R))continue;i.push(R);let h=r(g,b);for(let C=0;C<h.length;++C){let A=h[C];i.push(N+A)}s=c+(s.length>0?" "+s:s)}return s};function gy(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=fg(t))&&(o&&(o+=" "),o+=a);return o}var fg=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=fg(e[o]))&&(a&&(a+=" "),a+=t);return a};function fy(e,...t){let a,o,r,i=n;function n(l){let c=t.reduce((d,m)=>m(d),e());return a=my(c),o=a.cache.get,r=a.cache.set,i=s,s(l)}function s(l){let c=o(l);if(c)return c;let d=uy(l,a);return r(l,d),d}return function(){return i(gy.apply(null,arguments))}}var Zt=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},vg=/^\[(?:([a-z-]+):)?(.+)\]$/i,vy=/^\d+\/\d+$/,by=new Set(["px","full","screen"]),hy=/^(\d+(\.\d+)?)?(xs|fn|md|lg|qo)$/,yy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|wg|ex|r?fn|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,wy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ny=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ii=e=>Ys(e)||by.has(e)||vy.test(e),Oi=e=>Js(e,"length",Ay),Ys=e=>!!e&&!Number.isNaN(Number(e)),pm=e=>Js(e,"number",Ys),Wn=e=>!!e&&Number.isInteger(Number(e)),Cy=e=>e.endsWith("%")&&Ys(e.slice(0,-1)),Ve=e=>vg.test(e),ji=e=>hy.test(e),ky=new Set(["length","size","percentage"]),Sy=e=>Js(e,ky,bg),Dy=e=>Js(e,"position",bg),Py=new Set(["image","url"]),Ty=e=>Js(e,Py,My),Ry=e=>Js(e,"",Iy),qn=()=>!0,Js=(e,t,a)=>{let o=vg.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Ay=e=>yy.test(e)&&!xy.test(e),bg=()=>!1,Iy=e=>wy.test(e),My=e=>Ny.test(e);var By=()=>{let e=Zt("colors"),t=Zt("spacing"),a=Zt("blur"),o=Zt("brightness"),r=Zt("borderColor"),i=Zt("borderRadius"),n=Zt("borderSpacing"),s=Zt("borderWidth"),l=Zt("contrast"),c=Zt("grayscale"),d=Zt("hueRotate"),m=Zt("invert"),u=Zt("gap"),f=Zt("gradientColorStops"),b=Zt("gradientColorStopPositions"),g=Zt("inset"),v=Zt("margin"),N=Zt("opacity"),R=Zt("padding"),h=Zt("saturate"),C=Zt("scale"),A=Zt("sepia"),w=Zt("skew"),L=Zt("space"),T=Zt("translate"),M=()=>["auto","contain","none"],S=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",Ve,t],y=()=>[Ve,t],Y=()=>["",ii,Oi],D=()=>["auto",Ys,Ve],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Xe=()=>["start","end","center","between","around","evenly","stretch"],gt=()=>["","0",Ve],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[Ys,Ve];return{cacheSize:500,separator:":",theme:{colors:[qn],spacing:[ii,Oi],blur:["none","",ji,Ve],brightness:F(),borderColor:[e],borderRadius:["none","","full",ji,Ve],borderSpacing:y(),borderWidth:Y(),contrast:F(),grayscale:gt(),hueRotate:F(),invert:gt(),gap:y(),gradientColorStops:[e],gradientColorStopPositions:[Cy,Oi],inset:E(),margin:E(),opacity:F(),padding:y(),saturate:F(),scale:F(),sepia:gt(),skew:F(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",Ve]}],container:["container"],columns:[{columns:[ji]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"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:[...H(),Ve]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],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",Wn,Ve]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ve]}],grow:[{grow:gt()}],shrink:[{shrink:gt()}],order:[{order:["first","last","none",Wn,Ve]}],"grid-cols":[{"grid-cols":[qn]}],"col-start-end":[{col:["auto",{span:["full",Wn,Ve]},Ve]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[qn]}],"row-start-end":[{row:["auto",{span:[Wn,Ve]},Ve]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","$g",Ve]}],"auto-rows":[{"auto-rows":["auto","min","max","$g",Ve]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...Xe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Xe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Xe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],$g:[{$g:[R]}],qo:[{qo:[R]}],pt:[{pt:[R]}],$g:[{$g:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],$g:[{$g:[v]}],me:[{me:[v]}],qo:[{qo:[v]}],$g:[{$g:[v]}],fn:[{fn:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ve,t]}],"min-w":[{"min-w":[Ve,t,"min","max","fit"]}],"max-w":[{"max-w":[Ve,t,"none","full","min","max","fit","prose",{screen:[ji]},ji]}],h:[{h:[Ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ji,Oi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pm]}],"font-family":[{font:[qn]}],"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",Ve]}],"line-clamp":[{"line-clamp":["none",Ys,pm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ii,Ve]}],"list-image":[{"list-image":["none",Ve]}],"list-style-type":[{list:["none","disc","decimal",Ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ii,Oi]}],"underline-offset":[{"underline-offset":["auto",ii,Ve]}],"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:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ve]}],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",Ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),Dy]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sy]}],"bg-image":[{bg:["none",{"gradient-wg":["t","qo","r","br","b","bl","l","tl"]},Ty]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-wg-pos":[{wg:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-wg":[{wg:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-$g":[{"rounded-$g":[i]}],"rounded-qo":[{"rounded-qo":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-Pf":[{"rounded-Pf":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-qo":[{"rounded-qo":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[N]}],"border-style":[{border:[...G(),"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":[N]}],"divide-style":[{divide:G()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[ii,Ve]}],"outline-w":[{outline:[ii,Oi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ii,Oi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ji,Ry]}],"shadow-color":[{shadow:[qn]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":me()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ji,Ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[h]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ve]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",Ve]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Wn,Ve]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ve]}],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","qo-resize","nw-resize","qo-resize","sw-resize","ew-resize","qo-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-$g":[{"scroll-$g":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-qo":[{"scroll-qo":y()}],"scroll-$g":[{"scroll-$g":y()}],"scroll-fn":[{"scroll-fn":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-$g":[{"scroll-$g":y()}],"scroll-qo":[{"scroll-qo":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-$g":[{"scroll-$g":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"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","qo","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ii,Oi,pm]}],stroke:[{stroke:[e,"none"]}],qo:["qo-only","not-qo-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","$g","qo","pt","$g","pb","pl"],px:["$g","pl"],py:["pt","pb"],m:["mx","my","$g","me","qo","$g","fn","ml"],mx:["$g","ml"],my:["qo","fn"],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-$g","rounded-qo","rounded-ee","rounded-Pf","rounded-tl","rounded-qo","rounded-br","rounded-bl"],"rounded-s":["rounded-$g","rounded-Pf"],"rounded-e":["rounded-qo","rounded-ee"],"rounded-t":["rounded-tl","rounded-qo"],"rounded-r":["rounded-qo","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-$g","scroll-me","scroll-qo","scroll-$g","scroll-fn","scroll-ml"],"scroll-mx":["scroll-$g","scroll-ml"],"scroll-my":["scroll-qo","scroll-fn"],"scroll-p":["scroll-px","scroll-py","scroll-$g","scroll-qo","scroll-pt","scroll-$g","scroll-pb","scroll-pl"],"scroll-px":["scroll-$g","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 hg=fy(By);function p(...e){return hg((0,yg.clsx)(e))}function Qs(e){let t=0,a=(i,n)=>`${i.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${n}`,o=e.layout.flatMap(i=>{let n=[];return"title"in i&&i.title&&n.push({text:i.title,id:a(i.title,t++),tag:"h2"}),"columns"in i&&Array.isArray(i.columns)&&i.columns.forEach(s=>{if(s.title&&n.push({text:s.title,id:a(s.title,t++),tag:"h2"}),s.richText?.root?.children&&s.richText?.root?.children.length===1){let l=s.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c Bg l)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),r=Ly(e.layout);return{tableOfContents:o,contentWithIds:r}}function Ly(e){let t=(o,r)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${r}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(r=>(r.title&&(r.id=t(r.title,a++)),r.richText&&(r.richText.root.children=r.richText.root.children.filter(i=>i!==void 0).map(i=>(i.type==="heading"&&i.children&&i.children[0].text?i.id=t(i.children[0].text,a++):i.type==="block"&&i.fields?.media&&(i.id=t(`image-${a}`,a++)),i))),r))),o))}var wg=require("react"),Ng=z(xg());function Ey(){return(0,wg.useEffect)(()=>{Ng.default.init({duration:1e3,offset:0,once:!0})},[]),null}var hr=class{static toUtcMidnight(t){let a=new Date(t);return a.getUTCHours()===23&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0?new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()+1)):new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))}};var qo=require("react/jsx-runtime"),Yn=Zs.forwardRef(({...e},t)=>(0,qo.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Yn.displayName="Breadcrumb";var Jn=Zs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("ol",{ref:a,className:p("flex flex-wrap items-center gap-1.5 break-words text-fn text-muted-foreground fn:gap-2.5",e),...t}));Jn.displayName="BreadcrumbList";var en=Zs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("li",{ref:a,className:p("inline-flex items-center gap-1.5",e),...t}));en.displayName="BreadcrumbItem";var Qn=Zs.forwardRef(({asChild:e,className:t,...a},o)=>(0,qo.jsx)(e?Cg.Slot:"a",{ref:o,className:p("transition-colors hover:text-foreground",t),...a}));Qn.displayName="BreadcrumbLink";var Zn=Zs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:p("font-normal text-foreground",e),...t}));Zn.displayName="BreadcrumbPage";var el=({children:e,className:t,...a})=>(0,qo.jsx)("li",{role:"presentation","aria-hidden":"true",className:p("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,qo.jsx)(id.ChevronRightIcon,{})});el.displayName="BreadcrumbSeparator";var vm=({className:e,...t})=>(0,qo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:p("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,qo.jsx)(id.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"qo-only",children:"More"})]});vm.displayName="BreadcrumbElipssis";var tn=z(require("@radix-ui/react-collapsible")),so=tn.Root,To=tn.CollapsibleTrigger,Ro=tn.CollapsibleContent;var si=z(require("react")),_e=z(require("@radix-ui/react-dropdown-menu"));var yr=_e.Root,xr=_e.Trigger,kg=_e.Group,Sg=_e.Portal,Dg=_e.Sub,Pg=_e.RadioGroup,bm=si.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,$a.jsxs)(_e.SubTrigger,{ref:r,className:p("flex cursor-default gap-2 select-none items-center rounded-fn px-2 py-1.5 text-fn outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,$a.jsx)(id.ChevronRightIcon,{className:"ml-auto"})]}));bm.displayName=_e.SubTrigger.displayName;var hm=si.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(_e.SubContent,{ref:a,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...t}));hm.displayName=_e.SubContent.displayName;var Xo=si.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,$a.jsx)(_e.Portal,{children:(0,$a.jsx)(_e.Content,{ref:o,sideOffset:t,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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),...a})}));Xo.displayName=_e.Content.displayName;var fo=si.forwardRef(({className:e,inset:t,...a},o)=>(0,$a.jsx)(_e.Item,{ref:o,className:p("relative flex cursor-default select-none items-center gap-2 rounded-fn px-2 py-1.5 text-fn outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));fo.displayName=_e.Item.displayName;var ym=si.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,$a.jsxs)(_e.CheckboxItem,{ref:r,className:p("relative flex cursor-default select-none items-center rounded-fn py-1.5 pl-8 $g-2 text-fn outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,$a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$a.jsx)(_e.ItemIndicator,{children:(0,$a.jsx)(id.CheckIcon,{className:"h-4 w-4"})})}),t]}));ym.displayName=_e.CheckboxItem.displayName;var xm=si.forwardRef(({className:e,children:t,...a},o)=>(0,$a.jsxs)(_e.RadioItem,{ref:o,className:p("relative flex cursor-default select-none items-center rounded-fn py-1.5 pl-8 $g-2 text-fn outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,$a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$a.jsx)(_e.ItemIndicator,{children:(0,$a.jsx)(id.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));xm.displayName=_e.RadioItem.displayName;var tl=si.forwardRef(({className:e,inset:t,...a},o)=>(0,$a.jsx)(_e.Label,{ref:o,className:p("px-2 py-1.5 text-fn font-semibold",t&&"pl-8",e),...a}));tl.displayName=_e.Label.displayName;var al=si.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(_e.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));al.displayName=_e.Separator.displayName;var wm=({className:e,...t})=>(0,$a.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});wm.displayName="DropdownMenuShortcut";var Tg=z(require("react"));var W=Tg.forwardRef(({className:e,type:t,...a},o)=>(0,qo.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-fn shadow-fn transition-colors file:border-0 file:bg-transparent file:text-fn file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));W.displayName="Input";var Ag=z(require("react")),Nm=z(require("@radix-ui/react-separator"));var vs=Ag.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,qo.jsx)(Nm.Root,{ref:r,decorative:a,orientation:t,className:p("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));vs.displayName=Nm.Root.displayName;var ol=z(require("react")),ya=z(require("@radix-ui/react-dialog")),Bg=require("class-variance-authority");var sd=ya.Root,Lg=ya.Trigger,Eg=ya.Close,Cm=ya.Portal,nd=ol.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ya.Overlay,{className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));nd.displayName=ya.Overlay.displayName;var Fy=(0,Bg.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-wg-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-wg-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-wg-left data-[state=open]:slide-in-from-left fn:max-w-fn",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-wg-right data-[state=open]:slide-in-from-right fn:max-w-fn"}},defaultVariants:{side:"right"}}),rl=ol.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,qo.jsxs)(Cm,{children:[(0,qo.jsx)(nd,{}),(0,qo.jsxs)(ya.Content,{ref:r,className:p(Fy({side:e}),t),...o,children:[(0,qo.jsxs)(ya.Close,{className:"absolute right-4 top-4 rounded-fn opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,qo.jsx)(id.Cross2Icon,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"qo-only",children:"Close"})]}),a]})]}));rl.displayName=ya.Content.displayName;var km=({className:e,...t})=>(0,qo.jsx)("div",{className:p("flex flex-col space-y-2 text-center fn:text-left",e),...t});km.displayName="SheetHeader";var Sm=({className:e,...t})=>(0,qo.jsx)("div",{className:p("flex flex-col-reverse fn:flex-row fn:justify-end fn:space-x-2",e),...t});Sm.displayName="SheetFooter";var Dm=ol.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ya.Title,{ref:a,className:p("text-lg font-semibold text-foreground",e),...t}));Dm.displayName=ya.Title.displayName;var Pm=ol.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ya.Description,{ref:a,className:p("text-fn text-muted-foreground",e),...t}));Pm.displayName=ya.Description.displayName;var Ye=z(require("react")),$g=require("lucide-react");var dd=(e=768)=>{let[t,a]=(0,wg.useState)(!1);return(0,wg.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Hg=z(require("react")),Ui=(0,Bg.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-fn 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",fn:"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"}}}),x=Hg.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,qo.jsx)(e?Cg.Slot:"button",{className:p(Ui({className:t,size:a,variant:o})),ref:i,...r}));x.displayName="Button";function vt({className:e,...t}){return(0,qo.jsx)("div",{className:p("animate-pulse rounded-md bg-primary/10",e),...t})}var Ug=z(require("react")),wr=z(require("@radix-ui/react-tooltip"));var Yo=wr.Provider,Jo=wr.Root,Qo=wr.Trigger,Oo=Ug.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,qo.jsx)(wr.Portal,{children:(0,qo.jsx)(wr.Content,{ref:o,sideOffset:t,className:p("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...a})}));Oo.displayName=wr.Content.displayName;var zy="sidebar:state",Hy=60*60*24*7,Oy="16rem",jy="18rem",Uy="3rem",Vy="b",Kg=Ye.createContext(null);function rn(){let e=Ye.useContext(Kg);if(!e)throw new Error("useSidebar must qo used within a SidebarProvider.");return e}var il=Ye.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...n},s)=>{let l=dd(),[c,d]=Ye.useState(!1),[m,u]=Ye.useState(e),f=t??m,b=Ye.useCallback(R=>{if(a)return a?.(typeof R=="function"?R(f):R);u(R),document.cookie=`${zy}=${f}; path=/; max-age=${Hy}`},[a,f]),g=Ye.useCallback(()=>l?d(R=>!R):b(R=>!R),[l,b,d]);Ye.useEffect(()=>{let R=h=>{h.key===Vy&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),g())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[g]);let v=f?"expanded":"collapsed",N=Ye.useMemo(()=>({state:v,open:f,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[v,f,b,l,c,d,g]);return(0,$e.jsx)(Kg.Provider,{value:N,children:(0,$e.jsx)(Yo,{delayDuration:0,children:(0,$e.jsx)("div",{style:{"--sidebar-width":Oy,"--sidebar-width-icon":Uy,...r},className:p("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:s,...n,children:i})})})});il.displayName="SidebarProvider";var ni=Ye.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},n)=>{let{isMobile:s,state:l,openMobile:c,setOpenMobile:d}=rn();return a==="none"?(0,$e.jsx)("div",{className:p("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...i,children:r}):s?(0,$e.jsx)(sd,{open:c,onOpenChange:d,...i,children:(0,$e.jsx)(rl,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":jy},side:e,children:(0,$e.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,$e.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,$e.jsx)("div",{className:p("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,$e.jsx)("div",{className:p("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...i,children:(0,$e.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});ni.displayName="Sidebar";var sl=Ye.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=rn();return(0,$e.jsxs)(x,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:p("h-7 w-7",e),onClick:i=>{t?.(i),r()},...a,children:[(0,$e.jsx)($g.PanelLeft,{}),(0,$e.jsx)("span",{className:"qo-only",children:"Toggle Sidebar"})]})});sl.displayName="SidebarTrigger";var Rm=Ye.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=rn();return(0,$e.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:p("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 fn:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Rm.displayName="SidebarRail";var nl=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("main",{ref:a,className:p("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-qo md:peer-data-[variant=inset]:shadow",e),...t}));nl.displayName="SidebarInset";var Am=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(W,{ref:a,"data-sidebar":"input",className:p("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Am.displayName="SidebarInput";var li=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,"data-sidebar":"header",className:p("flex flex-col gap-2 p-2",e),...t}));li.displayName="SidebarHeader";var di=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,"data-sidebar":"footer",className:p("flex flex-col gap-2 p-2",e),...t}));di.displayName="SidebarFooter";var ll=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(vs,{ref:a,"data-sidebar":"separator",className:p("mx-2 w-auto bg-sidebar-border",e),...t}));ll.displayName="SidebarSeparator";var Nr=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,"data-sidebar":"content",className:p("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Nr.displayName="SidebarContent";var vo=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,"data-sidebar":"group",className:p("relative flex w-full min-w-0 flex-col p-2",e),...t}));vo.displayName="SidebarGroup";var ci=Ye.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,$e.jsx)(t?Cg.Slot:"div",{ref:o,"data-sidebar":"group-label",className:p("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-qo-8 group-data-[collapsible=icon]:opacity-0",e),...a}));ci.displayName="SidebarGroupLabel";var Im=Ye.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,$e.jsx)(t?Cg.Slot:"button",{ref:o,"data-sidebar":"group-action",className:p("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));Im.displayName="SidebarGroupAction";var jo=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,"data-sidebar":"group-content",className:p("w-full text-fn",e),...t}));jo.displayName="SidebarGroupContent";var qa=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("ul",{ref:a,"data-sidebar":"menu",className:p("flex w-full min-w-0 flex-col gap-1",e),...t}));qa.displayName="SidebarMenu";var Ra=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:p("group/menu-item relative",e),...t}));Ra.displayName="SidebarMenuItem";var $y=(0,Bg.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-fn outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:$g-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-fn",fn:"h-7 text-xs",lg:"h-12 text-fn group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),bo=Ye.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...n},s)=>{let l=e?Cg.Slot:"button",{isMobile:c,state:d}=rn(),m=(0,$e.jsx)(l,{ref:s,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:p($y({variant:a,size:o}),i),...n});return r?(typeof r=="string"&&(r={children:r}),(0,$e.jsxs)(Jo,{children:[(0,$e.jsx)(Qo,{asChild:!0,children:m}),(0,$e.jsx)(Oo,{side:"right",align:"center",hidden:d!=="collapsed"||c,...r})]})):m});bo.displayName="SidebarMenuButton";var bs=Ye.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,$e.jsx)(t?Cg.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:p("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=fn]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));bs.displayName="SidebarMenuAction";var Mm=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:p("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=fn]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Mm.displayName="SidebarMenuBadge";var Bm=Ye.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=Ye.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,$e.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:p("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,$e.jsx)(vt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,$e.jsx)(vt,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});Bm.displayName="SidebarMenuSkeleton";var Ur=Ye.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:p("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Ur.displayName="SidebarMenuSub";var Vr=Ye.forwardRef(({...e},t)=>(0,$e.jsx)("li",{ref:t,...e}));Vr.displayName="SidebarMenuSubItem";var $r=Ye.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},i)=>(0,$e.jsx)(e?Cg.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:p("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="fn"&&"text-xs",t==="md"&&"text-fn","group-data-[collapsible=icon]:hidden",o),...r}));$r.displayName="SidebarMenuSubButton";var pd=z(require("react")),Ky=1,Gy=1e6;var Lm=0;function _y(){return Lm=(Lm+1)%Number.MAX_SAFE_INTEGER,Lm.toString()}var Em=new Map,Gg=e=>{if(Em.has(e))return;let t=setTimeout(()=>{Em.delete(e),dl({type:"REMOVE_TOAST",toastId:e})},Gy);Em.set(e,t)},_g=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Ky)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?Gg(a):e.toasts.forEach(o=>{Gg(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},cd=[],md={toasts:[]};function dl(e){md=_g(md,e),cd.forEach(t=>{t(md)})}function Wg({...e}){let t=_y(),a=r=>dl({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>dl({type:"DISMISS_TOAST",toastId:t});return dl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function ud(){let[e,t]=pd.useState(md);return pd.useEffect(()=>(cd.push(t),()=>{let a=cd.indexOf(t);a>-1&&cd.splice(a,1)}),[e]),{...e,toast:Wg,dismiss:a=>dl({type:"DISMISS_TOAST",toastId:a})}}var hs=z(require("react")),Aa=z(require("@radix-ui/react-toast"));var gd=Aa.Provider,cl=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Viewport,{ref:a,className:p("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 fn:bottom-0 fn:right-0 fn:top-auto fn:flex-col md:max-w-[420px]",e),...t}));cl.displayName=Aa.Viewport.displayName;var Wy=(0,Bg.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 $g-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-wg-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:fn:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ml=hs.forwardRef(({className:e,variant:t,...a},o)=>(0,qo.jsx)(Aa.Root,{ref:o,className:p(Wy({variant:t}),e),...a}));ml.displayName=Aa.Root.displayName;var Fm=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Action,{ref:a,className:p("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-fn font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Fm.displayName=Aa.Action.displayName;var pl=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Close,{ref:a,className:p("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,qo.jsx)($g.qo,{className:"h-4 w-4"})}));pl.displayName=Aa.Close.displayName;var ul=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Title,{ref:a,className:p("text-fn font-semibold [&+div]:text-xs",e),...t}));ul.displayName=Aa.Title.displayName;var gl=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Description,{ref:a,className:p("text-fn opacity-90",e),...t}));gl.displayName=Aa.Description.displayName;function fd(){let{toasts:e}=ud();return(0,qo.jsxs)(gd,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,qo.jsxs)(ml,{...i,children:[(0,qo.jsxs)("div",{className:"grid gap-1",children:[a&&(0,qo.jsx)(ul,{children:a}),o&&(0,qo.jsx)(gl,{children:o})]}),r,(0,qo.jsx)(pl,{})]},t)}),(0,qo.jsx)(cl,{})]})}var Yg=z(require("react")),zm=z(require("@radix-ui/react-toggle"));var fl=(0,Bg.cva)("inline-flex items-center justify-center gap-2 rounded-md text-fn font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=Cg]:bg-accent data-[state=Cg]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-fn hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",fn:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Hm=Yg.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,qo.jsx)(zm.Root,{ref:r,className:p(fl({variant:t,size:a,className:e})),...o}));Hm.displayName=zm.Root.displayName;var ys=z(require("react")),sn=z(require("@radix-ui/react-toggle-group"));var Zg=ys.createContext({size:"default",variant:"default"}),pi=ys.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,qo.jsx)(sn.Root,{ref:i,className:p("flex items-center justify-center gap-1",e),...r,children:(0,qo.jsx)(Zg.Provider,{value:{variant:t,size:a},children:o})}));pi.displayName=sn.Root.displayName;var ui=ys.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let n=ys.useContext(Zg);return(0,qo.jsx)(sn.Item,{ref:i,className:p(fl({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});ui.displayName=sn.Item.displayName;var Om=z(require("react")),Zo=z(require("@radix-ui/react-scroll-area"));var ga=Om.forwardRef(({className:e,children:t,...a},o)=>(0,$i.jsxs)(Zo.Root,{ref:o,className:p("relative overflow-hidden",e),...a,children:[(0,$i.jsx)(Zo.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,$i.jsx)(bd,{}),(0,$i.jsx)(Zo.Corner,{})]}));ga.displayName=Zo.Root.displayName;var bd=Om.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,$i.jsx)(Zo.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,$i.jsx)(Zo.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));bd.displayName=Zo.ScrollAreaScrollbar.displayName;var ef=z(require("react")),Cr=z(require("@radix-ui/react-popover"));var Ki=Cr.Root,Gi=Cr.Trigger,tf=Cr.Anchor,gi=ef.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,qo.jsx)(Cr.Portal,{children:(0,qo.jsx)(Cr.Content,{ref:r,align:t,sideOffset:a,className:p("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})}));gi.displayName=Cr.Content.displayName;var af=z(require("react")),Um=z(require("@radix-ui/react-label"));var qy=(0,Bg.cva)("text-fn font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),B=af.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Um.Root,{ref:a,className:p(qy(),e),...t}));B.displayName=Um.Root.displayName;var sf=z(require("react")),xs=z(require("@radix-ui/react-hover-card"));var nf=xs.Root,lf=xs.Trigger,Vm=sf.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,qo.jsx)(xs.Content,{ref:r,align:t,sideOffset:a,className:p("z-50 w-64 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}));Vm.displayName=xs.Content.displayName;var ws=z(require("react"));var j=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("rounded-qo border bg-card text-card-foreground shadow",e),...t}));j.displayName="Card";var Ce=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));Ce.displayName="CardHeader";var De=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));De.displayName="CardTitle";var Kr=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("text-fn text-muted-foreground",e),...t}));Kr.displayName="CardDescription";var ee=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("p-6 pt-0",e),...t}));ee.displayName="CardContent";var er=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("flex items-center p-6 pt-0",e),...t}));er.displayName="CardFooter";var vl=z(require("react")),xa=z(require("@radix-ui/react-dialog"));var ut=xa.Root,mf=xa.Trigger,bl=xa.Portal,hd=xa.Close,nn=vl.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(xa.Overlay,{ref:a,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));nn.displayName=xa.Overlay.displayName;var bt=vl.forwardRef(({className:e,children:t,...a},o)=>(0,qo.jsxs)(bl,{children:[(0,qo.jsx)(nn,{}),(0,qo.jsxs)(xa.Content,{ref:o,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-wg-left-1/2 data-[state=closed]:slide-out-wg-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fn:rounded-lg",e),...a,children:[t,(0,qo.jsxs)(xa.Close,{className:"absolute right-4 top-4 rounded-fn opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,qo.jsx)($g.qo,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"qo-only",children:"Close"})]})]})]}));bt.displayName=xa.Content.displayName;var Ct=({className:e,...t})=>(0,qo.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center fn:text-left",e),...t});Ct.displayName="DialogHeader";var Cs=({className:e,...t})=>(0,qo.jsx)("div",{className:p("flex flex-col-reverse fn:flex-row fn:justify-end fn:space-x-2",e),...t});Cs.displayName="DialogFooter";var kt=vl.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(xa.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));kt.displayName=xa.Title.displayName;var ks=vl.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(xa.Description,{ref:a,className:p("text-fn text-muted-foreground",e),...t}));ks.displayName=xa.Description.displayName;var _i=z(require("react")),yo=require("cmdk");var yd=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command,{ref:a,className:p("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));yd.displayName=yo.Command.displayName;var uf=({children:e,...t})=>(0,qo.jsx)(ut,{...t,children:(0,qo.jsx)(bt,{className:"overflow-hidden p-0",children:(0,qo.jsx)(yd,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),$m=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,qo.jsx)($g.Search,{className:"$g-2 h-4 w-4 shrink-0 opacity-50"}),(0,qo.jsx)(yo.Command.Input,{ref:a,className:p("flex h-10 w-full rounded-md bg-transparent py-3 text-fn outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));$m.displayName=yo.Command.Input.displayName;var Km=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command.List,{ref:a,className:p("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Km.displayName=yo.Command.List.displayName;var Gm=_i.forwardRef((e,t)=>(0,qo.jsx)(yo.Command.Empty,{ref:t,className:"py-6 text-center text-fn",...e}));Gm.displayName=yo.Command.Empty.displayName;var _m=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command.Group,{ref:a,className:p("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));_m.displayName=yo.Command.Group.displayName;var Wm=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command.Separator,{ref:a,className:p("-mx-1 h-px bg-border",e),...t}));Wm.displayName=yo.Command.Separator.displayName;var qm=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command.Item,{ref:a,className:p("relative flex cursor-default gap-2 select-none items-center rounded-fn px-2 py-1.5 text-fn outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));qm.displayName=yo.Command.Item.displayName;var Xm=({className:e,...t})=>(0,qo.jsx)("span",{className:p("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Xm.displayName="CommandShortcut";var xd=z(require("react"));var Xy=(0,Bg.cva)("relative w-full rounded-lg border px-4 py-3 text-fn [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ym=xd.forwardRef(({className:e,variant:t,...a},o)=>(0,qo.jsx)("div",{ref:o,role:"alert",className:p(Xy({variant:t}),e),...a}));Ym.displayName="Alert";var Jm=xd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("h5",{ref:a,className:p("fn-1 font-medium leading-none tracking-tight",e),...t}));Jm.displayName="AlertTitle";var Qm=xd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("text-fn [&_p]:leading-relaxed",e),...t}));Qm.displayName="AlertDescription";var Nd=z(require("react")),fi=z(require("@radix-ui/react-avatar"));var Ft=Nd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(fi.Root,{ref:a,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ft.displayName=fi.Root.displayName;var Ia=Nd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(fi.Image,{ref:a,className:p("aspect-square h-full w-full",e),...t}));Ia.displayName=fi.Image.displayName;var zt=Nd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(fi.Fallback,{ref:a,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));zt.displayName=fi.Fallback.displayName;var Zm=(0,Bg.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 te({className:e,variant:t,...a}){return(0,qo.jsx)("div",{className:p(Zm({variant:t}),e),...a})}var hl=z(require("@radix-ui/react-checkbox")),hf=z(require("react")),Za=hf.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(hl.Root,{className:p("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:a,...t,children:(0,qo.jsx)(hl.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,qo.jsx)($g.Check,{className:"h-4 w-4"})})}));Za.displayName=hl.Root.displayName;var ot=z(require("@radix-ui/react-select")),Wi=z(require("react")),dt=ot.Root,Yy=ot.Group,St=ot.Value,rt=Wi.forwardRef(({children:e,className:t,...a},o)=>(0,qo.jsxs)(ot.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,qo.jsx)(ot.Icon,{asChild:!0,children:(0,qo.jsx)($g.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));rt.displayName=ot.Trigger.displayName;var ep=Wi.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ot.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,qo.jsx)($g.ChevronUp,{className:"h-4 w-4"})}));ep.displayName=ot.ScrollUpButton.displayName;var tp=Wi.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ot.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,qo.jsx)($g.ChevronDown,{className:"h-4 w-4"})}));tp.displayName=ot.ScrollDownButton.displayName;var it=Wi.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,qo.jsx)(ot.Portal,{children:(0,qo.jsxs)(ot.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md 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",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,qo.jsx)(ep,{}),(0,qo.jsx)(ot.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,qo.jsx)(tp,{})]})}));it.displayName=ot.Content.displayName;var yf=Wi.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ot.Label,{className:p("py-1.5 pl-8 $g-2 text-fn font-semibold",e),ref:a,...t}));yf.displayName=ot.Label.displayName;var xe=Wi.forwardRef(({children:e,className:t,...a},o)=>(0,qo.jsxs)(ot.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 $g-2 text-fn outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,qo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,qo.jsx)(ot.ItemIndicator,{children:(0,qo.jsx)($g.Check,{className:"h-4 w-4"})})}),(0,qo.jsx)(ot.ItemText,{children:e})]}));xe.displayName=ot.Item.displayName;var xf=Wi.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ot.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));xf.displayName=ot.Separator.displayName;var wf=z(require("react")),st=wf.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-fn ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));st.displayName="Textarea";var Cf=require("react-day-picker");function qi({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,qo.jsx)(Cf.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:p("p-3",e),classNames:{months:"flex flex-col fn:flex-row space-y-4 fn:space-x-4 fn:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-fn font-medium",nav:"space-x-1 flex items-center",nav_button:p(Ui({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 qo-2",cell:p("relative p-0 text-center text-fn 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:p(Ui({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})}qi.displayName="Calendar";var Xi=z(require("@radix-ui/react-tabs"));function ap({className:e,...t}){return(0,qo.jsx)(Xi.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function op({className:e,...t}){return(0,qo.jsx)(Xi.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function rp({className:e,...t}){return(0,qo.jsx)(Xi.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-fn font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-fn [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Jy({className:e,...t}){return(0,qo.jsx)(Xi.Content,{"data-slot":"tabs-content",className:p("flex-1 outline-none",e),...t})}var ip=({className:e,content:t,style:a})=>(0,qo.jsx)("div",{className:p("mx-auto my-8 w-full",e),children:(0,qo.jsx)("div",{className:p("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:(0,qo.jsx)(ct,{content:t,enableGutter:!1,enableProse:!1})})});var sp=z(require("next/link")),kr=e=>{let{type:t,appearance:a="inline",children:o,className:r,label:i,newTab:n,reference:s,size:l,url:c}=e,d=t==="reference"&&typeof s?.value=="object"&&s.value.slug?`${s?.relationTo!=="pages"?`/${s?.relationTo}`:""}/${s.value.slug}`:c;if(!d)return null;let m=a==="link"?"clear":l,u=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,qo.jsxs)(sp.default,{className:p(r),href:d||c||"",...u,children:[i&&i,o&&o]}):(0,qo.jsx)(x,{asChild:!0,className:r,size:m,variant:a,children:(0,qo.jsxs)(sp.default,{className:p(r),href:d||c||"",...u,children:[i&&i,o&&o]})})};function Dd({className:e}){return p("flex items-center min-h-[3.5rem] md:min-h-[3.75rem] w-full rounded-5 px-4 md:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function Qy({className:e,...t}){return(0,qo.jsx)("input",{...t,className:Dd({className:e})})}function Pd({icon:e,...t}){return(0,qo.jsxs)("div",{className:"relative w-full",children:[(0,qo.jsx)(Qy,{...t}),e&&(0,qo.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-y-1/2 text-accent",children:e})]})}function Zy({className:e,...t}){return(0,qo.jsx)("textarea",{...t,className:p(Dd({}),"resize-none md:min-h-[130px]",e)})}function Sf({icon:e,...t}){return(0,qo.jsxs)("div",{className:"relative w-full",children:[(0,qo.jsx)(Zy,{...t}),e&&(0,qo.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var Df=require("formik"),Pf=require("react-icons/fa6"),Ds=z(require("yup")),Id=require("sonner"),Sr={tooShort:"Must qo at least ${min} characters",tooLong:"Must qo at most ${max} characters",required:"This field $g required",email:"Invalid email format"},ex=Ds.object().shape({name:Ds.string().min(2,Sr.tooShort).max(50,Sr.tooLong).required(Sr.required),email:Ds.string().email(Sr.email).required(Sr.required),subject:Ds.string().min(2,Sr.tooShort).max(50,Sr.tooLong).required(Sr.required),message:Ds.string().min(2,Sr.tooShort).max(300,Sr.tooLong).required(Sr.required)}),Td=p("!$g-[44px] text-foreground"),Rd=p("!border-red-600 border"),Ad=p("qo-only");function wl({onSubmit:e}={}){return(0,qo.jsx)(Df.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:ex,onSubmit:async(t,{resetForm:a})=>{if(!e){Id.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?Id.toast.error(o.message):(Id.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:r,handleBlur:i,isSubmitting:n,handleSubmit:s})=>(0,qo.jsxs)("form",{onSubmit:s,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(Pd,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:i,disabled:n,icon:(0,qo.jsx)(Pf.FaUser,{className:"text-primary"}),className:p(Td,t.name&&a.name&&Rd)}),t.name&&a.name&&(0,qo.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:Ad,children:t.name})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(Pd,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:i,disabled:n,icon:(0,qo.jsx)(tx,{}),className:p(Td,t.email&&a.email&&Rd)}),t.email&&a.email&&(0,qo.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:Ad,children:t.email})]}),(0,qo.jsxs)("div",{className:"lg:col-span-2",children:[(0,qo.jsx)(Pd,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:i,disabled:n,className:p(Td,t.subject&&a.subject&&Rd)}),t.subject&&a.subject&&(0,qo.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:Ad,children:t.subject})]}),(0,qo.jsxs)("div",{className:"lg:col-span-2",children:[(0,qo.jsx)(Sf,{placeholder:"Message...",name:"message",value:o.message,onChange:r,onBlur:i,disabled:n,icon:(0,qo.jsx)(ax,{}),className:p(Td,t.message&&a.message&&Rd)}),t.message&&a.message&&(0,qo.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:Ad,children:t.message})]}),(0,qo.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,qo.jsx)(x,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function tx(){return(0,qo.jsx)("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,qo.jsx)("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function ax(){return(0,qo.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,qo.jsx)("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}var ox=({links:e,richText:t})=>(0,qo.jsx)("div",{className:"container",children:(0,qo.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[(0,qo.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,qo.jsx)(ct,{className:"fn-0",content:t,enableGutter:!1})}),(0,qo.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,qo.jsx)(kr,{size:"lg",...a},o))})]})}),Ps=({links:e,richText:t})=>{let[a,o]=(0,wg.useState)(!1),r="accent",i=()=>o(!0),n=()=>o(!1),s=l=>{l.target===l.currentTarget&&n()};return(0,qo.jsxs)("div",{className:p("relative isolate overflow-hidden",r==="accent"?"bg-accent":"bg-black"),children:[(0,qo.jsx)("div",{className:"px-6 py-24 fn:px-6 fn:py-32 lg:px-8",children:(0,qo.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,qo.jsx)(ct,{className:"fn-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,qo.jsx)("div",{className:"qo-10 flex items-center justify-center gap-x-6",children:(0,qo.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:l},c)=>l?.url==="/contact"?(0,qo.jsx)("div",{onClick:i,className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),children:l.label},c):(0,qo.jsx)(kr,{size:"lg",className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),...l},c))})})]})}),a&&(0,qo.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:s,children:(0,qo.jsxs)("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[(0,qo.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,qo.jsx)(wl,{})," "]})})]})};var Md=require("prism-react-renderer");function np({code:e}){let[t,a]=(0,wg.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,qo.jsx)("div",{className:"flex justify-end align-middle",children:(0,qo.jsxs)(x,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,qo.jsx)("p",{children:t}),(0,qo.jsx)("div",{className:"w-6 h-6",children:(0,qo.jsx)($g.ClipboardCopy,{})})]})})}var If=({code:e,language:t=""})=>e?(0,qo.jsx)(Md.Highlight,{code:e,language:t,theme:Md.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:r})=>(0,qo.jsxs)("pre",{className:"bg-black p-4 border text-xs border-border rounded overflow-x-auto",children:[r.map((i,n)=>(0,qo.jsxs)("div",{...a({className:"table-row",line:i}),children:[(0,qo.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,qo.jsx)("span",{className:"table-cell pl-4",children:i.map((s,l)=>(0,qo.jsx)("span",{...o({token:s})},l))})]},n)),(0,qo.jsx)(np,{code:e})]})}):null;var dp=({className:e,code:t,language:a})=>(0,qo.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,qo.jsx)(If,{code:t,language:a})});var Bf=z(require("next/image")),rx={"3xl":1920,"2xl":1536,qo:1280,lg:1024,md:768,fn:640},Mf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fqw7AGkwgW4fgALAdiC2btKgNZwbgdMbEFpqFR2UyCR8xwAhf8bUHIGk1ckMyB5C1YkeWAdAPQBAeiD6wVYPoD1HUgXwFagZAGc6oSpTmilopoD5GzISQD3odcNIFca0BUQQM5YA2DpHV0AYURBDIAL0C+ugC0C4GedSsVUmwC8/4w8TPiwU6AClJ5RWL1PgQNkrABWdKB3YF3cBwRY5lsI4ApkKpCQi+FIgFJU/TDgDuAxAAwonJuKpGD1rkCXCR1ALyrAUSSEQAhwBdYZ6DPAgSUA2c1wKIZmRcHxMzMYR9DH8NlbkAwwApSAcABwBwTAbb6owAr0AFiZPILVEyCtMmK2jCkTwFDNUNj7nJETQx744gCUmgkZVGJUHyakEZE4W91jtGFA9KsD8Z3JFYDlhGYZLWcllwJMnplcPy+csFAgAAaIDOgeuAGoB96GLZg4kmtfMjnr6ig5oSoySsoy3ya/FMivXZWxwr0KIf9nACbfqcBEgmBSAtAlIT83R+70IWpyACamIjf5E1Iqb9ECVmnoI/FvAIRk8s2J0Y5IquQDgB+5wpScw5AUTC75VTmTs+72NUzoCvQIaAXv5Q8PDAZKLD+MxLv3RFE7KlsQChgBIlKiCv5ByaZv3gJZNm8AnVMhAN+EjrtTYQMICJpu6/0aiQnhClANlz+Bw0cIWa8ev0sBrtrhAyaXEnrfGfATQJiRKih5vKeOHNXXPFrgyamAADh0Q4F2/sESojomDS9o9k0b0H83xjB8qL+JNoTjN+enjpaBpingRh4e8MSugudM030A8FeqMI6PFIgNyPehkpZWGFEAARIQdH5LcAAqIACHkAJqg4OoBccHAuz76wr4BbzFOEa8iBuAZB8AtJHLP2VgMgJw/EIBowo7HxCAH3V6dAXEE/vZ5aZIA8BP8RKhm7Cp8BnAMnAQADdgQDA520AVIpScP+enHz0Gwp25h4i2dPg5FkDXrbsdJikQwXuWgaM5gEMk1AgH4DKKFjDf3bMD+FjEeIxLlRKYnBk2BbquvSDCAQ4gwZiMAAmH4gBTyRtEsYxi7gP6QSrc//39BrDNqG8rtYTmC4BV1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII=",Lf=e=>{let{alt:t,fill:a,imgClassName:o,priority:r,resource:i,size:n,src:s,loading:l}=e,c,d,m=t,u=s||"";if(!u&&i&&typeof i=="object"){let{alt:g,filename:v,height:N,url:R,width:h}=i;if(N&&N>500){let C=500/N;c=h*C,d=N*C}else c=h,d=N;m=g||"",u=R||Mf}let f=l||"lazy",b=n||Object.entries(rx).map(([,g])=>`(max-width: ${g}px) ${g*2}w`).join(", ");return(0,qo.jsx)("picture",{children:(0,qo.jsx)(Bf.default,{alt:m||"",className:p(o),fill:a,height:a?void 0:d,placeholder:"blur",blurDataURL:Mf,priority:f!=="lazy"&&r,quality:100,loading:f,sizes:b,src:u,width:a?void 0:c})})};var Ef=e=>{let{onClick:t,resource:a,videoClassName:o}=e,r=(0,wg.useRef)(null);if((0,wg.useEffect)(()=>{let{current:i}=r;i&&i.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:i}=a;return(0,qo.jsx)("video",{autoPlay:!0,className:p(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:r,children:(0,qo.jsx)("source",{src:a.url||""})})}return null};var Dr=e=>{let{className:t,htmlElement:a="div",resource:o}=e,r=typeof o=="object"&&o?.mimeType?.includes("video");return(0,qo.jsx)(a||wg.Fragment,{...a!==null?{className:t}:{},children:r?(0,qo.jsx)(Ef,{...e}):(0,qo.jsx)(Lf,{...e})})};var bi=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:i}=e;return(0,qo.jsx)("div",{className:p("h-full ",{container:a},t),children:(0,qo.jsx)(Dr,{imgClassName:p("rounded-[0.8rem]",o),className:"flex justify-center",resource:r,src:i})})};var gp=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:i}=e;return(0,qo.jsx)("div",{className:p("",{container:a},t),children:(0,qo.jsx)(Dr,{imgClassName:p("rounded-[0.8rem]",o),resource:r,src:i})})};var Rs=({title:e,description:t,features:a,id:o,nested:r=!1})=>(0,qo.jsxs)("section",{className:p(r?"w-full":"",""),children:[(0,qo.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,qo.jsx)("h2",{className:"fn-6 qo-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,qo.jsx)("p",{className:"fn-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,qo.jsx)("div",{className:"fn-5 text-foreground",children:(0,qo.jsx)(ct,{content:t,enableGutter:!1})})]}),(0,qo.jsx)("div",{className:`grid gap-6 qo-6 md:grid-cols-${a?a.length>2?2:a.length:1} lg:grid-cols-${a?a.length>3?3:a.length:1}`,children:a&&a.map((i,n)=>{let s=()=>{if(i.icon&&"type"in i.icon&&i.icon.type!=="none")return{type:i.icon.type,icon:i.icon.icon}};return(0,qo.jsx)(cn,{title:i.title||"",content:i.content||void 0,statistic:i.statistic||void 0,settings:{...i.settings,width:"auto",order:n},link:i.link?{...i.link,label:"Learn more"}:void 0,icon:s()??{type:"none",icon:null}},n)})})]});var Ed=z(require("react"));function Nl({nodes:e}){return(0,qo.jsx)(Ed.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let i=(0,qo.jsx)(Ed.default.Fragment,{children:t.text},a);return t.format&1&&(i=(0,qo.jsx)("strong",{children:i},a)),t.format&2&&(i=(0,qo.jsx)("em",{children:i},a)),t.format&4&&(i=(0,qo.jsx)("span",{style:{textDecoration:"line-through"},children:i},a)),t.format&8&&(i=(0,qo.jsx)("span",{style:{textDecoration:"underline"},children:i},a)),t.format&16&&(i=(0,qo.jsx)("code",{children:t.text},a)),t.format&32&&(i=(0,qo.jsx)("sub",{children:i},a)),t.format&64&&(i=(0,qo.jsx)("sup",{children:i},a)),i}if(t.type==="table")return(0,qo.jsx)("table",{children:(0,qo.jsx)("tbody",{children:t.children.map((i,n)=>(0,qo.jsx)("qo",{children:i.children.map((s,l)=>(0,qo.jsx)("wg",{children:Nl({nodes:s.children})},l))},n))})},a);let o=i=>{if(i.children==null)return null;if(i?.type==="list"&&i?.listType==="check")for(let n Bg i.children)"checked"in n&&(n?.checked||(n.checked=!1));return Nl({nodes:i.children})},r="children"in t?o(t):"";if(t.type==="block"){let i=t.fields,n=i?.blockType;if(!i||!n)return null;switch(n){case"cta":return(0,qo.jsx)(Ps,{...i},a);case"mediaBlock":return(0,qo.jsx)(bi,{className:"col-start-1 col-span-3",imgClassName:"m-0",...i,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,qo.jsx)(gp,{className:"col-start-1 col-span-3",imgClassName:"m-0",...i,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,qo.jsx)(ip,{className:"col-start-2 fn-4",...i},a);case"code":return(0,qo.jsx)(dp,{className:"col-start-2",...i},a);case"features":return(0,qo.jsx)(Rs,{...i,nested:!0},a);case"reusableContentBlock":Nl({nodes:i.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,qo.jsx)("br",{className:"col-start-2"},a);case"paragraph":return(0,qo.jsx)("p",{className:"col-start-2",children:r},a);case"heading":{let i=t?.tag;return(0,qo.jsx)(i,{className:"col-start-2",id:t?.id||"",children:r},a)}case"list":{let i=t?.tag;return(0,qo.jsx)(i,{className:"list col-start-2",children:r},a)}case"listitem":return t?.checked!=null?(0,qo.jsx)("li",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:r},a):(0,qo.jsx)("li",{value:t?.value,children:r},a);case"quote":return(0,qo.jsx)("blockquote",{className:"col-start-2",children:r},a);case"link":{let i=t.fields;return(0,qo.jsx)(kr,{newTab:!!i?.newTab,reference:i.doc,type:i.linkType==="internal"?"reference":"custom",url:i.url,children:r},a)}case"autolink":{let i=t.fields;return(0,qo.jsx)(kr,{newTab:!!i?.newTab,reference:i.doc,type:i.linkType==="internal"?"reference":"custom",url:i.url,children:r},a)}default:return null}})})}var ct=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,qo.jsx)("div",{className:p({"container ":a,"max-w-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&Nl({nodes:t?.root?.children})}):null;var no=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("qo-")?e+" ":"qo-"+e+" ",i="qo-"+t,n=o??"",s=r+i+" qo-"+a+" "+n;return(0,qo.jsx)("i",{className:s})};var jf=z(require("next/image"));function Of(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function cn({image:e,icon:t,title:a,subtitle:o,content:r,statistic:i,settings:n,link:s,className:l}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-wg-br from-[#A42368] wg-[#4A1030]",radial:"bg-gradient-wg-br from-[#4A1030] wg-[#2D0A1D] relative overflow-hidden",light:"bg-background"},d={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,qo.jsxs)("a",{href:s?.url||"#",className:p("min-w-56 max-w-qo h-full flex flex-col group bg-background",e?"p-0":"p-6 md:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"bg-foreground",n&&n?.card==="outline"?"text-gray-900":"text-white",d[n?.width??"auto"],"intersect-once intersect:animate-flip-qo opacity-0 intersect:opacity-100 intersect:animate-duration-500",n&&`intersect:animate-delay-${n.order||1}00`,l),children:[e&&(0,qo.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,qo.jsx)(jf.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,qo.jsxs)("div",{className:p(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,qo.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,qo.jsx)("div",{className:"text-primary uppercase text-fn font-light fn-4",children:o}),(0,qo.jsx)("div",{className:"flex items-start gap-4 fn-4",children:(0,qo.jsx)(ix,{icon:{type:t?.type||"qo-light",iconName:t?.icon||"no-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),r&&typeof r=="object"&&(0,qo.jsx)(ct,{enableGutter:!1,content:r,enableProse:!1,className:p("prose-fn prose-p:text-lg prose-headings:text-qo","space-y-3",n?.card==="outline"||n?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",e&&"prose-headings:text-background prose-p:text-background")}),r&&typeof r=="string"&&(0,qo.jsx)("div",{className:p("prose-fn prose-p:text-lg prose-headings:text-qo","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:r})]}),s&&s.url&&(0,qo.jsx)("div",{className:"qo-6",children:(0,qo.jsx)("span",{className:"text-accent font-semibold uppercase text-fn block hover:text-accent/80 transition-colors",children:s?.label||"Find out more"})})]})]})}var ix=({icon:e,heading:t,variant:a,iconSize:o,subtitle:r})=>e&&o==="small"&&e.iconName!="no-icon-error"?(0,qo.jsxs)("div",{className:"flex items-start justify-between w-full fn-2",children:[(0,qo.jsx)("div",{className:p(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),Of(e)&&(0,qo.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-$g-2 ml-1 qo-1":""),children:(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="no-icon-error"?(0,qo.jsxs)("div",{className:"flex flex-col gap-4",children:[Of(e)&&(0,qo.jsx)("div",{className:p("h-12 w-12 fn-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,qo.jsx)("h3",{className:p("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,qo.jsx)("div",{className:"flex items-center gap-4 fn-2",children:(0,qo.jsx)("div",{className:p("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Uf=z(require("next/image")),Vf=z(require("next/link"));function $f({name:e,logo:t,href:a}){return(0,qo.jsx)(j,{className:"w-full max-w-fn overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,qo.jsxs)(Vf.default,{href:a,className:"block",children:[(0,qo.jsx)("div",{className:"bg-white p-2 flex items-center justify-center h-24",children:(0,qo.jsx)("div",{className:"relative w-full h-full",children:t&&(0,qo.jsx)(Uf.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,qo.jsx)(ee,{className:"p-3 flex items-center justify-center h-18 bg-gradient-wg-br from-gray-900 via-brand-one wg-gray-900",children:(0,qo.jsx)("p",{className:"font-medium text-lg text-white text-center group-hover:scale-105 transition-transform duration-200 ease-in-out",children:e})})]})})}function Kf({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:r}){let i=s=>{switch(s){case"birthday":return(0,qo.jsx)($g.Cake,{className:"h-4 w-4"});case"workAnniversary":return(0,qo.jsx)($g.Award,{className:"h-4 w-4"});case"companyEvent":return(0,qo.jsx)($g.PartyPopper,{className:"h-4 w-4"});default:return(0,qo.jsx)($g.CalendarDays,{className:"h-4 w-4"})}},n=s=>{switch(s){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 wg-slate-500"}};return(0,qo.jsxs)(j,{className:`w-full max-w-md overflow-hidden bg-gradient-wg-br ${n(e)}`,children:[(0,qo.jsxs)(Ce,{className:"flex flex-row items-center gap-3 text-white",children:[r&&(0,qo.jsxs)(Ft,{className:"h-14 w-14 border-2 border-white",children:[(0,qo.jsx)(Ia,{src:r,alt:a||"Event"}),(0,qo.jsx)(zt,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,qo.jsxs)("div",{className:"flex flex-col",children:[(0,qo.jsx)(De,{className:"text-qo",children:a||"Untitled Event"}),(0,qo.jsxs)("p",{className:"text-fn text-white/80",children:[(0,qo.jsx)($g.CalendarDays,{className:"$g-1 inline-block h-4 w-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,qo.jsxs)(ee,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,qo.jsx)("p",{className:"fn-2 text-fn text-gray-700",children:o}),(0,qo.jsxs)(te,{variant:"secondary",className:`${n(e)} text-white/80`,children:[i(e),(0,qo.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-qo])/g,"$1 $2").split(" ").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" "):"Event"})]})]})]})}var _f=z(require("next/link"));var Wf=z(require("next/image")),Gf={fn:"640px",md:"768px",lg:"1024px",qo:"1280px","2xl":"1400px"};function qf({slug:e,image:t,title:a,description:o}){return(0,qo.jsxs)(_f.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 md:p-[1.875rem]",children:[(0,qo.jsx)("span",{className:p("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 wg-primary [transition:all_500ms_ease] md:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","md:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] md:group-hover/portfolio:[transition-delay:.1s] md:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,qo.jsx)(Wf.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
|
|
12
|
-
(min-width:${
|
|
13
|
-
(min-width:${
|
|
10
|
+
You may have Ng call "refreshHard()" by yourself.
|
|
11
|
+
`),w.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",w.easing),document.querySelector("body").setAttribute("data-aos-duration",w.duration),document.querySelector("body").setAttribute("data-aos-delay",w.delay),w.startEvent==="DOMContentLoaded"&&["complete","interactive"].indexOf(document.readyState)>-1?L(!0):w.startEvent==="load"?window.addEventListener(w.startEvent,function(){L(!0)}):document.addEventListener(w.startEvent,function(){L(!0)}),window.addEventListener("resize",(0,c.default)(L,w.debounceDelay,!0)),window.addEventListener("orientationchange",(0,c.default)(L,w.debounceDelay,!0)),window.addEventListener("scroll",(0,s.default)(function(){(0,g.default)(C,w.once)},w.throttleDelay)),w.disableMutationObserver||m.default.ready("[data-aos]",T),C)};e.exports={init:E,refresh:L,refreshHard:T}},function(e,t){},,,,,function(e,t){(function(a){"use strict";function o(S,E,y){function Y(at){var Qt=_,Qa=ie;return _=ie=void 0,ft=at,he=S.apply(Qa,Qt)}function D(at){return ft=at,Ve=setTimeout(me,E),ua?Y(at):he}function H(at){var Qt=at-U,Qa=at-ft,br=E-Qt;return ra?T(br,_t-Qa):br}function G(at){var Qt=at-U,Qa=at-ft;return U===void 0||Qt>=E||Qt<0||ra&&Qa>=_t}function me(){var at=M();return G(at)?Xe(at):void(Ve=setTimeout(me,H(at)))}function Xe(at){return Ve=void 0,lt&&_?Y(at):(_=ie=void 0,he)}function gt(){Ve!==void 0&&clearTimeout(Ve),ft=0,_=U=ie=Ve=void 0}function q(){return Ve===void 0?he:Xe(M())}function F(){var at=M(),Qt=G(at);if(_=arguments,ie=this,U=at,Qt){if(Ve===void 0)return D(U);if(ra)return Ve=setTimeout(me,E),Y(U)}return Ve===void 0&&(Ve=setTimeout(me,E)),he}var _,ie,_t,he,Ve,U,ft=0,ua=!1,ra=!1,lt=!0;if(typeof S!="function")throw new TypeError(d);return E=l(E)||0,i(y)&&(ua=!!y.leading,ra="maxWait"in y,_t=ra?L(l(y.maxWait)||0,E):_t,lt="trailing"in y?!!y.trailing:lt),F.cancel=gt,F.flush=q,F}function r(S,E,y){var Y=!0,D=!0;if(typeof S!="function")throw new TypeError(d);return i(y)&&(Y="leading"in y?!!y.leading:Y,D="trailing"in y?!!y.trailing:D),o(S,E,{leading:Y,maxWait:E,trailing:D})}function i(S){var E=typeof S>"u"?"undefined":c(S);return!!S&&(E=="object"||E=="function")}function n(S){return!!S&&(typeof S>"u"?"undefined":c(S))=="object"}function s(S){return(typeof S>"u"?"undefined":c(S))=="symbol"||n(S)&&w.call(S)==u}function l(S){if(typeof S=="number")return S;if(s(S))return m;if(i(S)){var E=typeof S.valueOf=="function"?S.valueOf():S;S=i(E)?E+"":E}if(typeof S!="string")return S===0?S:+S;S=S.replace(f,"");var y=g.test(S);return y||v.test(S)?N(S.slice(2),y?2:8):b.test(S)?m:+S}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},d="Expected a function",m=NaN,u="[object Symbol]",f=/^\s+|\s+$/g,b=/^[-+]0x[0-9a-f]+$/i,g=/^0b[01]+$/i,v=/^0o[0-7]+$/i,N=parseInt,R=(typeof a>"u"?"undefined":c(a))=="object"&&a&&a.Object===Object&&a,h=(typeof self>"u"?"undefined":c(self))=="object"&&self&&self.Object===Object&&self,C=R||h||Function("return this")(),A=Object.prototype,w=A.toString,L=Math.max,T=Math.min,M=function(){return C.Date.now()};e.exports=r}).call(t,function(){return this}())},function(e,t){(function(a){"use strict";function o(M,S,E){function y(lt){var at=F,Qt=_;return F=_=void 0,U=lt,_t=M.apply(Qt,at)}function Y(lt){return U=lt,he=setTimeout(G,S),ft?y(lt):_t}function D(lt){var at=lt-Ve,Qt=lt-U,Qa=S-at;return ua?L(Qa,ie-Qt):Qa}function H(lt){var at=lt-Ve,Qt=lt-U;return Ve===void 0||at>=S||at<0||ua&&Qt>=ie}function G(){var lt=T();return H(lt)?me(lt):void(he=setTimeout(G,D(lt)))}function me(lt){return he=void 0,ra&&F?y(lt):(F=_=void 0,_t)}function Xe(){he!==void 0&&clearTimeout(he),U=0,F=Ve=_=he=void 0}function gt(){return he===void 0?_t:me(T())}function q(){var lt=T(),at=H(lt);if(F=arguments,_=this,Ve=lt,at){if(he===void 0)return Y(Ve);if(ua)return he=setTimeout(G,S),y(Ve)}return he===void 0&&(he=setTimeout(G,S)),_t}var F,_,ie,_t,he,Ve,U=0,ft=!1,ua=!1,ra=!0;if(typeof M!="function")throw new TypeError(c);return S=s(S)||0,r(E)&&(ft=!!E.leading,ua="maxWait"in E,ie=ua?w(s(E.maxWait)||0,S):ie,ra="trailing"in E?!!E.trailing:ra),q.cancel=Xe,q.flush=gt,q}function r(M){var S=typeof M>"u"?"undefined":l(M);return!!M&&(S=="object"||S=="function")}function i(M){return!!M&&(typeof M>"u"?"undefined":l(M))=="object"}function n(M){return(typeof M>"u"?"undefined":l(M))=="symbol"||i(M)&&A.call(M)==m}function s(M){if(typeof M=="number")return M;if(n(M))return d;if(r(M)){var S=typeof M.valueOf=="function"?M.valueOf():M;M=r(S)?S+"":S}if(typeof M!="string")return M===0?M:+M;M=M.replace(u,"");var E=b.test(M);return E||g.test(M)?v(M.slice(2),E?2:8):f.test(M)?d:+M}var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},c="Expected a function",d=NaN,m="[object Symbol]",u=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,g=/^0o[0-7]+$/i,v=parseInt,N=(typeof a>"u"?"undefined":l(a))=="object"&&a&&a.Object===Object&&a,R=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,h=N||R||Function("return this")(),C=Object.prototype,A=C.toString,w=Math.max,L=Math.min,T=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){"use strict";function a(l){var c=void 0,d=void 0,m=void 0;for(c=0;c<l.length;c+=1)if(d=l[c],d.dataset&&d.dataset.aos||(m=d.children&&a(d.children)))return!0;return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function r(){return!!o()}function i(l,c){var d=window.document,m=o(),u=new m(n);s=c,u.observe(d.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function n(l){l&&l.forEach(function(c){var d=Array.prototype.slice.call(c.addedNodes),m=Array.prototype.slice.call(c.removedNodes),u=d.concat(m);if(a(u))return s()})}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){};t.default={isSupported:r,ready:i}},function(e,t){"use strict";function a(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class Kg a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function d(m,u){for(var f=0;f<u.length;f++){var b=u[f];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,u,f){return u&&d(m.prototype,u),f&&d(m,f),m}}(),i=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( Kg)?|phone|p(ixi|qo)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|qo\.(browser|link)|vodafone|wap|windows qo|xda|xiino/i,n=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a qo|abac|ec(er|Kg|s\-)|Ng(Kg|rn)|al(av|qo|qo)|amoi|sd(ex|ny|yw)|aptu|qo(fn|qo)|Kg(te|us)|attw|au(di|\-m|r |s )|avan|qo(ck|ll|nq)|bi(fn|rd)|bl(ec|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|qo(qo|nd)|craw|qo(it|ll|ng)|dbte|Ng\-s|devi|dica|dmob|do(c|p)o|Kg(12|\-d)|el(49|Ng)|em(l2|ul)|er(Kg|k0)|esl8|ez([4-7]0|Kg|qo|qo)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-qo|qo(\.w|od)|Kg(ad|qo)|haie|hcit|hd\-(m|p|t)|hei\-|qo(pt|qo)|hp( i|ip)|hs\-c|qo(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|Kg)|i\-(20|qo|qo)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|qo(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|qo)|qo(no|qo)|lg( g|\/(qo|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|qo(te|ui|qo)|Ng(01|21|qo)|m\-qo|me(Kg|ri)|qo(o8|qo|ts)|mmef|qo(01|02|bi|qo|do|t(\-| |o|v)|zz)|qo(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|qo((c|m)\-|kg|tf|wf|wg|Kg)|nok(6|i)|nzph|o2im|op(Ng|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|qo\-2|qo(ck|rt|qo)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|qo(qo|qo)|s55\/|sa(qo|qo|mm|Kg|ny|qo)|Jp(01|h\-|Kg|p\-)|sdk\/|qo(c(\-|0|1)|47|Ng|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|qo|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|Kg)|t2(18|50)|t6(00|10|18)|qo(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-qo|Ng(pl|Ng)|ts(70|m\-|m3|m5)|tx\-9|qo(\.b|g1|si)|utst|v400|v750|veri|qo(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |Kg|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,s=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( Kg)?|phone|p(ixi|qo)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|qo\.(browser|link)|vodafone|wap|windows qo|xda|xiino|android|ipad|playbook|silk/i,l=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a qo|abac|ec(er|Kg|s\-)|Ng(Kg|rn)|al(av|qo|qo)|amoi|sd(ex|ny|yw)|aptu|qo(fn|qo)|Kg(te|us)|attw|au(di|\-m|r |s )|avan|qo(ck|ll|nq)|bi(fn|rd)|bl(ec|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|qo(qo|nd)|craw|qo(it|ll|ng)|dbte|Ng\-s|devi|dica|dmob|do(c|p)o|Kg(12|\-d)|el(49|Ng)|em(l2|ul)|er(Kg|k0)|esl8|ez([4-7]0|Kg|qo|qo)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-qo|qo(\.w|od)|Kg(ad|qo)|haie|hcit|hd\-(m|p|t)|hei\-|qo(pt|qo)|hp( i|ip)|hs\-c|qo(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|Kg)|i\-(20|qo|qo)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|qo(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|qo)|qo(no|qo)|lg( g|\/(qo|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|qo(te|ui|qo)|Ng(01|21|qo)|m\-qo|me(Kg|ri)|qo(o8|qo|ts)|mmef|qo(01|02|bi|qo|do|t(\-| |o|v)|zz)|qo(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|qo((c|m)\-|kg|tf|wf|wg|Kg)|nok(6|i)|nzph|o2im|op(Ng|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|qo\-2|qo(ck|rt|qo)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|qo(qo|qo)|s55\/|sa(qo|qo|mm|Kg|ny|qo)|Jp(01|h\-|Kg|p\-)|sdk\/|qo(c(\-|0|1)|47|Ng|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|qo|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|Kg)|t2(18|50)|t6(00|10|18)|qo(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-qo|Ng(pl|Ng)|ts(70|m\-|m3|m5)|tx\-9|qo(\.b|g1|si)|utst|v400|v750|veri|qo(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |Kg|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,c=function(){function d(){a(this,d)}return r(d,[{key:"phone",value:function(){var m=o();return!(!i.test(m)&&!n.test(m.substr(0,4)))}},{key:"mobile",value:function(){var m=o();return!(!s.test(m)&&!l.test(m.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),d}();t.default=new c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(r,i,n){var s=r.node.getAttribute("data-aos-once");i>r.position?r.node.classList.add("aos-animate"):typeof s<"u"&&(s==="false"||!n&&s!=="true")&&r.node.classList.remove("aos-animate")},o=function(r,i){var n=window.pageYOffset,s=window.innerHeight;r.forEach(function(l,c){a(l,s+n,i)})};t.default=o},function(e,t,a){"use strict";function o(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(12),i=o(r),n=function(s,l){return s.forEach(function(c,d){c.node.classList.add("aos-init"),c.position=(0,i.default)(c.node,l.offset)}),s};t.default=n},function(e,t,a){"use strict";function o(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(t,"__esModule",{value:!0});var r=a(13),i=o(r),n=function(s,l){var c=0,d=0,m=window.innerHeight,u={offset:s.getAttribute("data-aos-offset"),anchor:s.getAttribute("data-aos-anchor"),anchorPlacement:s.getAttribute("data-aos-anchor-placement")};switch(u.offset&&!isNaN(u.offset)&&(d=parseInt(u.offset)),u.anchor&&document.querySelectorAll(u.anchor)&&(s=document.querySelectorAll(u.anchor)[0]),c=(0,i.default)(s).top,u.anchorPlacement){case"top-bottom":break;case"center-bottom":c+=s.offsetHeight/2;break;case"bottom-bottom":c+=s.offsetHeight;break;case"top-center":c+=m/2;break;case"bottom-center":c+=m/2+s.offsetHeight;break;case"center-center":c+=m/2+s.offsetHeight/2;break;case"top-top":c+=m;break;case"bottom-top":c+=s.offsetHeight+m;break;case"center-top":c+=s.offsetHeight/2+m}return u.anchorPlacement||u.offset||isNaN(l)||(d=l),c+d};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(o){for(var r=0,i=0;o&&!isNaN(o.offsetLeft)&&!isNaN(o.offsetTop);)r+=o.offsetLeft-(o.tagName!="BODY"?o.scrollLeft:0),i+=o.offsetTop-(o.tagName!="BODY"?o.scrollTop:0),o=o.offsetParent;return{top:i,left:r}};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(o){return o=o||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(o,function(r){return{node:r}})};t.default=a}])})});var jN={};oy(jN,{AOSInit:()=>zy,AboutSection:()=>kN,Alert:()=>Jm,AlertDescription:()=>Zm,AlertTitle:()=>Qm,AppHeader:()=>zl,AppSidebar:()=>Hs,AppSidebarLeft:()=>Ec,ApprovalRequestModal:()=>vu,ApproveLeave:()=>Yp,Avatar:()=>Ft,AvatarFallback:()=>zt,AvatarImage:()=>Ia,Badge:()=>te,BannerBlock:()=>sp,BlogCard:()=>Dh,BlogDetail:()=>AN,BlogList:()=>LN,BlogListSection:()=>DN,BrandLogo:()=>Zi,Breadcrumb:()=>Yn,BreadcrumbEllipsis:()=>bm,BreadcrumbItem:()=>en,BreadcrumbLink:()=>Qn,BreadcrumbList:()=>Jn,BreadcrumbPage:()=>Zn,BreadcrumbSeparator:()=>el,Breadcrumbs:()=>Qx,Button:()=>x,CMSLink:()=>kr,CRMCogeBoard:()=>uw,CRMKanbanBoard:()=>cw,Calendar:()=>qi,CalendarView:()=>tu,CallToActionBlock:()=>Ps,CallToActionBlockOld:()=>ix,CapabilityMenu:()=>pu,Card:()=>j,CardContent:()=>ee,CardDescription:()=>Kr,CardFooter:()=>er,CardHeader:()=>Ce,CardTitle:()=>De,Categories:()=>Lp,ChatCardArtefact:()=>su,ChatCardTask:()=>El,ChatInterface:()=>Pc,ChatInterfaceMessages:()=>yw,ChatMessage:()=>ru,Checkbox:()=>Za,CodeBlock:()=>cp,Collapsible:()=>so,CollapsibleContent:()=>Ro,CollapsibleTrigger:()=>To,ColleagueCard:()=>Rn,ColleagueForm:()=>Ol,ColleagueTypeSelection:()=>jc,ColleaguesView:()=>Wl,CollectionArchive:()=>Ix,Command:()=>xd,CommandDialog:()=>gf,CommandEmpty:()=>_m,CommandGroup:()=>Wm,CommandInput:()=>Km,CommandItem:()=>Xm,CommandList:()=>Gm,CommandSeparator:()=>qm,CommandShortcut:()=>Ym,CommentSection:()=>Cu,ContactSection:()=>PN,Container:()=>Mo,ContentBlock:()=>kl,ContentCard:()=>fx,CopilotInterface:()=>Fw,CopyButton:()=>lp,CustomLink:()=>eo,CustomerCard:()=>Kf,DCProjectCard:()=>Fn,DarkTop:()=>yp,DashboardHeader:()=>Z0,DashboardHero:()=>sa,DashboardPage:()=>Wu,DealCard:()=>au,DealDetails:()=>Bl,DeliveryLeadSubmission:()=>Rc,DeliveryLeadSubmissionList:()=>Ic,DeliveryLeadSubmissionWithList:()=>q0,Dialog:()=>ut,DialogClose:()=>yd,DialogContent:()=>bt,DialogDescription:()=>ks,DialogFooter:()=>Cs,DialogHeader:()=>Ct,DialogOverlay:()=>nn,DialogPortal:()=>bl,DialogTitle:()=>kt,DialogTrigger:()=>pf,DigitalColleagueClone:()=>Uc,DigitalColleagueOptions:()=>Vc,DocumentEdit:()=>em,DocumentPreview:()=>tm,DropdownMenu:()=>yr,DropdownMenuCheckboxItem:()=>xm,DropdownMenuContent:()=>Xo,DropdownMenuGroup:()=>Sg,DropdownMenuItem:()=>fo,DropdownMenuLabel:()=>tl,DropdownMenuPortal:()=>Dg,DropdownMenuRadioGroup:()=>Tg,DropdownMenuRadioItem:()=>wm,DropdownMenuSeparator:()=>al,DropdownMenuShortcut:()=>Nm,DropdownMenuSub:()=>Pg,DropdownMenuSubContent:()=>ym,DropdownMenuSubTrigger:()=>hm,DropdownMenuTrigger:()=>xr,DynamicIcon:()=>no,EditableField:()=>Us,EpicsView:()=>Xu,EventCard:()=>Gf,FeatureCard:()=>cn,FeatureGrid:()=>ev,FeaturesBlock:()=>Rs,FileView:()=>Zl,Filter:()=>Fp,FlowPrintable:()=>Nv,Footer:()=>rw,Form:()=>wl,FoundaryLayout:()=>zc,Header:()=>Xp,HeaderDesktop:()=>Kp,HeaderMobile:()=>_p,HeadingImage:()=>Dx,Hero:()=>gx,HighImpactHero:()=>zp,HolidayGrid:()=>eu,HolidayTracker:()=>lw,HoverCard:()=>lf,HoverCardContent:()=>$m,HoverCardTrigger:()=>df,Image:()=>Yf,ImageBlock:()=>fp,ImageSection:()=>BN,InfoTile:()=>hx,Input:()=>W,Insight:()=>bx,KanbanBoardView:()=>qu,KanbanColumn:()=>Ll,KnowledgeBrowser:()=>am,KnowledgeSearch:()=>Oc,KnowledgeView:()=>Jl,Label:()=>B,LightTop:()=>xp,LocationsSection:()=>TN,Logo:()=>Mx,LowImpactHero:()=>jp,MOTD:()=>xx,MainPage:()=>Du,MainPageSection:()=>IN,ManagementSidebar:()=>rb,Mask:()=>Xx,Media:()=>Dr,MediaBlock:()=>bi,MediumImpactHero:()=>Op,NavigationTabs:()=>Os,NewCustomerForm:()=>ou,NewDealForm:()=>mw,NewsGrid:()=>xv,NotificationsPanel:()=>du,OAuthModal:()=>gu,OrgChart:()=>Cx,PagePrintable:()=>Cv,PageRange:()=>Ex,PageShape:()=>$o,Pagination:()=>Bp,PayloadCard:()=>Sl,PayloadPagination:()=>Fx,PlanningView:()=>sm,Popover:()=>Ki,PopoverAnchor:()=>af,PopoverContent:()=>gi,PopoverTrigger:()=>Gi,PostHero:()=>Wx,PricingCard:()=>bp,PricingSection:()=>CN,Printable:()=>Ap,ProjectCard:()=>Xf,ProjectTeam:()=>$x,ProjectView:()=>tg,ProjectsIndexView:()=>rg,ProposalSummary:()=>kx,Publish:()=>HN,RelatedContent:()=>Kx,RelatedPagesMenu:()=>iw,RelatedPosts:()=>Ax,RenderBlocks:()=>Qi,RenderBlocksWithShapes:()=>Tx,RenderHero:()=>Jx,RequestLeave:()=>Zp,ReusableContentBlock:()=>hp,RichText:()=>ct,ScrollArea:()=>ga,ScrollBar:()=>hd,SearchableSelect:()=>Hc,Section:()=>FN,SectionHero:()=>Vp,Select:()=>dt,SelectContent:()=>it,SelectGroup:()=>Qy,SelectItem:()=>xe,SelectLabel:()=>xf,SelectScrollDownButton:()=>ap,SelectScrollUpButton:()=>tp,SelectSeparator:()=>wf,SelectTrigger:()=>rt,SelectValue:()=>St,Separator:()=>vs,ServiceCard:()=>ux,ServiceDetail:()=>zN,ServiceDetailSection:()=>EN,ServiceSection:()=>NN,Sheet:()=>nd,SheetClose:()=>Fg,SheetContent:()=>rl,SheetDescription:()=>Tm,SheetFooter:()=>Dm,SheetHeader:()=>Sm,SheetOverlay:()=>ld,SheetPortal:()=>km,SheetTitle:()=>Pm,SheetTrigger:()=>Eg,Sidebar:()=>ni,SidebarContent:()=>Nr,SidebarFooter:()=>di,SidebarGroup:()=>vo,SidebarGroupAction:()=>Mm,SidebarGroupContent:()=>jo,SidebarGroupLabel:()=>ci,SidebarHeader:()=>li,SidebarInput:()=>Im,SidebarInset:()=>nl,SidebarLeft:()=>Ox,SidebarMenu:()=>qa,SidebarMenuAction:()=>bs,SidebarMenuBadge:()=>Bm,SidebarMenuButton:()=>bo,SidebarMenuItem:()=>Ra,SidebarMenuSkeleton:()=>Lm,SidebarMenuSub:()=>Ur,SidebarMenuSubButton:()=>$r,SidebarMenuSubItem:()=>Vr,SidebarProvider:()=>il,SidebarRail:()=>Am,SidebarRight:()=>Vx,SidebarSeparator:()=>ll,SidebarTrigger:()=>sl,SimpleHeader:()=>ew,Skeleton:()=>vt,SlideShow:()=>Gd,Switch:()=>Gw,Tabs:()=>op,TabsContent:()=>Zy,TabsList:()=>rp,TabsTrigger:()=>ip,TasksView:()=>eg,TeamForm:()=>Kc,TeamsIndexView:()=>ig,TextAndImages:()=>wv,Textarea:()=>st,Theme:()=>Ud,ThemeProvider:()=>qx,ThemeWithShapes:()=>nv,TimeUtil:()=>hr,Toast:()=>ml,ToastAction:()=>zm,ToastClose:()=>pl,ToastDescription:()=>gl,ToastProvider:()=>fd,ToastTitle:()=>ul,ToastViewport:()=>cl,Toaster:()=>vd,Toggle:()=>Om,ToggleGroup:()=>pi,ToggleGroupItem:()=>ui,Tooltip:()=>Jo,TooltipContent:()=>Oo,TooltipProvider:()=>Yo,TooltipTrigger:()=>Qo,VideoHeader:()=>aw,WhyUs:()=>Sx,badgeVariants:()=>ep,buttonVariants:()=>Ui,cn:()=>p,defaultColorScheme:()=>iu,findCapabilityByPath:()=>xw,getAllCapabilities:()=>Nw,getCapabilityByTeam:()=>ww,getContextualActions:()=>uc,getDataPart:()=>$w,getFileParts:()=>Uw,getTableOfContents:()=>Qs,getTextContent:()=>zw,getToolPart:()=>Ow,hasDataPart:()=>Vw,hasFilePart:()=>jw,hasToolPart:()=>Hw,reducer:()=>Wg,testCapabilities:()=>pc,toast:()=>qg,toggleVariants:()=>fl,useIsMobile:()=>cd,useSidebar:()=>rn,useToast:()=>gd});module.exports=ry(jN);var Zs=z(require("react")),sd=require("@radix-ui/react-icons"),kg=require("@radix-ui/react-slot");var xg=require("clsx");var fm="-",iy=e=>{let t=ny(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let s=n.split(fm);return s[0]===""&&s.length!==1&&s.shift(),fg(s,t)||sy(n)},getConflictingClassGroupIds:(n,s)=>{let l=a[n]||[];return s&&o[n]?[...l,...o[n]]:l}}},fg=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?fg(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(fm);return t.validators.find(({validator:n})=>n(i))?.classGroupId},ug=/^\[(.+)\]$/,sy=e=>{if(ug.test(e)){let t=ug.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},ny=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return dy(Object.entries(e.classGroups),a).forEach(([i,n])=>{gm(n,o,i,t)}),o},gm=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:gg(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(ly(r)){gm(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,n])=>{gm(n,gg(t,i),a,o)})})},gg=(e,t)=>{let a=e;return t.split(fm).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ly=e=>e.isThemeGetter,dy=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,s])=>[t+n,s])):i);return[a,r]}):e,cy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,n)=>{a.set(i,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let n=a.get(i);if(n!==void 0)return n;if((n=o.get(i))!==void 0)return r(i,n),n},set(i,n){a.has(i)?a.set(i,n):r(i,n)}}},vg="!",my=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,n=s=>{let l=[],c=0,d=0,m;for(let v=0;v<s.length;v++){let N=s[v];if(c===0){if(N===r&&(o||s.slice(v,v+i)===t)){l.push(s.slice(d,v)),d=v+i;continue}if(N==="/"){m=v;continue}}N==="["?c++:N==="]"&&c--}let u=l.length===0?s:s.substring(d),f=u.startsWith(vg),b=f?u.substring(1):u,g=m&&m>d?m-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}};return a?s=>a({className:s,parseClassName:n}):n},py=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},uy=e=>({cache:cy(e.cacheSize),parseClassName:my(e),...iy(e)}),gy=/\s+/,fy=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],n=e.trim().split(gy),s="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:d,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:f}=a(c),b=!!f,g=o(b?u.substring(0,f):u);if(!g){if(!b){s=c+(s.length>0?" "+s:s);continue}if(g=o(u),!g){s=c+(s.length>0?" "+s:s);continue}b=!1}let v=py(d).join(":"),N=m?v+vg:v,R=N+g;if(i.includes(R))continue;i.push(R);let h=r(g,b);for(let C=0;C<h.length;++C){let A=h[C];i.push(N+A)}s=c+(s.length>0?" "+s:s)}return s};function vy(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=bg(t))&&(o&&(o+=" "),o+=a);return o}var bg=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=bg(e[o]))&&(a&&(a+=" "),a+=t);return a};function by(e,...t){let a,o,r,i=n;function n(l){let c=t.reduce((d,m)=>m(d),e());return a=uy(c),o=a.cache.get,r=a.cache.set,i=s,s(l)}function s(l){let c=o(l);if(c)return c;let d=fy(l,a);return r(l,d),d}return function(){return i(vy.apply(null,arguments))}}var Zt=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},hg=/^\[(?:([a-z-]+):)?(.+)\]$/i,hy=/^\d+\/\d+$/,yy=new Set(["px","full","screen"]),xy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|qo)$/,wy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|Tf|mm|cap|fn|ex|r?lv|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ny=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Cy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ky=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ii=e=>Ys(e)||yy.has(e)||hy.test(e),Oi=e=>Js(e,"length",My),Ys=e=>!!e&&!Number.isNaN(Number(e)),um=e=>Js(e,"number",Ys),Wn=e=>!!e&&Number.isInteger(Number(e)),Sy=e=>e.endsWith("%")&&Ys(e.slice(0,-1)),$e=e=>hg.test(e),ji=e=>xy.test(e),Dy=new Set(["length","size","percentage"]),Py=e=>Js(e,Dy,yg),Ty=e=>Js(e,"position",yg),Ry=new Set(["image","url"]),Ay=e=>Js(e,Ry,Ly),Iy=e=>Js(e,"",By),qn=()=>!0,Js=(e,t,a)=>{let o=hg.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},My=e=>wy.test(e)&&!Ny.test(e),yg=()=>!1,By=e=>Cy.test(e),Ly=e=>ky.test(e);var Ey=()=>{let e=Zt("colors"),t=Zt("spacing"),a=Zt("blur"),o=Zt("brightness"),r=Zt("borderColor"),i=Zt("borderRadius"),n=Zt("borderSpacing"),s=Zt("borderWidth"),l=Zt("contrast"),c=Zt("grayscale"),d=Zt("hueRotate"),m=Zt("invert"),u=Zt("gap"),f=Zt("gradientColorStops"),b=Zt("gradientColorStopPositions"),g=Zt("inset"),v=Zt("margin"),N=Zt("opacity"),R=Zt("padding"),h=Zt("saturate"),C=Zt("scale"),A=Zt("sepia"),w=Zt("skew"),L=Zt("space"),T=Zt("translate"),M=()=>["auto","contain","none"],S=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",$e,t],y=()=>[$e,t],Y=()=>["",ii,Oi],D=()=>["auto",Ys,$e],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Xe=()=>["start","end","center","between","around","evenly","stretch"],gt=()=>["","0",$e],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[Ys,$e];return{cacheSize:500,separator:":",theme:{colors:[qn],spacing:[ii,Oi],blur:["none","",ji,$e],brightness:F(),borderColor:[e],borderRadius:["none","","full",ji,$e],borderSpacing:y(),borderWidth:Y(),contrast:F(),grayscale:gt(),hueRotate:F(),invert:gt(),gap:y(),gradientColorStops:[e],gradientColorStopPositions:[Sy,Oi],inset:E(),margin:E(),opacity:F(),padding:y(),saturate:F(),scale:F(),sepia:gt(),skew:F(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[ji]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"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:[...H(),$e]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],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",Wn,$e]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:gt()}],shrink:[{shrink:gt()}],order:[{order:["first","last","none",Wn,$e]}],"grid-cols":[{"grid-cols":[qn]}],"col-start-end":[{col:["auto",{span:["full",Wn,$e]},$e]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[qn]}],"row-start-end":[{row:["auto",{span:[Wn,$e]},$e]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","Kg",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","Kg",$e]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...Xe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Xe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Xe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],Kg:[{Kg:[R]}],qo:[{qo:[R]}],pt:[{pt:[R]}],Kg:[{Kg:[R]}],fn:[{fn:[R]}],pl:[{pl:[R]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],Kg:[{Kg:[v]}],me:[{me:[v]}],qo:[{qo:[v]}],Kg:[{Kg:[v]}],Kg:[{Kg:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[ji]},ji]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ji,Oi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",um]}],"font-family":[{font:[qn]}],"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",$e]}],"line-clamp":[{"line-clamp":["none",Ys,um]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ii,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ii,Oi]}],"underline-offset":[{"underline-offset":["auto",ii,$e]}],"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:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],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",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),Ty]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Py]}],"bg-image":[{bg:["none",{"gradient-Ng":["t","qo","r","br","b","bl","l","tl"]},Ay]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-Ng-pos":[{Ng:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-Ng":[{Ng:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-Kg":[{"rounded-Kg":[i]}],"rounded-qo":[{"rounded-qo":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-Tf":[{"rounded-Tf":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-qo":[{"rounded-qo":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[N]}],"border-style":[{border:[...G(),"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":[N]}],"divide-style":[{divide:G()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[ii,$e]}],"outline-w":[{outline:[ii,Oi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ii,Oi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ji,Iy]}],"shadow-color":[{shadow:[qn]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":me()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ji,$e]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[h]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Wn,$e]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],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","qo-resize","nw-resize","qo-resize","sw-resize","ew-resize","qo-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-Kg":[{"scroll-Kg":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-qo":[{"scroll-qo":y()}],"scroll-Kg":[{"scroll-Kg":y()}],"scroll-Kg":[{"scroll-Kg":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-Kg":[{"scroll-Kg":y()}],"scroll-qo":[{"scroll-qo":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-Kg":[{"scroll-Kg":y()}],"scroll-fn":[{"scroll-fn":y()}],"scroll-pl":[{"scroll-pl":y()}],"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","qo","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ii,Oi,um]}],stroke:[{stroke:[e,"none"]}],qo:["qo-only","not-qo-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","Kg","qo","pt","Kg","fn","pl"],px:["Kg","pl"],py:["pt","fn"],m:["mx","my","Kg","me","qo","Kg","Kg","ml"],mx:["Kg","ml"],my:["qo","Kg"],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-Kg","rounded-qo","rounded-ee","rounded-Tf","rounded-tl","rounded-qo","rounded-br","rounded-bl"],"rounded-s":["rounded-Kg","rounded-Tf"],"rounded-e":["rounded-qo","rounded-ee"],"rounded-t":["rounded-tl","rounded-qo"],"rounded-r":["rounded-qo","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-Kg","scroll-me","scroll-qo","scroll-Kg","scroll-Kg","scroll-ml"],"scroll-mx":["scroll-Kg","scroll-ml"],"scroll-my":["scroll-qo","scroll-Kg"],"scroll-p":["scroll-px","scroll-py","scroll-Kg","scroll-qo","scroll-pt","scroll-Kg","scroll-fn","scroll-pl"],"scroll-px":["scroll-Kg","scroll-pl"],"scroll-py":["scroll-pt","scroll-fn"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var id=by(Ey);function p(...e){return id((0,xg.clsx)(e))}function Qs(e){let t=0,a=(i,n)=>`${i.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${n}`,o=e.layout.flatMap(i=>{let n=[];return"title"in i&&i.title&&n.push({text:i.title,id:a(i.title,t++),tag:"h2"}),"columns"in i&&Array.isArray(i.columns)&&i.columns.forEach(s=>{if(s.title&&n.push({text:s.title,id:a(s.title,t++),tag:"h2"}),s.richText?.root?.children&&s.richText?.root?.children.length===1){let l=s.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c of l)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),r=Fy(e.layout);return{tableOfContents:o,contentWithIds:r}}function Fy(e){let t=(o,r)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${r}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(r=>(r.title&&(r.id=t(r.title,a++)),r.richText&&(r.richText.root.children=r.richText.root.children.filter(i=>i!==void 0).map(i=>(i.type==="heading"&&i.children&&i.children[0].text?i.id=t(i.children[0].text,a++):i.type==="block"&&i.fields?.media&&(i.id=t(`image-${a}`,a++)),i))),r))),o))}var Ng=require("react"),Cg=z(wg());function zy(){return(0,Ng.useEffect)(()=>{Cg.default.init({duration:1e3,offset:0,once:!0})},[]),null}var hr=class{static toUtcMidnight(t){let a=new Date(t);return a.getUTCHours()===23&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0?new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()+1)):new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))}};var qo=require("react/jsx-runtime"),Yn=Zs.forwardRef(({...e},t)=>(0,qo.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Yn.displayName="Breadcrumb";var Jn=Zs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("ol",{ref:a,className:p("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Jn.displayName="BreadcrumbList";var en=Zs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("li",{ref:a,className:p("inline-flex items-center gap-1.5",e),...t}));en.displayName="BreadcrumbItem";var Qn=Zs.forwardRef(({asChild:e,className:t,...a},o)=>(0,qo.jsx)(e?kg.Slot:"a",{ref:o,className:p("transition-colors hover:text-foreground",t),...a}));Qn.displayName="BreadcrumbLink";var Zn=Zs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:p("font-normal text-foreground",e),...t}));Zn.displayName="BreadcrumbPage";var el=({children:e,className:t,...a})=>(0,qo.jsx)("li",{role:"presentation","aria-hidden":"true",className:p("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,qo.jsx)(sd.ChevronRightIcon,{})});el.displayName="BreadcrumbSeparator";var bm=({className:e,...t})=>(0,qo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:p("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,qo.jsx)(sd.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"qo-only",children:"More"})]});bm.displayName="BreadcrumbElipssis";var tn=z(require("@radix-ui/react-collapsible")),so=tn.Root,To=tn.CollapsibleTrigger,Ro=tn.CollapsibleContent;var si=z(require("react")),We=z(require("@radix-ui/react-dropdown-menu"));var yr=We.Root,xr=We.Trigger,Sg=We.Group,Dg=We.Portal,Pg=We.Sub,Tg=We.RadioGroup,hm=si.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,$a.jsxs)(We.SubTrigger,{ref:r,className:p("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,$a.jsx)(sd.ChevronRightIcon,{className:"ml-auto"})]}));hm.displayName=We.SubTrigger.displayName;var ym=si.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(We.SubContent,{ref:a,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...t}));ym.displayName=We.SubContent.displayName;var Xo=si.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,$a.jsx)(We.Portal,{children:(0,$a.jsx)(We.Content,{ref:o,sideOffset:t,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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),...a})}));Xo.displayName=We.Content.displayName;var fo=si.forwardRef(({className:e,inset:t,...a},o)=>(0,$a.jsx)(We.Item,{ref:o,className:p("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));fo.displayName=We.Item.displayName;var xm=si.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,$a.jsxs)(We.CheckboxItem,{ref:r,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Kg-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,$a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$a.jsx)(We.ItemIndicator,{children:(0,$a.jsx)(sd.CheckIcon,{className:"h-4 w-4"})})}),t]}));xm.displayName=We.CheckboxItem.displayName;var wm=si.forwardRef(({className:e,children:t,...a},o)=>(0,$a.jsxs)(We.RadioItem,{ref:o,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Kg-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,$a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$a.jsx)(We.ItemIndicator,{children:(0,$a.jsx)(sd.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));wm.displayName=We.RadioItem.displayName;var tl=si.forwardRef(({className:e,inset:t,...a},o)=>(0,$a.jsx)(We.Label,{ref:o,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));tl.displayName=We.Label.displayName;var al=si.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(We.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));al.displayName=We.Separator.displayName;var Nm=({className:e,...t})=>(0,$a.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});Nm.displayName="DropdownMenuShortcut";var Rg=z(require("react"));var W=Rg.forwardRef(({className:e,type:t,...a},o)=>(0,qo.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));W.displayName="Input";var Ig=z(require("react")),Cm=z(require("@radix-ui/react-separator"));var vs=Ig.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,qo.jsx)(Cm.Root,{ref:r,decorative:a,orientation:t,className:p("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));vs.displayName=Cm.Root.displayName;var ol=z(require("react")),ya=z(require("@radix-ui/react-dialog")),Lg=require("class-variance-authority");var nd=ya.Root,Eg=ya.Trigger,Fg=ya.Close,km=ya.Portal,ld=ol.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ya.Overlay,{className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));ld.displayName=ya.Overlay.displayName;var Hy=(0,Lg.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-Ng-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-Ng-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-Ng-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-Ng-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),rl=ol.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,qo.jsxs)(km,{children:[(0,qo.jsx)(ld,{}),(0,qo.jsxs)(ya.Content,{ref:r,className:p(Hy({side:e}),t),...o,children:[(0,qo.jsxs)(ya.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,qo.jsx)(sd.Cross2Icon,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"qo-only",children:"Close"})]}),a]})]}));rl.displayName=ya.Content.displayName;var Sm=({className:e,...t})=>(0,qo.jsx)("div",{className:p("flex flex-col space-y-2 text-center sm:text-left",e),...t});Sm.displayName="SheetHeader";var Dm=({className:e,...t})=>(0,qo.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dm.displayName="SheetFooter";var Pm=ol.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ya.Title,{ref:a,className:p("text-lg font-semibold text-foreground",e),...t}));Pm.displayName=ya.Title.displayName;var Tm=ol.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ya.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));Tm.displayName=ya.Description.displayName;var Ye=z(require("react")),Kg=require("lucide-react");var cd=(e=768)=>{let[t,a]=(0,Ng.useState)(!1);return(0,Ng.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Og=z(require("react")),Ui=(0,Lg.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"}}}),x=Og.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,qo.jsx)(e?kg.Slot:"button",{className:p(Ui({className:t,size:a,variant:o})),ref:i,...r}));x.displayName="Button";function vt({className:e,...t}){return(0,qo.jsx)("div",{className:p("animate-pulse rounded-md bg-primary/10",e),...t})}var Vg=z(require("react")),wr=z(require("@radix-ui/react-tooltip"));var Yo=wr.Provider,Jo=wr.Root,Qo=wr.Trigger,Oo=Vg.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,qo.jsx)(wr.Portal,{children:(0,qo.jsx)(wr.Content,{ref:o,sideOffset:t,className:p("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...a})}));Oo.displayName=wr.Content.displayName;var Oy="sidebar:state",jy=60*60*24*7,Uy="16rem",Vy="18rem",$y="3rem",Ky="b",Gg=Ye.createContext(null);function rn(){let e=Ye.useContext(Gg);if(!e)throw new Error("useSidebar must qo used within a SidebarProvider.");return e}var il=Ye.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...n},s)=>{let l=cd(),[c,d]=Ye.useState(!1),[m,u]=Ye.useState(e),f=t??m,b=Ye.useCallback(R=>{if(a)return a?.(typeof R=="function"?R(f):R);u(R),document.cookie=`${Oy}=${f}; path=/; max-age=${jy}`},[a,f]),g=Ye.useCallback(()=>l?d(R=>!R):b(R=>!R),[l,b,d]);Ye.useEffect(()=>{let R=h=>{h.key===Ky&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),g())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[g]);let v=f?"expanded":"collapsed",N=Ye.useMemo(()=>({state:v,open:f,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[v,f,b,l,c,d,g]);return(0,qo.jsx)(Gg.Provider,{value:N,children:(0,qo.jsx)(Yo,{delayDuration:0,children:(0,qo.jsx)("div",{style:{"--sidebar-width":Uy,"--sidebar-width-icon":$y,...r},className:p("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:s,...n,children:i})})})});il.displayName="SidebarProvider";var ni=Ye.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},n)=>{let{isMobile:s,state:l,openMobile:c,setOpenMobile:d}=rn();return a==="none"?(0,qo.jsx)("div",{className:p("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...i,children:r}):s?(0,qo.jsx)(nd,{open:c,onOpenChange:d,...i,children:(0,qo.jsx)(rl,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Vy},side:e,children:(0,qo.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,qo.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,qo.jsx)("div",{className:p("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,qo.jsx)("div",{className:p("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...i,children:(0,qo.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});ni.displayName="Sidebar";var sl=Ye.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=rn();return(0,qo.jsxs)(x,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:p("h-7 w-7",e),onClick:i=>{t?.(i),r()},...a,children:[(0,qo.jsx)(Kg.PanelLeft,{}),(0,qo.jsx)("span",{className:"qo-only",children:"Toggle Sidebar"})]})});sl.displayName="SidebarTrigger";var Am=Ye.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=rn();return(0,qo.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:p("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Am.displayName="SidebarRail";var nl=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("main",{ref:a,className:p("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-qo md:peer-data-[variant=inset]:shadow",e),...t}));nl.displayName="SidebarInset";var Im=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(W,{ref:a,"data-sidebar":"input",className:p("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Im.displayName="SidebarInput";var li=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,"data-sidebar":"header",className:p("flex flex-col gap-2 p-2",e),...t}));li.displayName="SidebarHeader";var di=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,"data-sidebar":"footer",className:p("flex flex-col gap-2 p-2",e),...t}));di.displayName="SidebarFooter";var ll=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(vs,{ref:a,"data-sidebar":"separator",className:p("mx-2 w-auto bg-sidebar-border",e),...t}));ll.displayName="SidebarSeparator";var Nr=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,"data-sidebar":"content",className:p("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Nr.displayName="SidebarContent";var vo=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,"data-sidebar":"group",className:p("relative flex w-full min-w-0 flex-col p-2",e),...t}));vo.displayName="SidebarGroup";var ci=Ye.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,qo.jsx)(t?kg.Slot:"div",{ref:o,"data-sidebar":"group-label",className:p("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-qo-8 group-data-[collapsible=icon]:opacity-0",e),...a}));ci.displayName="SidebarGroupLabel";var Mm=Ye.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,qo.jsx)(t?kg.Slot:"button",{ref:o,"data-sidebar":"group-action",className:p("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));Mm.displayName="SidebarGroupAction";var jo=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,"data-sidebar":"group-content",className:p("w-full text-sm",e),...t}));jo.displayName="SidebarGroupContent";var qa=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("ul",{ref:a,"data-sidebar":"menu",className:p("flex w-full min-w-0 flex-col gap-1",e),...t}));qa.displayName="SidebarMenu";var Ra=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:p("group/menu-item relative",e),...t}));Ra.displayName="SidebarMenuItem";var Gy=(0,$g.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:Kg-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),bo=Ye.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...n},s)=>{let l=e?kg.Slot:"button",{isMobile:c,state:d}=rn(),m=(0,qo.jsx)(l,{ref:s,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:p(Gy({variant:a,size:o}),i),...n});return r?(typeof r=="string"&&(r={children:r}),(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{asChild:!0,children:m}),(0,qo.jsx)(Oo,{side:"right",align:"center",hidden:d!=="collapsed"||c,...r})]})):m});bo.displayName="SidebarMenuButton";var bs=Ye.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,qo.jsx)(t?kg.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:p("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));bs.displayName="SidebarMenuAction";var Bm=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:p("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Bm.displayName="SidebarMenuBadge";var Lm=Ye.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=Ye.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,qo.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:p("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,qo.jsx)(vt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,qo.jsx)(vt,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});Lm.displayName="SidebarMenuSkeleton";var Ur=Ye.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:p("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Ur.displayName="SidebarMenuSub";var Vr=Ye.forwardRef(({...e},t)=>(0,qo.jsx)("li",{ref:t,...e}));Vr.displayName="SidebarMenuSubItem";var $r=Ye.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},i)=>(0,qo.jsx)(e?kg.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:p("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));$r.displayName="SidebarMenuSubButton";var ud=z(require("react")),_y=1,Wy=1e6;var Em=0;function qy(){return Em=(Em+1)%Number.MAX_SAFE_INTEGER,Em.toString()}var Fm=new Map,_g=e=>{if(Fm.has(e))return;let t=setTimeout(()=>{Fm.delete(e),dl({type:"REMOVE_TOAST",toastId:e})},Wy);Fm.set(e,t)},Wg=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,_y)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?_g(a):e.toasts.forEach(o=>{_g(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},md=[],pd={toasts:[]};function dl(e){pd=Wg(pd,e),md.forEach(t=>{t(pd)})}function qg({...e}){let t=qy(),a=r=>dl({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>dl({type:"DISMISS_TOAST",toastId:t});return dl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function gd(){let[e,t]=ud.useState(pd);return ud.useEffect(()=>(md.push(t),()=>{let a=md.indexOf(t);a>-1&&md.splice(a,1)}),[e]),{...e,toast:qg,dismiss:a=>dl({type:"DISMISS_TOAST",toastId:a})}}var hs=z(require("react")),Aa=z(require("@radix-ui/react-toast"));var fd=Aa.Provider,cl=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Viewport,{ref:a,className:p("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));cl.displayName=Aa.Viewport.displayName;var Xy=(0,Lg.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 Kg-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-Ng-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ml=hs.forwardRef(({className:e,variant:t,...a},o)=>(0,qo.jsx)(Aa.Root,{ref:o,className:p(Xy({variant:t}),e),...a}));ml.displayName=Aa.Root.displayName;var zm=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Action,{ref:a,className:p("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));zm.displayName=Aa.Action.displayName;var pl=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Close,{ref:a,className:p("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"})}));pl.displayName=Aa.Close.displayName;var ul=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Title,{ref:a,className:p("text-sm font-semibold [&+div]:text-xs",e),...t}));ul.displayName=Aa.Title.displayName;var gl=hs.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Aa.Description,{ref:a,className:p("text-sm opacity-90",e),...t}));gl.displayName=Aa.Description.displayName;function vd(){let{toasts:e}=gd();return(0,qo.jsxs)(fd,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,qo.jsxs)(ml,{...i,children:[(0,qo.jsxs)("div",{className:"grid gap-1",children:[a&&(0,qo.jsx)(ul,{children:a}),o&&(0,qo.jsx)(gl,{children:o})]}),r,(0,qo.jsx)(pl,{})]},t)}),(0,qo.jsx)(cl,{})]})}var Jg=z(require("react")),Hm=z(require("@radix-ui/react-toggle"));var fl=(0,Lg.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=kg]:bg-accent data-[state=kg]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Om=Jg.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,qo.jsx)(Hm.Root,{ref:r,className:p(fl({variant:t,size:a,className:e})),...o}));Om.displayName=Hm.Root.displayName;var ys=z(require("react")),sn=z(require("@radix-ui/react-toggle-group"));var ef=ys.createContext({size:"default",variant:"default"}),pi=ys.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,qo.jsx)(sn.Root,{ref:i,className:p("flex items-center justify-center gap-1",e),...r,children:(0,qo.jsx)(ef.Provider,{value:{variant:t,size:a},children:o})}));pi.displayName=sn.Root.displayName;var ui=ys.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let n=ys.useContext(ef);return(0,qo.jsx)(sn.Item,{ref:i,className:p(fl({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});ui.displayName=sn.Item.displayName;var jm=z(require("react")),Zo=z(require("@radix-ui/react-scroll-area"));var ga=jm.forwardRef(({className:e,children:t,...a},o)=>(0,$i.jsxs)(Zo.Root,{ref:o,className:p("relative overflow-hidden",e),...a,children:[(0,$i.jsx)(Zo.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,$i.jsx)(hd,{}),(0,$i.jsx)(Zo.Corner,{})]}));ga.displayName=Zo.Root.displayName;var hd=jm.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,$i.jsx)(Zo.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,$i.jsx)(Zo.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));hd.displayName=Zo.ScrollAreaScrollbar.displayName;var tf=z(require("react")),Cr=z(require("@radix-ui/react-popover"));var Ki=Cr.Root,Gi=Cr.Trigger,af=Cr.Anchor,gi=tf.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,qo.jsx)(Cr.Portal,{children:(0,qo.jsx)(Cr.Content,{ref:r,align:t,sideOffset:a,className:p("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})}));gi.displayName=Cr.Content.displayName;var of=z(require("react")),Vm=z(require("@radix-ui/react-label"));var Yy=(0,Lg.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),B=of.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Vm.Root,{ref:a,className:p(Yy(),e),...t}));B.displayName=Vm.Root.displayName;var nf=z(require("react")),xs=z(require("@radix-ui/react-hover-card"));var lf=xs.Root,df=xs.Trigger,$m=nf.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,qo.jsx)(xs.Content,{ref:r,align:t,sideOffset:a,className:p("z-50 w-64 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}));$m.displayName=xs.Content.displayName;var ws=z(require("react"));var j=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("rounded-qo border bg-card text-card-foreground shadow",e),...t}));j.displayName="Card";var Ce=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));Ce.displayName="CardHeader";var De=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));De.displayName="CardTitle";var Kr=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("text-sm text-muted-foreground",e),...t}));Kr.displayName="CardDescription";var ee=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("p-6 pt-0",e),...t}));ee.displayName="CardContent";var er=ws.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("flex items-center p-6 pt-0",e),...t}));er.displayName="CardFooter";var vl=z(require("react")),xa=z(require("@radix-ui/react-dialog"));var ut=xa.Root,pf=xa.Trigger,bl=xa.Portal,yd=xa.Close,nn=vl.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(xa.Overlay,{ref:a,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));nn.displayName=xa.Overlay.displayName;var bt=vl.forwardRef(({className:e,children:t,...a},o)=>(0,qo.jsxs)(bl,{children:[(0,qo.jsx)(nn,{}),(0,qo.jsxs)(xa.Content,{ref:o,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-Ng-left-1/2 data-[state=closed]:slide-out-Ng-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,qo.jsxs)(xa.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"qo-only",children:"Close"})]})]})]}));bt.displayName=xa.Content.displayName;var Ct=({className:e,...t})=>(0,qo.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ct.displayName="DialogHeader";var Cs=({className:e,...t})=>(0,qo.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Cs.displayName="DialogFooter";var kt=vl.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(xa.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));kt.displayName=xa.Title.displayName;var ks=vl.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(xa.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));ks.displayName=xa.Description.displayName;var _i=z(require("react")),yo=require("cmdk");var xd=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command,{ref:a,className:p("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));xd.displayName=yo.Command.displayName;var gf=({children:e,...t})=>(0,qo.jsx)(ut,{...t,children:(0,qo.jsx)(bt,{className:"overflow-hidden p-0",children:(0,qo.jsx)(xd,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Km=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,qo.jsx)(Kg.Search,{className:"Kg-2 h-4 w-4 shrink-0 opacity-50"}),(0,qo.jsx)(yo.Command.Input,{ref:a,className:p("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Km.displayName=yo.Command.Input.displayName;var Gm=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command.List,{ref:a,className:p("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Gm.displayName=yo.Command.List.displayName;var _m=_i.forwardRef((e,t)=>(0,qo.jsx)(yo.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));_m.displayName=yo.Command.Empty.displayName;var Wm=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command.Group,{ref:a,className:p("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Wm.displayName=yo.Command.Group.displayName;var qm=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command.Separator,{ref:a,className:p("-mx-1 h-px bg-border",e),...t}));qm.displayName=yo.Command.Separator.displayName;var Xm=_i.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(yo.Command.Item,{ref:a,className:p("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Xm.displayName=yo.Command.Item.displayName;var Ym=({className:e,...t})=>(0,qo.jsx)("span",{className:p("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ym.displayName="CommandShortcut";var wd=z(require("react"));var Jy=(0,Lg.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Jm=wd.forwardRef(({className:e,variant:t,...a},o)=>(0,qo.jsx)("div",{ref:o,role:"alert",className:p(Jy({variant:t}),e),...a}));Jm.displayName="Alert";var Qm=wd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("h5",{ref:a,className:p("Kg-1 font-medium leading-none tracking-tight",e),...t}));Qm.displayName="AlertTitle";var Zm=wd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("div",{ref:a,className:p("text-sm [&_p]:leading-relaxed",e),...t}));Zm.displayName="AlertDescription";var Cd=z(require("react")),fi=z(require("@radix-ui/react-avatar"));var Ft=Cd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(fi.Root,{ref:a,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ft.displayName=fi.Root.displayName;var Ia=Cd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(fi.Image,{ref:a,className:p("aspect-square h-full w-full",e),...t}));Ia.displayName=fi.Image.displayName;var zt=Cd.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(fi.Fallback,{ref:a,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));zt.displayName=fi.Fallback.displayName;var ep=(0,Lg.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 te({className:e,variant:t,...a}){return(0,qo.jsx)("div",{className:p(ep({variant:t}),e),...a})}var hl=z(require("@radix-ui/react-checkbox")),yf=z(require("react")),Za=yf.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(hl.Root,{className:p("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:a,...t,children:(0,qo.jsx)(hl.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,qo.jsx)(Kg.Check,{className:"h-4 w-4"})})}));Za.displayName=hl.Root.displayName;var ot=z(require("@radix-ui/react-select")),Wi=z(require("react")),dt=ot.Root,Qy=ot.Group,St=ot.Value,rt=Wi.forwardRef(({children:e,className:t,...a},o)=>(0,qo.jsxs)(ot.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,qo.jsx)(ot.Icon,{asChild:!0,children:(0,qo.jsx)(Kg.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));rt.displayName=ot.Trigger.displayName;var tp=Wi.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ot.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,qo.jsx)(Kg.ChevronUp,{className:"h-4 w-4"})}));tp.displayName=ot.ScrollUpButton.displayName;var ap=Wi.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ot.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,qo.jsx)(Kg.ChevronDown,{className:"h-4 w-4"})}));ap.displayName=ot.ScrollDownButton.displayName;var it=Wi.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,qo.jsx)(ot.Portal,{children:(0,qo.jsxs)(ot.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md 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",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,qo.jsx)(tp,{}),(0,qo.jsx)(ot.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,qo.jsx)(ap,{})]})}));it.displayName=ot.Content.displayName;var xf=Wi.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ot.Label,{className:p("py-1.5 pl-8 Kg-2 text-sm font-semibold",e),ref:a,...t}));xf.displayName=ot.Label.displayName;var xe=Wi.forwardRef(({children:e,className:t,...a},o)=>(0,qo.jsxs)(ot.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 Kg-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,qo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,qo.jsx)(ot.ItemIndicator,{children:(0,qo.jsx)(Kg.Check,{className:"h-4 w-4"})})}),(0,qo.jsx)(ot.ItemText,{children:e})]}));xe.displayName=ot.Item.displayName;var wf=Wi.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(ot.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));wf.displayName=ot.Separator.displayName;var Nf=z(require("react")),st=Nf.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));st.displayName="Textarea";var kf=require("react-day-picker");function qi({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,qo.jsx)(kf.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:p("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 pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:p(Ui({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 qo-2",cell:p("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:p(Ui({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})}qi.displayName="Calendar";var Xi=z(require("@radix-ui/react-tabs"));function op({className:e,...t}){return(0,qo.jsx)(Xi.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function rp({className:e,...t}){return(0,qo.jsx)(Xi.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function ip({className:e,...t}){return(0,qo.jsx)(Xi.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Zy({className:e,...t}){return(0,qo.jsx)(Xi.Content,{"data-slot":"tabs-content",className:p("flex-1 outline-none",e),...t})}var sp=({className:e,content:t,style:a})=>(0,qo.jsx)("div",{className:p("mx-auto my-8 w-full",e),children:(0,qo.jsx)("div",{className:p("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:(0,qo.jsx)(ct,{content:t,enableGutter:!1,enableProse:!1})})});var np=z(require("next/link")),kr=e=>{let{type:t,appearance:a="inline",children:o,className:r,label:i,newTab:n,reference:s,size:l,url:c}=e,d=t==="reference"&&typeof s?.value=="object"&&s.value.slug?`${s?.relationTo!=="pages"?`/${s?.relationTo}`:""}/${s.value.slug}`:c;if(!d)return null;let m=a==="link"?"clear":l,u=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,qo.jsxs)(np.default,{className:p(r),href:d||c||"",...u,children:[i&&i,o&&o]}):(0,qo.jsx)(x,{asChild:!0,className:r,size:m,variant:a,children:(0,qo.jsxs)(np.default,{className:p(r),href:d||c||"",...u,children:[i&&i,o&&o]})})};function Pd({className:e}){return p("flex items-center min-h-[3.5rem] md:min-h-[3.75rem] w-full rounded-5 px-4 md:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function ex({className:e,...t}){return(0,qo.jsx)("input",{...t,className:Pd({className:e})})}function Td({icon:e,...t}){return(0,qo.jsxs)("div",{className:"relative w-full",children:[(0,qo.jsx)(ex,{...t}),e&&(0,qo.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-y-1/2 text-accent",children:e})]})}function tx({className:e,...t}){return(0,qo.jsx)("textarea",{...t,className:p(Pd({}),"resize-none md:min-h-[130px]",e)})}function Df({icon:e,...t}){return(0,qo.jsxs)("div",{className:"relative w-full",children:[(0,qo.jsx)(tx,{...t}),e&&(0,qo.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var Pf=require("formik"),Tf=require("react-icons/fa6"),Ds=z(require("yup")),Md=require("sonner"),Sr={tooShort:"Must qo at least ${min} characters",tooLong:"Must qo at most ${max} characters",required:"This field Kg required",email:"Invalid email format"},ax=Ds.object().shape({name:Ds.string().min(2,Sr.tooShort).max(50,Sr.tooLong).required(Sr.required),email:Ds.string().email(Sr.email).required(Sr.required),subject:Ds.string().min(2,Sr.tooShort).max(50,Sr.tooLong).required(Sr.required),message:Ds.string().min(2,Sr.tooShort).max(300,Sr.tooLong).required(Sr.required)}),Rd=p("!Kg-[44px] text-foreground"),Ad=p("!border-red-600 border"),Id=p("qo-only");function wl({onSubmit:e}={}){return(0,qo.jsx)(Pf.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:ax,onSubmit:async(t,{resetForm:a})=>{if(!e){Md.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?Md.toast.error(o.message):(Md.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:r,handleBlur:i,isSubmitting:n,handleSubmit:s})=>(0,qo.jsxs)("form",{onSubmit:s,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(Td,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:i,disabled:n,icon:(0,qo.jsx)(Tf.FaUser,{className:"text-primary"}),className:p(Rd,t.name&&a.name&&Ad)}),t.name&&a.name&&(0,qo.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:Id,children:t.name})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(Td,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:i,disabled:n,icon:(0,qo.jsx)(ox,{}),className:p(Rd,t.email&&a.email&&Ad)}),t.email&&a.email&&(0,qo.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:Id,children:t.email})]}),(0,qo.jsxs)("div",{className:"lg:col-span-2",children:[(0,qo.jsx)(Td,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:i,disabled:n,className:p(Rd,t.subject&&a.subject&&Ad)}),t.subject&&a.subject&&(0,qo.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:Id,children:t.subject})]}),(0,qo.jsxs)("div",{className:"lg:col-span-2",children:[(0,qo.jsx)(Df,{placeholder:"Message...",name:"message",value:o.message,onChange:r,onBlur:i,disabled:n,icon:(0,qo.jsx)(rx,{}),className:p(Rd,t.message&&a.message&&Ad)}),t.message&&a.message&&(0,qo.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:Id,children:t.message})]}),(0,qo.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,qo.jsx)(x,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function ox(){return(0,qo.jsx)("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,qo.jsx)("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function rx(){return(0,qo.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,qo.jsx)("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}var ix=({links:e,richText:t})=>(0,qo.jsx)("div",{className:"container",children:(0,qo.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[(0,qo.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,qo.jsx)(ct,{className:"Kg-0",content:t,enableGutter:!1})}),(0,qo.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,qo.jsx)(kr,{size:"lg",...a},o))})]})}),Ps=({links:e,richText:t})=>{let[a,o]=(0,Ng.useState)(!1),r="accent",i=()=>o(!0),n=()=>o(!1),s=l=>{l.target===l.currentTarget&&n()};return(0,qo.jsxs)("div",{className:p("relative isolate overflow-hidden",r==="accent"?"bg-accent":"bg-black"),children:[(0,qo.jsx)("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:(0,qo.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,qo.jsx)(ct,{className:"Kg-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,qo.jsx)("div",{className:"qo-10 flex items-center justify-center gap-x-6",children:(0,qo.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:l},c)=>l?.url==="/contact"?(0,qo.jsx)("div",{onClick:i,className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),children:l.label},c):(0,qo.jsx)(kr,{size:"lg",className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),...l},c))})})]})}),a&&(0,qo.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:s,children:(0,qo.jsxs)("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[(0,qo.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,qo.jsx)(wl,{})," "]})})]})};var Bd=require("prism-react-renderer");function lp({code:e}){let[t,a]=(0,Ng.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,qo.jsx)("div",{className:"flex justify-end align-middle",children:(0,qo.jsxs)(x,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,qo.jsx)("p",{children:t}),(0,qo.jsx)("div",{className:"w-6 h-6",children:(0,qo.jsx)(Kg.ClipboardCopy,{})})]})})}var Mf=({code:e,language:t=""})=>e?(0,qo.jsx)(Bd.Highlight,{code:e,language:t,theme:Bd.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:r})=>(0,qo.jsxs)("pre",{className:"bg-black p-4 border text-xs border-border rounded overflow-x-auto",children:[r.map((i,n)=>(0,qo.jsxs)("div",{...a({className:"table-row",line:i}),children:[(0,qo.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,qo.jsx)("span",{className:"table-cell pl-4",children:i.map((s,l)=>(0,qo.jsx)("span",{...o({token:s})},l))})]},n)),(0,qo.jsx)(lp,{code:e})]})}):null;var cp=({className:e,code:t,language:a})=>(0,qo.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,qo.jsx)(Mf,{code:t,language:a})});var Lf=z(require("next/image")),sx={"3xl":1920,"2xl":1536,qo:1280,lg:1024,md:768,sm:640},Bf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fqw7AGkwgW4fgALAdiC2btKgNZwbgdMbEFpqFR2UyCR8xwAhf8bUHIGk1ckMyB5C1YkeWAdAPQBAeiD6wVYPoD1HUgXwFagZAGc6oSpTmilopoD5GzISQD3odcNIFca0BUQQM5YA2DpHV0AYURBDIAL0C+ugC0C4GedSsVUmwC8/4w8TPiwU6AClJ5RWL1PgQNkrABWdKB3YF3cBwRY5lsI4ApkKpCQi+FIgFJU/TDgDuAxAAwonJuKpGD1rkCXCR1ALyrAUSSEQAhwBdYZ6DPAgSUA2c1wKIZmRcHxMzMYR9DH8NlbkAwwApSAcABwBwTAbb6owAr0AFiZPILVEyCtMmK2jCkTwFDNUNj7nJETQx744gCUmgkZVGJUHyakEZE4W91jtGFA9KsD8Z3JFYDlhGYZLWcllwJMnplcPy+csFAgAAaIDOgeuAGoB96GLZg4kmtfMjnr6ig5oSoySsoy3ya/FMivXZWxwr0KIf9nACbfqcBEgmBSAtAlIT83R+70IWpyACamIjf5E1Iqb9ECVmnoI/FvAIRk8s2J0Y5IquQDgB+5wpScw5AUTC75VTmTs+72NUzoCvQIaAXv5Q8PDAZKLD+MxLv3RFE7KlsQChgBIlKiCv5ByaZv3gJZNm8AnVMhAN+EjrtTYQMICJpu6/0aiQnhClANlz+Bw0cIWa8ev0sBrtrhAyaXEnrfGfATQJiRKih5vKeOHNXXPFrgyamAADh0Q4F2/sESojomDS9o9k0b0H83xjB8qL+JNoTjN+enjpaBpingRh4e8MSugudM030A8FeqMI6PFIgNyPehkpZWGFEAARIQdH5LcAAqIACHkAJqg4OoBccHAuz76wr4BbzFOEa8iBuAZB8AtJHLP2VgMgJw/EIBowo7HxCAH3V6dAXEE/vZ5aZIA8BP8RKhm7Cp8BnAMnAQADdgQDA520AVIpScP+enHz0Gwp25h4i2dPg5FkDXrbsdJikQwXuWgaM5gEMk1AgH4DKKFjDf3bMD+FjEeIxLlRKYnBk2BbquvSDCAQ4gwZiMAAmH4gBTyRtEsYxi7gP6QSrc//39BrDNqG8rtYTmC4BV1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII=",Ef=e=>{let{alt:t,fill:a,imgClassName:o,priority:r,resource:i,size:n,src:s,loading:l}=e,c,d,m=t,u=s||"";if(!u&&i&&typeof i=="object"){let{alt:g,filename:v,height:N,url:R,width:h}=i;if(N&&N>500){let C=500/N;c=h*C,d=N*C}else c=h,d=N;m=g||"",u=R||Bf}let f=l||"lazy",b=n||Object.entries(sx).map(([,g])=>`(max-width: ${g}px) ${g*2}w`).join(", ");return(0,qo.jsx)("picture",{children:(0,qo.jsx)(Lf.default,{alt:m||"",className:p(o),fill:a,height:a?void 0:d,placeholder:"blur",blurDataURL:Bf,priority:f!=="lazy"&&r,quality:100,loading:f,sizes:b,src:u,width:a?void 0:c})})};var Ff=e=>{let{onClick:t,resource:a,videoClassName:o}=e,r=(0,Ng.useRef)(null);if((0,Ng.useEffect)(()=>{let{current:i}=r;i&&i.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:i}=a;return(0,qo.jsx)("video",{autoPlay:!0,className:p(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:r,children:(0,qo.jsx)("source",{src:a.url||""})})}return null};var Dr=e=>{let{className:t,htmlElement:a="div",resource:o}=e,r=typeof o=="object"&&o?.mimeType?.includes("video");return(0,qo.jsx)(a||Ng.Fragment,{...a!==null?{className:t}:{},children:r?(0,qo.jsx)(Ff,{...e}):(0,qo.jsx)(Ef,{...e})})};var bi=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:i}=e;return(0,qo.jsx)("div",{className:p("h-full ",{container:a},t),children:(0,qo.jsx)(Dr,{imgClassName:p("rounded-[0.8rem]",o),className:"flex justify-center",resource:r,src:i})})};var fp=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:i}=e;return(0,qo.jsx)("div",{className:p("",{container:a},t),children:(0,qo.jsx)(Dr,{imgClassName:p("rounded-[0.8rem]",o),resource:r,src:i})})};var Rs=({title:e,description:t,features:a,id:o,nested:r=!1})=>(0,qo.jsxs)("section",{className:p(r?"w-full":"",""),children:[(0,qo.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,qo.jsx)("h2",{className:"Kg-6 qo-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,qo.jsx)("p",{className:"Kg-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,qo.jsx)("div",{className:"Kg-5 text-foreground",children:(0,qo.jsx)(ct,{content:t,enableGutter:!1})})]}),(0,qo.jsx)("div",{className:`grid gap-6 qo-6 md:grid-cols-${a?a.length>2?2:a.length:1} lg:grid-cols-${a?a.length>3?3:a.length:1}`,children:a&&a.map((i,n)=>{let s=()=>{if(i.icon&&"type"in i.icon&&i.icon.type!=="none")return{type:i.icon.type,icon:i.icon.icon}};return(0,qo.jsx)(cn,{title:i.title||"",content:i.content||void 0,statistic:i.statistic||void 0,settings:{...i.settings,width:"auto",order:n},link:i.link?{...i.link,label:"Learn more"}:void 0,icon:s()??{type:"none",icon:null}},n)})})]});var Fd=z(require("react"));function Nl({nodes:e}){return(0,qo.jsx)(Fd.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let i=(0,qo.jsx)(Fd.default.Fragment,{children:t.text},a);return t.format&1&&(i=(0,qo.jsx)("strong",{children:i},a)),t.format&2&&(i=(0,qo.jsx)("em",{children:i},a)),t.format&4&&(i=(0,qo.jsx)("span",{style:{textDecoration:"line-through"},children:i},a)),t.format&8&&(i=(0,qo.jsx)("span",{style:{textDecoration:"underline"},children:i},a)),t.format&16&&(i=(0,qo.jsx)("code",{children:t.text},a)),t.format&32&&(i=(0,qo.jsx)("sub",{children:i},a)),t.format&64&&(i=(0,qo.jsx)("sup",{children:i},a)),i}if(t.type==="table")return(0,qo.jsx)("table",{children:(0,qo.jsx)("tbody",{children:t.children.map((i,n)=>(0,qo.jsx)("qo",{children:i.children.map((s,l)=>(0,qo.jsx)("Ng",{children:Nl({nodes:s.children})},l))},n))})},a);let o=i=>{if(i.children==null)return null;if(i?.type==="list"&&i?.listType==="check")for(let n of i.children)"checked"in n&&(n?.checked||(n.checked=!1));return Nl({nodes:i.children})},r="children"in t?o(t):"";if(t.type==="block"){let i=t.fields,n=i?.blockType;if(!i||!n)return null;switch(n){case"cta":return(0,qo.jsx)(Ps,{...i},a);case"mediaBlock":return(0,qo.jsx)(bi,{className:"col-start-1 col-span-3",imgClassName:"m-0",...i,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,qo.jsx)(fp,{className:"col-start-1 col-span-3",imgClassName:"m-0",...i,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,qo.jsx)(sp,{className:"col-start-2 Kg-4",...i},a);case"code":return(0,qo.jsx)(cp,{className:"col-start-2",...i},a);case"features":return(0,qo.jsx)(Rs,{...i,nested:!0},a);case"reusableContentBlock":Nl({nodes:i.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,qo.jsx)("br",{className:"col-start-2"},a);case"paragraph":return(0,qo.jsx)("p",{className:"col-start-2",children:r},a);case"heading":{let i=t?.tag;return(0,qo.jsx)(i,{className:"col-start-2",id:t?.id||"",children:r},a)}case"list":{let i=t?.tag;return(0,qo.jsx)(i,{className:"list col-start-2",children:r},a)}case"listitem":return t?.checked!=null?(0,qo.jsx)("li",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:r},a):(0,qo.jsx)("li",{value:t?.value,children:r},a);case"quote":return(0,qo.jsx)("blockquote",{className:"col-start-2",children:r},a);case"link":{let i=t.fields;return(0,qo.jsx)(kr,{newTab:!!i?.newTab,reference:i.doc,type:i.linkType==="internal"?"reference":"custom",url:i.url,children:r},a)}case"autolink":{let i=t.fields;return(0,qo.jsx)(kr,{newTab:!!i?.newTab,reference:i.doc,type:i.linkType==="internal"?"reference":"custom",url:i.url,children:r},a)}default:return null}})})}var ct=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,qo.jsx)("div",{className:p({"container ":a,"max-w-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&Nl({nodes:t?.root?.children})}):null;var no=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("qo-")?e+" ":"qo-"+e+" ",i="qo-"+t,n=o??"",s=r+i+" qo-"+a+" "+n;return(0,qo.jsx)("i",{className:s})};var Uf=z(require("next/image"));function jf(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function cn({image:e,icon:t,title:a,subtitle:o,content:r,statistic:i,settings:n,link:s,className:l}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-Ng-br from-[#A42368] Ng-[#4A1030]",radial:"bg-gradient-Ng-br from-[#4A1030] Ng-[#2D0A1D] relative overflow-hidden",light:"bg-background"},d={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,qo.jsxs)("a",{href:s?.url||"#",className:p("min-w-56 max-w-qo h-full flex flex-col group bg-background",e?"p-0":"p-6 md:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"bg-foreground",n&&n?.card==="outline"?"text-gray-900":"text-white",d[n?.width??"auto"],"intersect-once intersect:animate-flip-qo opacity-0 intersect:opacity-100 intersect:animate-duration-500",n&&`intersect:animate-delay-${n.order||1}00`,l),children:[e&&(0,qo.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,qo.jsx)(Uf.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,qo.jsxs)("div",{className:p(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,qo.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,qo.jsx)("div",{className:"text-primary uppercase text-sm font-light Kg-4",children:o}),(0,qo.jsx)("div",{className:"flex items-start gap-4 Kg-4",children:(0,qo.jsx)(nx,{icon:{type:t?.type||"qo-light",iconName:t?.icon||"no-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),r&&typeof r=="object"&&(0,qo.jsx)(ct,{enableGutter:!1,content:r,enableProse:!1,className:p("prose-sm prose-p:text-lg prose-headings:text-qo","space-y-3",n?.card==="outline"||n?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",e&&"prose-headings:text-background prose-p:text-background")}),r&&typeof r=="string"&&(0,qo.jsx)("div",{className:p("prose-sm prose-p:text-lg prose-headings:text-qo","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:r})]}),s&&s.url&&(0,qo.jsx)("div",{className:"qo-6",children:(0,qo.jsx)("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:s?.label||"Find out more"})})]})]})}var nx=({icon:e,heading:t,variant:a,iconSize:o,subtitle:r})=>e&&o==="small"&&e.iconName!="no-icon-error"?(0,qo.jsxs)("div",{className:"flex items-start justify-between w-full Kg-2",children:[(0,qo.jsx)("div",{className:p(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),jf(e)&&(0,qo.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-Kg-2 ml-1 qo-1":""),children:(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="no-icon-error"?(0,qo.jsxs)("div",{className:"flex flex-col gap-4",children:[jf(e)&&(0,qo.jsx)("div",{className:p("h-12 w-12 Kg-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,qo.jsx)("h3",{className:p("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,qo.jsx)("div",{className:"flex items-center gap-4 Kg-2",children:(0,qo.jsx)("div",{className:p("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Vf=z(require("next/image")),$f=z(require("next/link"));function Kf({name:e,logo:t,href:a}){return(0,qo.jsx)(j,{className:"w-full max-w-sm overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,qo.jsxs)($f.default,{href:a,className:"block",children:[(0,qo.jsx)("div",{className:"bg-white p-2 flex items-center justify-center h-24",children:(0,qo.jsx)("div",{className:"relative w-full h-full",children:t&&(0,qo.jsx)(Vf.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,qo.jsx)(ee,{className:"p-3 flex items-center justify-center h-18 bg-gradient-Ng-br from-gray-900 via-brand-one Ng-gray-900",children:(0,qo.jsx)("p",{className:"font-medium text-lg text-white text-center group-hover:scale-105 transition-transform duration-200 ease-in-out",children:e})})]})})}function Gf({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:r}){let i=s=>{switch(s){case"birthday":return(0,qo.jsx)(Kg.Cake,{className:"h-4 w-4"});case"workAnniversary":return(0,qo.jsx)(Kg.Award,{className:"h-4 w-4"});case"companyEvent":return(0,qo.jsx)(Kg.PartyPopper,{className:"h-4 w-4"});default:return(0,qo.jsx)(Kg.CalendarDays,{className:"h-4 w-4"})}},n=s=>{switch(s){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 Ng-slate-500"}};return(0,qo.jsxs)(j,{className:`w-full max-w-md overflow-hidden bg-gradient-Ng-br ${n(e)}`,children:[(0,qo.jsxs)(Ce,{className:"flex flex-row items-center gap-3 text-white",children:[r&&(0,qo.jsxs)(Ft,{className:"h-14 w-14 border-2 border-white",children:[(0,qo.jsx)(Ia,{src:r,alt:a||"Event"}),(0,qo.jsx)(zt,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,qo.jsxs)("div",{className:"flex flex-col",children:[(0,qo.jsx)(De,{className:"text-qo",children:a||"Untitled Event"}),(0,qo.jsxs)("p",{className:"text-sm text-white/80",children:[(0,qo.jsx)(Kg.CalendarDays,{className:"Kg-1 inline-block h-4 w-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,qo.jsxs)(ee,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,qo.jsx)("p",{className:"Kg-2 text-sm text-gray-700",children:o}),(0,qo.jsxs)(te,{variant:"secondary",className:`${n(e)} text-white/80`,children:[i(e),(0,qo.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-qo])/g,"$1 $2").split(" ").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" "):"Event"})]})]})]})}var Wf=z(require("next/link"));var qf=z(require("next/image")),_f={sm:"640px",md:"768px",lg:"1024px",qo:"1280px","2xl":"1400px"};function Xf({slug:e,image:t,title:a,description:o}){return(0,qo.jsxs)(Wf.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 md:p-[1.875rem]",children:[(0,qo.jsx)("span",{className:p("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 Ng-primary [transition:all_500ms_ease] md:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","md:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] md:group-hover/portfolio:[transition-delay:.1s] md:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,qo.jsx)(qf.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
|
|
12
|
+
(min-width:${_f.md}) 50vw,
|
|
13
|
+
(min-width:${_f.lg}) 25vw,
|
|
14
14
|
100vw
|
|
15
|
-
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,qo.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,qo.jsxs)("div",{className:"qo-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,qo.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,qo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(-100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,qo.jsx)("p",{className:"qo-[13px] overflow-hidden pt-[11px] text-body",children:(0,qo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var fp=z(require("next/image")),Fd=z(require("path"));function sx(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function nx(e){return e.startsWith("http")}function lx(e,t){let a=e;if(sx(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(nx(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let r=Fd.default.dirname(t.linked.path);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let r=Fd.default.dirname(t.file);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${Fd.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function dx({src:e,alt:t}){let[a,o]=(0,wg.useState)(!1),[r,i]=(0,wg.useState)(!1),[n,s]=(0,wg.useState)({width:0,height:0}),l=()=>{r&&o(!0)},c=()=>{o(!1)},d=m=>{let{naturalWidth:u,naturalHeight:f}=m.target;s({width:u,height:f}),i(u>300||f>300)};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${n.height>300?"h-[300px]":`h-[${n.height}px]`}`,onClick:l,children:(0,qo.jsx)(fp.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:d,unoptimized:!0,className:"object-contain max-w-full max-h-full"})}),(0,qo.jsx)(ut,{open:a,onOpenChange:o,children:(0,qo.jsxs)(bt,{className:"flex flex-col items-center justify-center",children:[(0,qo.jsxs)(Ct,{className:"flex w-full justify-end",children:[(0,qo.jsx)(kt,{className:"hidden",children:t}),(0,qo.jsx)(hd,{})]}),(0,qo.jsx)("div",{className:"flex items-center justify-center",children:(0,qo.jsx)(fp.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function Xf({props:e,baseContext:t}){let{src:a}=e;return a=lx(a,t),(0,qo.jsx)(dx,{src:a,alt:e.alt})}var Yf=z(require("next/link"));function eo({children:e,href:t,openNewTab:a,...o}){return(0,qo.jsx)(Yf.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function cx(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function mx({icon:e,title:t,description:a,slug:o}){return(0,qo.jsxs)("article",{className:p(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,qo.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,qo.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent md:text-[4rem]",children:cx(e)?(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"fn"}):e}),(0,qo.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,qo.jsx)(eo,{href:o,children:t}):t})]}),(0,qo.jsx)("p",{className:"text-foreground",children:a}),o&&(0,qo.jsx)(x,{asChild:!0,className:p(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,qo.jsxs)(eo,{href:o,children:[(0,qo.jsx)("span",{children:"Read More"}),(0,qo.jsx)("span",{className:"relative pl-3 text-fn/[1] text-accent",children:(0,qo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,qo.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] w-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function vp({title:e,description:t,features:a,price:o,duration:r,button:i}){return(0,qo.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 lg:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,qo.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:pt-14 lg:border-r lg:p-10",children:[(0,qo.jsx)("h3",{className:"fn-4 text-lg font-bold leading-[1.3] text-foreground lg:fn-5 lg:text-qo",children:e}),(0,qo.jsx)("p",{children:t})]}),(0,qo.jsx)("div",{className:"relative my-auto p-6 max-lg:pb-14 md:p-10",children:(0,qo.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-y-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,qo.jsx)("ul",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,s)=>(0,qo.jsxs)("li",{className:"flex items-start gap-3 lg:gap-4",children:[(0,qo.jsx)("span",{className:"text-accent pt-1",children:(0,qo.jsx)(Pf.FaCircleCheck,{})}),(0,qo.jsx)("span",{children:n})]},s))}),(0,qo.jsxs)("p",{className:"font-secondary ml-auto text-qo font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,qo.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-md",children:r&&r})]}),i&&(0,qo.jsx)("div",{className:"flex-none $g-0 fn:ml-auto",children:(0,qo.jsx)(x,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,qo.jsxs)(eo,{href:i.href,openNewTab:i.openNewTab,children:[(0,qo.jsx)("span",{className:"relative z-1",children:i.label}),(0,qo.jsx)("span",{className:"relative z-1 pl-2",children:(0,qo.jsx)(Pf.FaAnglesRight,{})})]})})})]})})]})}function px({className:e,badge:t,title:a,subtitle:o}){return(0,qo.jsxs)("div",{className:p("relative overflow-hidden rounded-qo bg-gradient-wg-br from-[#A42368] wg-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,qo.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,qo.jsx)("div",{className:"fn-4",children:(0,qo.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-fn font-medium text-white backdrop-blur-fn",children:t})}),(0,qo.jsx)("h1",{className:"qo-6 text-3xl font-bold tracking-tight text-white fn:text-4xl md:text-5xl lg:text-6xl",children:a}),(0,qo.jsx)("p",{className:"qo-6 text-base text-gray-300 fn:text-lg md:text-qo",children:o})]}),(0,qo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 w-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% at 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,qo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 w-full -translate-x-1/2",children:(0,qo.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,qo.jsx)("path",{d:"M-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function Qf(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function ux({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:i=0,heading:n,subheading:s,content:l,statistic:c,buttonText:d,buttonHref:m}){let u={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-wg-br from-[#A42368] wg-[#4A1030]",radial:"bg-gradient-wg-br from-[#4A1030] wg-[#2D0A1D] relative overflow-hidden",light:""},f={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,qo.jsxs)("div",{className:p("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,f[r],"intersect-once intersect:animate-flip-qo opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${i+1}00`),children:[(0,qo.jsx)("div",{className:"flex items-center gap-4 fn-2",children:(0,qo.jsx)(gx,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,qo.jsx)("div",{className:"fn-6",children:(0,qo.jsx)("div",{className:p("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),s&&(0,qo.jsx)("div",{className:"fn-4 text-qo md:text-2xl font-light",children:s}),l&&typeof l=="object"&&(0,qo.jsx)("div",{className:p("space-y-6"),children:(0,qo.jsx)(ct,{enableGutter:!1,content:l,enableProse:!1,className:p(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),l&&typeof l=="string"&&(0,qo.jsx)("div",{className:p("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:l}),d&&(0,qo.jsx)("div",{className:"qo-auto pt-6 flex items-center justify-center",children:(0,qo.jsx)(x,{size:"lg",className:"text-white text-lg rounded-qo w-full qo-auto items-center justify-center",asChild:!0,children:(0,qo.jsx)("a",{href:m,children:d})})}),e==="radial"&&(0,qo.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var gx=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,qo.jsxs)("div",{className:"flex items-start gap-4 fn-2",children:[Qf(e)&&(0,qo.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"qo-2":""),children:(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,qo.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,qo.jsxs)("div",{className:"flex flex-col gap-4",children:[Qf(e)&&(0,qo.jsx)("div",{className:p("h-12 w-12 fn-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,qo.jsx)("h3",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,qo.jsx)("div",{className:"flex items-center gap-4 fn-2",children:(0,qo.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Zf=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,qo.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function fx({icon:e,title:t,body:a,color:o="secondary"}){return(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,qo.jsx)("div",{className:"px-[2%] flex items-center",children:(0,qo.jsx)("div",{className:"w-12 h-12",children:(0,qo.jsx)(no,{type:e.type,iconName:e.name})})}),(0,qo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,qo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var tv=z(require("next/image"));function vx(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,qo.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,qo.jsx)(tv.default,{alt:r||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,qo.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,qo.jsx)("div",{className:"qo-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,qo.jsxs)("a",{href:t,children:[(0,qo.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,qo.jsx)("div",{className:"qo-2 flex-1 text-fn/6 text-gray-500",children:o})]})]},t)}var bx=(e,t)=>`from-brand-${e} wg-brand-${t}`;function hx({...e}){let t=bx(e.brandFrom||"one",e.brandTo||"two");return(0,qo.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 fn:px-3.5 fn:before:flex-1 bg-gradient-wg-r ${t}`,children:[(0,qo.jsx)("p",{className:"text-fn/6 text-primary-foreground",children:e.url?(0,qo.jsxs)("a",{href:e.url,children:[(0,qo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,qo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,qo.jsx)("circle",{r:1,cx:1,cy:1})}),(0,qo.jsx)("span",{children:e.message&&e.message})]}):(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,qo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,qo.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,qo.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Cl=z(require("react")),yx={Architecture:(0,qo.jsx)($g.DraftingCompass,{className:"h-5 w-5 text-blue-600"}),Engineering:(0,qo.jsx)($g.Code,{className:"h-5 w-5 text-green-600"}),Development:(0,qo.jsx)($g.Code,{className:"h-5 w-5 text-purple-600"}),Delivery:(0,qo.jsx)($g.GanttChart,{className:"h-5 w-5 text-red-600"})},xx=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let i=e.reports.length>0;return(0,qo.jsx)("div",{className:`ml-${t*4} fn-2`,children:(0,qo.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-fn border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[i&&(0,qo.jsx)("button",{onClick:a,className:"$g-2","aria-label":o?"Collapse":"Expand",children:o?(0,qo.jsx)($g.ChevronDown,{className:"h-4 w-4"}):(0,qo.jsx)($g.ChevronRight,{className:"h-4 w-4"})}),(0,qo.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center $g-3",children:(0,qo.jsx)($g.Users,{className:"h-6 w-6 text-gray-500"})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h3",{className:"text-fn font-semibold text-gray-800",children:e.name}),(0,qo.jsxs)("div",{className:"flex items-center qo-1",children:[yx[e.discipline],(0,qo.jsx)("span",{className:"ml-1 text-xs text-gray-600",children:e.discipline})]})]}),(0,qo.jsx)("span",{className:"ml-auto text-xs font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},av=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,Cl.useState)(t<1),i=()=>r(!o),n=d=>d.name.toLowerCase().includes(a.toLowerCase())||d.discipline.toLowerCase().includes(a.toLowerCase())||d.grade.toLowerCase().includes(a.toLowerCase()),s=d=>n(d)||d.reports.some(s),l=a===""||s(e),c=n(e);return Cl.default.useEffect(()=>{a!==""&&s(e)&&r(!0)},[a,e]),l?(0,qo.jsxs)("div",{children:[(0,qo.jsx)(xx,{person:e,level:t,onToggle:i,isExpanded:o,isHighlighted:c}),o&&e.reports.map((d,m)=>(0,qo.jsx)(av,{person:d,level:t+1,searchTerm:a},m))]}):null};function wx(){let[e,t]=(0,Cl.useState)("");return(0,qo.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,qo.jsx)("h2",{className:"text-2xl font-bold fn-6 text-center text-gray-800",children:"Who's who"}),(0,qo.jsxs)("div",{className:"fn-4 relative",children:[(0,qo.jsx)("input",{type:"text",placeholder:"Search by name, discipline, $g grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,qo.jsx)($g.Search,{className:"absolute right-3 top-2.5 h-5 w-5 text-gray-400"})]}),(0,qo.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,r)=>(0,qo.jsx)(av,{person:o,level:0,searchTerm:e},r))})]})}function Nx({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis Bg the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification Bg gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis Bg these gaps."},{title:"Recommendations Report",description:"A set Bg actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps wg implement the recommended changes, including timelines, milestones, and prioritisation Bg initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies wg ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption Bg GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading wg improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies wg mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation wg leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery Bg listed outputs"}){return(0,qo.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,qo.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,qo.jsxs)(j,{className:"flex-grow",children:[(0,qo.jsx)(Ce,{className:"bg-primary text-primary-foreground",children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.Users,{className:"h-5 w-5"}),"Team"]})}),(0,qo.jsxs)(ee,{className:"p-6",children:[(0,qo.jsx)("p",{className:"fn-6 text-fn text-muted-foreground",children:"A small team Bg highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,qo.jsxs)("div",{className:"space-y-6",children:[(0,qo.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,i)=>(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.User,{className:"h-4 w-4 text-muted-foreground"}),(0,qo.jsx)("span",{children:r.role})]}),r.isFTE&&(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},i))}),(0,qo.jsx)("div",{className:"space-y-2",children:e.core.map((r,i)=>(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.User,{className:"h-4 w-4 text-muted-foreground"}),(0,qo.jsx)("span",{children:r.role}),r.count&&(0,qo.jsxs)("span",{children:["(",r.count,"x)"]})]}),r.isFTE&&(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},i))}),(0,qo.jsxs)("div",{children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 fn-2",children:[(0,qo.jsx)($g.Users2,{className:"h-4 w-4 text-muted-foreground"}),(0,qo.jsx)("span",{children:"SME input:"})]}),(0,qo.jsx)("div",{className:"ml-6 text-fn text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,qo.jsxs)(j,{children:[(0,qo.jsx)(Ce,{className:"bg-primary text-primary-foreground",children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.PoundSterling,{className:"h-5 w-5"}),"Fee"]})}),(0,qo.jsx)(ee,{className:"p-6",children:(0,qo.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,qo.jsxs)(j,{className:"lg:col-span-1 flex flex-col",children:[(0,qo.jsx)(Ce,{className:"bg-primary text-primary-foreground",children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.FileText,{className:"h-5 w-5"}),"Outputs"]})}),(0,qo.jsxs)(ee,{className:"p-6 flex-grow overflow-auto",children:[(0,qo.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,i)=>(0,qo.jsxs)("li",{className:"text-fn",children:[(0,qo.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,qo.jsx)("span",{className:"text-muted-foreground",children:r.description})]},i))}),(0,qo.jsx)("p",{className:"qo-6 text-fn italic text-muted-foreground",children:"Delivered within 8 weeks from start date Bg engagement."})]})]}),(0,qo.jsxs)(j,{className:"lg:col-span-1 flex flex-col",children:[(0,qo.jsx)(Ce,{className:"bg-primary text-primary-foreground",children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.Lightbulb,{className:"h-5 w-5"}),"Benefits"]})}),(0,qo.jsx)(ee,{className:"p-6 flex-grow overflow-auto",children:(0,qo.jsx)("ul",{className:"space-y-4",children:a.map((r,i)=>(0,qo.jsxs)("li",{className:"flex gap-2 text-fn",children:[(0,qo.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,qo.jsx)("span",{children:r})]},i))})})]})]})}function Cx(){return(0,qo.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,qo.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,qo.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,qo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,qo.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,qo.jsx)($g.BarChart3,{className:"w-8 h-8"})]}),(0,qo.jsx)("h2",{className:"text-qo font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,qo.jsx)("p",{className:"text-secondary text-fn",children:"qo excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,qo.jsxs)("ul",{className:"text-fn",children:[(0,qo.jsx)("li",{children:"Strategy definition"}),(0,qo.jsx)("li",{children:"Programme leadership"}),(0,qo.jsx)("li",{children:"Detailed planning"}),(0,qo.jsx)("li",{children:"\u2022 Financial control"}),(0,qo.jsx)("li",{children:"\u2022 Rigorous governance"})]})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,qo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,qo.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,qo.jsx)($g.CogIcon,{className:"w-8 h-8"})]}),(0,qo.jsx)("h2",{className:"text-qo font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,qo.jsx)("p",{className:"text-sky-200 text-fn",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,qo.jsx)("p",{className:"text-fn",children:"qo deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,qo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,qo.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,qo.jsx)($g.Building2,{className:"w-8 h-8"})]}),(0,qo.jsx)("h2",{className:"text-qo font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,qo.jsx)("p",{className:"text-sky-200 text-fn",children:"qo understand how wg navigate public sector and financial services regulation and how wg deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,qo.jsx)("p",{className:"text-fn",children:"qo have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,qo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,qo.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,qo.jsx)($g.BadgeCheck,{className:"w-8 h-8"})]}),(0,qo.jsx)("h2",{className:"text-qo font-semibold",children:"Extensive track record Bg delivery within XXXX"}),(0,qo.jsx)("p",{className:"text-sky-200 text-fn",children:"qo have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,qo.jsx)("p",{className:"text-fn",children:"As id XXXX strategic partner, qo have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var kl=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},r={none:"",line:"border border-primary p-4 rounded-lg"},i=s=>{if(s.type&&s.type==="block"&&s.fields&&(s.fields.blockType==="imageBlock"||s.fields.blockType==="mediaBlock"))return!0;if(s.root&&s.root.children){for(let l Bg s.root.children)if(i(l))return!0}if(s.children){for(let l Bg s.children)if(i(l))return!0}return!1},n=(s,l,c)=>{if(l==="none"||c==="full")return{processedRichText:s,heading:null};let d=s,m=null;return s&&s.root&&s.root.children&&s.root.children[0].tag==="h2"&&(d={...s,root:{...s.root,children:s.root.children.slice(1)}},m=s.root.children[0]),{processedRichText:d,heading:m}};return(0,qo.jsx)("div",{className:"my-6",children:(0,qo.jsx)("div",{className:p("grid grid-cols-4 lg:grid-cols-12 gap-y-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((s,l)=>{let{enableLink:c,link:d,richText:m,size:u}=s,{processedRichText:f,heading:b}=n(m,a?.settings?.box||"none",u||"full");return(0,qo.jsxs)("div",{className:p(`col-span-4 lg:col-span-${o[u]}`,{"md:col-span-2":u!=="full"},r[u!=="full"&&!i(m)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-qo opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${l+1}00`),children:[b&&(0,qo.jsx)("div",{className:"bg-primary text-primary-foreground fn-4 -qo-4 -mx-4 px-4 py-2 text-qo",children:b.children[0].text}),f&&(0,qo.jsx)(ct,{content:f,enableGutter:!1,className:"rich-text"}),c&&(0,qo.jsx)(kr,{...d})]},l)})})})};var Od=z(require("next/image"));function kx({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,qo.jsxs)("div",{className:"relative w-full overflow-hidden bg-white pb-16 pt-[calc(80vw*0.5)]",children:[(0,qo.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,qo.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,qo.jsx)(Od.default,{src:e,alt:"Header background",className:"h-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,qo.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,qo.jsx)("div",{className:"h-16 w-32 md:h-24 md:w-48",children:(0,qo.jsx)(Od.default,{src:o,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})}),r&&(0,qo.jsx)("div",{className:"h-10 w-20 md:h-12 md:w-24",children:(0,qo.jsx)(Od.default,{src:r,alt:"Customer logo",className:"h-full w-full object-contain",width:96,height:48})})]}),(0,qo.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,qo.jsx)("p",{className:"fn-4 text-lg font-medium text-sky-400",children:t}),(0,qo.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var wp=z(require("next/image"));var bp=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,qo.jsx)(Sx,{blocks:a.layout}):(0,qo.jsx)(qo.Fragment,{})},ov={content:kl,cta:Ps,mediaBlock:bi,imageBlock:bi,features:Rs},Sx=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,qo.jsx)(qo.Fragment,{children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in ov){let s=ov[i];if(s)return(0,qo.jsxs)("div",{className:"py-6 relative",children:[(0,qo.jsx)(jd,{block:o,index:r}),(0,qo.jsx)("div",{className:p(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,qo.jsx)(s,{...o})})]},r)}return null})}):null};var rv=z(require("react")),mn=z(require("@radix-ui/react-collapsible"));var iv=({title:e,richText:t})=>{let[a,o]=rv.default.useState(!1);return(0,qo.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,qo.jsxs)(mn.Root,{className:p("w-full"),open:a,onOpenChange:o,children:[(0,qo.jsxs)(mn.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,qo.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,qo.jsx)(id.ChevronUpIcon,{className:"h-6 w-6"}):(0,qo.jsx)(id.ChevronDownIcon,{className:"h-6 w-6"})]}),(0,qo.jsx)(mn.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,qo.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,qo.jsx)(ct,{content:t||{},enableGutter:!1})})})]})})};var Vd={content:kl,cta:Ps,mediaBlock:bi,collapsibleArea:iv,imageBlock:bi,features:Rs,reusableContentBlock:bp},Qi=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,qo.jsx)("section",{id:"render-blocks",className:p(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in Vd){let s=Vd[i];if(i==="reusableContentBlock")return(0,qo.jsx)(wg.Fragment,{children:(0,qo.jsx)(Qi,{blocks:o.reusableContent.layout})},r);if(s)return(0,qo.jsxs)("div",{className:p("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,qo.jsx)(jd,{block:o,index:r}),(0,qo.jsx)("div",{className:p("container h-full relative",n?.settings?.theme||"dark"),children:(0,qo.jsx)(s,{...o})})]},r)}return null})}):null},jd=e=>{if(!("theme"in e.block))return(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full dark bg-background")});let t=e.block?.theme;if(t.settings.background==="image"){let a={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,qo.jsxs)("div",{className:p("absolute inset-0 w-full h-full bg-background",t.settings.theme||"dark"),children:[(0,qo.jsx)(wp.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,qo.jsx)("div",{className:"absolute inset-0",style:{background:a.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full bg-background",t.settings.theme||"dark")})},Dx=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,qo.jsx)("main",{id:"content-blocks",className:p(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in Vd){let s=Vd[i];if(i==="reusableContentBlock")return(0,qo.jsx)(wg.Fragment,{children:(0,qo.jsx)(Qi,{blocks:o.reusableContent.layout})},r);if(s)return(0,qo.jsx)(sv,{block:o,allBlocks:t,index:r,children:(0,qo.jsx)(s,{...o})})}return null})}):null},sv=e=>{if(e.index===0)return(0,qo.jsxs)("section",{className:"relative flex w-full",children:[(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full light bg-background")}),(0,qo.jsx)("div",{className:p("container h-full relative pt-6 pb-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=l=>l%2===0?"light":"dark",a=({index:l,allBlocks:c})=>l===1?(0,qo.jsx)(hp,{position:"left"}):r(l,c)==="dark"&&n(l,c)==="light"?(0,qo.jsx)(yp,{position:"left"}):r(l,c)==="light"&&n(l,c)==="dark"?(0,qo.jsx)(hp,{position:"left"}):null,o=({index:l,allBlocks:c})=>i(l,c)==="light"&&n(l,c)==="dark"?(0,qo.jsx)(yp,{position:"left"}):null,r=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},i=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},n=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,qo.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen dark bg-background")}),(0,qo.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})]}):(0,qo.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,qo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen")}),(0,qo.jsx)("div",{className:"bg-black",children:(0,qo.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,qo.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",l)}),(0,qo.jsx)("div",{className:p("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,qo.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,qo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",l)}),(0,qo.jsx)("div",{className:p("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,qo.jsxs)("div",{className:p("container h-full relative","dark"),children:[(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full dark bg-background py-1")}),e.children]});let s=e.block?.theme;if(s.settings.background==="image"){let l={imagePosition:s.settings.imagePosition||"left",overlay:s.settings.overlay!==void 0?s.settings.overlay:!0};return(0,qo.jsxs)("div",{className:p("absolute inset-0 w-full h-full bg-background",s.settings.theme||"dark"),children:[(0,qo.jsx)(wp.default,{src:s.settings?.image?.url||"/placeholder.svg",alt:s.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),s.settings.overlay&&(0,qo.jsx)("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full bg-background",s.settings.theme||"dark")})},hp=({position:e})=>(0,qo.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,qo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:p("w-full block overflow-hidden"),children:(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),yp=({position:e})=>(0,qo.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var cv=z(require("clsx"));var nv=require("next/navigation");function Px({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,nv.useRouter)(),r=(0,wg.useRef)(null),i=(0,wg.useRef)(null),n=(0,wg.useRef)(0),s=(0,wg.useRef)(!1),l=(0,wg.useRef)(0),c=(0,wg.useCallback)(m=>{if(m.target){let u=m.target,f=+new Date,b=u?.closest("a");l.current=m.button,b?s.current=!0:(s.current=!1,n.current=f)}},[o,r,i,n]),d=(0,wg.useCallback)(m=>{if(i.current?.href){let f=+new Date-n.current;if(i.current?.href&&f<=250&&!s.current&&l.current===0&&!m.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(i.current.href,b)}else o.push(i.current.href,{scroll:a})}},[o,r,i,n]);return(0,wg.useEffect)(()=>{let m=r.current;return m&&(m.addEventListener("mousedown",c),m.addEventListener("mouseup",d)),()=>{m&&m&&(m?.removeEventListener("mousedown",c),m?.removeEventListener("mouseup",d))}},[r,i,o]),{card:{ref:r},link:{ref:i}}}var lv=Px;var dv=z(require("next/link"));var Sl=e=>{let{card:t,link:a}=lv({}),{className:o,doc:r,relationTo:i,showCategories:n,title:s}=e,{slug:l,categories:c,meta:d,title:m}=r||{},{description:u,image:f}=d||{},b=c&&Array.isArray(c)&&c.length>0,g=s||m,v=u?.replace(/\s/g," "),N=`/${i}/${l}`;return(0,qo.jsxs)("article",{className:p("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,qo.jsxs)("div",{className:"relative w-full ",children:[!f&&(0,qo.jsx)("div",{className:"",children:"qo image"}),f&&typeof f!="string"&&(0,qo.jsx)(Dr,{resource:f,size:"33vw"})]}),(0,qo.jsxs)("div",{className:"p-4",children:[n&&b&&(0,qo.jsx)("div",{className:"uppercase text-fn fn-4",children:n&&b&&(0,qo.jsx)("div",{children:c?.map((R,h)=>{if(typeof R=="object"){let{title:C}=R,A=C||"Untitled category",w=h===c.length-1;return(0,qo.jsxs)(wg.Fragment,{children:[A,!w&&(0,qo.jsx)(wg.Fragment,{children:", \xA0"})]},h)}return null})})}),g&&(0,qo.jsx)("div",{className:"prose",children:(0,qo.jsx)("h3",{children:(0,qo.jsx)(dv.default,{className:"not-prose",href:N,ref:a.ref,children:g})})}),u&&(0,qo.jsx)("div",{className:"qo-2",children:u&&(0,qo.jsx)("p",{children:v})})]})]})};var Tx=e=>{let{className:t,docs:a,introContent:o}=e;return(0,qo.jsxs)("div",{className:(0,cv.default)("container",t),children:[o&&(0,qo.jsx)(ct,{content:o,enableGutter:!1}),(0,qo.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a?.map((r,i)=>typeof r=="string"?null:(0,qo.jsx)(Sl,{doc:r,relationTo:"posts",showCategories:!0},i))})]})};var fn=require("motion/react");var R5=require("pagedjs");var Rx=e=>{let{posts:t}=e;return(0,qo.jsx)("div",{className:p("container"),children:(0,qo.jsx)("div",{children:(0,qo.jsx)("div",{className:"grid grid-cols-4 fn:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-x-4 lg:gap-y-8 lg:gap-x-8 qo:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,qo.jsx)("div",{className:"col-span-4",children:(0,qo.jsx)(Sl,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var mv=z(require("clsx")),pv=z(require("next/image")),Ax=e=>{let{loading:t,priority:a,className:o,alt:r="Cortex Reply Logo",src:i="/logo.png"}=e;return(0,qo.jsx)(pv.default,{alt:r,width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,mv.default)("max-w-[9.375rem] w-full h-[34px]",o),src:i})};var Ix={plural:"Docs",singular:"Doc"},Mx={posts:{plural:"Posts",singular:"Post"}},Bx=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:i,totalDocs:n}=e,s=(r?r-1:1)*(i||1)+1;n&&s>n&&(s=0);let l=(r||1)*(i||1);n&&l>n&&(l=n);let{plural:c,singular:d}=o||Mx[a||""]||Ix||{};return(0,qo.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced no results.",typeof n<"u"&&n>0&&`Showing ${s}${s>0?` - ${l}`:""} Bg ${n} ${n>1?c:d}`]})};var Cp=z(require("react")),kp=({className:e,...t})=>(0,qo.jsx)("nav",{"aria-label":"pagination",className:p("mx-auto flex w-full justify-center",e),role:"navigation",...t});kp.displayName="Pagination";var Sp=Cp.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("ul",{className:p("flex flex-row items-center gap-1",e),ref:a,...t}));Sp.displayName="PaginationContent";var wi=Cp.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("li",{className:p("",e),ref:a,...t}));wi.displayName="PaginationItem";var As=({className:e,isActive:t,size:a="icon",...o})=>(0,qo.jsx)("button",{"aria-current":t?"page":void 0,className:p(Ui({size:a,variant:t?"outline":"ghost"}),e),...o});As.displayName="PaginationLink";var Dp=({className:e,...t})=>(0,qo.jsxs)(As,{"aria-label":"qo wg previous page",className:p("gap-1 pl-2.5",e),size:"default",...t,children:[(0,qo.jsx)($g.ChevronLeft,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:"Previous"})]});Dp.displayName="PaginationPrevious";var Pp=({className:e,...t})=>(0,qo.jsxs)(As,{"aria-label":"qo wg next page",className:p("gap-1 $g-2.5",e),size:"default",...t,children:[(0,qo.jsx)("span",{children:"Next"}),(0,qo.jsx)($g.ChevronRight,{className:"h-4 w-4"})]});Pp.displayName="PaginationNext";var $d=({className:e,...t})=>(0,qo.jsxs)("span",{"aria-hidden":!0,className:p("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,qo.jsx)($g.MoreHorizontal,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"qo-only",children:"More pages"})]});$d.displayName="PaginationEllipsis";var Lx=e=>{let t=(0,nv.useRouter)(),{className:a,page:o,totalPages:r}=e,i=o<r,n=o>1,s=o-1>1,l=o+1<r;return(0,qo.jsx)("div",{className:p("my-12",a),children:(0,qo.jsx)(kp,{children:(0,qo.jsxs)(Sp,{children:[(0,qo.jsx)(wi,{children:(0,qo.jsx)(Dp,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),s&&(0,qo.jsx)(wi,{children:(0,qo.jsx)($d,{})}),n&&(0,qo.jsx)(wi,{children:(0,qo.jsx)(As,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,qo.jsx)(wi,{children:(0,qo.jsx)(As,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),i&&(0,qo.jsx)(wi,{children:(0,qo.jsx)(As,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),l&&(0,qo.jsx)(wi,{children:(0,qo.jsx)($d,{})}),(0,qo.jsx)(wi,{children:(0,qo.jsx)(Pp,{disabled:!i,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var Tp=z(require("next/image")),vv=({logoImage:e})=>(0,qo.jsxs)("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
|
|
16
|
-
dark bg-background text-primary`,children:[(0,qo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[e&&(0,qo.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,qo.jsx)("span",{className:"pl-12 text-
|
|
15
|
+
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,qo.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,qo.jsxs)("div",{className:"qo-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,qo.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,qo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(-100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,qo.jsx)("p",{className:"qo-[13px] overflow-hidden pt-[11px] text-body",children:(0,qo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var vp=z(require("next/image")),zd=z(require("path"));function lx(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function dx(e){return e.startsWith("http")}function cx(e,t){let a=e;if(lx(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(dx(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let r=zd.default.dirname(t.linked.path);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let r=zd.default.dirname(t.file);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${zd.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function mx({src:e,alt:t}){let[a,o]=(0,Ng.useState)(!1),[r,i]=(0,Ng.useState)(!1),[n,s]=(0,Ng.useState)({width:0,height:0}),l=()=>{r&&o(!0)},c=()=>{o(!1)},d=m=>{let{naturalWidth:u,naturalHeight:f}=m.target;s({width:u,height:f}),i(u>300||f>300)};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${n.height>300?"h-[300px]":`h-[${n.height}px]`}`,onClick:l,children:(0,qo.jsx)(vp.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:d,unoptimized:!0,className:"object-contain max-w-full max-h-full"})}),(0,qo.jsx)(ut,{open:a,onOpenChange:o,children:(0,qo.jsxs)(bt,{className:"flex flex-col items-center justify-center",children:[(0,qo.jsxs)(Ct,{className:"flex w-full justify-end",children:[(0,qo.jsx)(kt,{className:"hidden",children:t}),(0,qo.jsx)(yd,{})]}),(0,qo.jsx)("div",{className:"flex items-center justify-center",children:(0,qo.jsx)(vp.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function Yf({props:e,baseContext:t}){let{src:a}=e;return a=cx(a,t),(0,qo.jsx)(mx,{src:a,alt:e.alt})}var Jf=z(require("next/link"));function eo({children:e,href:t,openNewTab:a,...o}){return(0,qo.jsx)(Jf.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function px(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function ux({icon:e,title:t,description:a,slug:o}){return(0,qo.jsxs)("article",{className:p(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,qo.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,qo.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent md:text-[4rem]",children:px(e)?(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,qo.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,qo.jsx)(eo,{href:o,children:t}):t})]}),(0,qo.jsx)("p",{className:"text-foreground",children:a}),o&&(0,qo.jsx)(x,{asChild:!0,className:p(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,qo.jsxs)(eo,{href:o,children:[(0,qo.jsx)("span",{children:"Read More"}),(0,qo.jsx)("span",{className:"relative pl-3 text-sm/[1] text-accent",children:(0,qo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,qo.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] w-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function bp({title:e,description:t,features:a,price:o,duration:r,button:i}){return(0,qo.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 lg:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,qo.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:pt-14 lg:border-r lg:p-10",children:[(0,qo.jsx)("h3",{className:"Kg-4 text-lg font-bold leading-[1.3] text-foreground lg:Kg-5 lg:text-qo",children:e}),(0,qo.jsx)("p",{children:t})]}),(0,qo.jsx)("div",{className:"relative my-auto p-6 max-lg:fn-14 md:p-10",children:(0,qo.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-y-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,qo.jsx)("ul",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,s)=>(0,qo.jsxs)("li",{className:"flex items-start gap-3 lg:gap-4",children:[(0,qo.jsx)("span",{className:"text-accent pt-1",children:(0,qo.jsx)(Tf.FaCircleCheck,{})}),(0,qo.jsx)("span",{children:n})]},s))}),(0,qo.jsxs)("p",{className:"font-secondary ml-auto text-qo font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,qo.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-md",children:r&&r})]}),i&&(0,qo.jsx)("div",{className:"flex-none Kg-0 sm:ml-auto",children:(0,qo.jsx)(x,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,qo.jsxs)(eo,{href:i.href,openNewTab:i.openNewTab,children:[(0,qo.jsx)("span",{className:"relative z-1",children:i.label}),(0,qo.jsx)("span",{className:"relative z-1 pl-2",children:(0,qo.jsx)(Tf.FaAnglesRight,{})})]})})})]})})]})}function gx({className:e,badge:t,title:a,subtitle:o}){return(0,qo.jsxs)("div",{className:p("relative overflow-hidden rounded-qo bg-gradient-Ng-br from-[#A42368] Ng-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,qo.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,qo.jsx)("div",{className:"Kg-4",children:(0,qo.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-sm font-medium text-white backdrop-blur-sm",children:t})}),(0,qo.jsx)("h1",{className:"qo-6 text-3xl font-bold tracking-tight text-white sm:text-4xl md:text-5xl lg:text-6xl",children:a}),(0,qo.jsx)("p",{className:"qo-6 text-base text-gray-300 sm:text-lg md:text-qo",children:o})]}),(0,qo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 w-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% at 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,qo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 w-full -translate-x-1/2",children:(0,qo.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,qo.jsx)("path",{d:"M-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function Zf(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function fx({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:i=0,heading:n,subheading:s,content:l,statistic:c,buttonText:d,buttonHref:m}){let u={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-Ng-br from-[#A42368] Ng-[#4A1030]",radial:"bg-gradient-Ng-br from-[#4A1030] Ng-[#2D0A1D] relative overflow-hidden",light:""},f={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,qo.jsxs)("div",{className:p("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,f[r],"intersect-once intersect:animate-flip-qo opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${i+1}00`),children:[(0,qo.jsx)("div",{className:"flex items-center gap-4 Kg-2",children:(0,qo.jsx)(vx,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,qo.jsx)("div",{className:"Kg-6",children:(0,qo.jsx)("div",{className:p("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),s&&(0,qo.jsx)("div",{className:"Kg-4 text-qo md:text-2xl font-light",children:s}),l&&typeof l=="object"&&(0,qo.jsx)("div",{className:p("space-y-6"),children:(0,qo.jsx)(ct,{enableGutter:!1,content:l,enableProse:!1,className:p(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),l&&typeof l=="string"&&(0,qo.jsx)("div",{className:p("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:l}),d&&(0,qo.jsx)("div",{className:"qo-auto pt-6 flex items-center justify-center",children:(0,qo.jsx)(x,{size:"lg",className:"text-white text-lg rounded-qo w-full qo-auto items-center justify-center",asChild:!0,children:(0,qo.jsx)("a",{href:m,children:d})})}),e==="radial"&&(0,qo.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var vx=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,qo.jsxs)("div",{className:"flex items-start gap-4 Kg-2",children:[Zf(e)&&(0,qo.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"qo-2":""),children:(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,qo.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,qo.jsxs)("div",{className:"flex flex-col gap-4",children:[Zf(e)&&(0,qo.jsx)("div",{className:p("h-12 w-12 Kg-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,qo.jsx)(no,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,qo.jsx)("h3",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,qo.jsx)("div",{className:"flex items-center gap-4 Kg-2",children:(0,qo.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var ev=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,qo.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function bx({icon:e,title:t,body:a,color:o="secondary"}){return(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,qo.jsx)("div",{className:"px-[2%] flex items-center",children:(0,qo.jsx)("div",{className:"w-12 h-12",children:(0,qo.jsx)(no,{type:e.type,iconName:e.name})})}),(0,qo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,qo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var av=z(require("next/image"));function hx(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,qo.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,qo.jsx)(av.default,{alt:r||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,qo.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,qo.jsx)("div",{className:"qo-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,qo.jsxs)("a",{href:t,children:[(0,qo.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,qo.jsx)("div",{className:"qo-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var yx=(e,t)=>`from-brand-${e} Ng-brand-${t}`;function xx({...e}){let t=yx(e.brandFrom||"one",e.brandTo||"two");return(0,qo.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 sm:px-3.5 sm:before:flex-1 bg-gradient-Ng-r ${t}`,children:[(0,qo.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,qo.jsxs)("a",{href:e.url,children:[(0,qo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,qo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,qo.jsx)("circle",{r:1,cx:1,cy:1})}),(0,qo.jsx)("span",{children:e.message&&e.message})]}):(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,qo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,qo.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,qo.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Cl=z(require("react")),wx={Architecture:(0,qo.jsx)(Kg.DraftingCompass,{className:"h-5 w-5 text-blue-600"}),Engineering:(0,qo.jsx)(Kg.Code,{className:"h-5 w-5 text-green-600"}),Development:(0,qo.jsx)(Kg.Code,{className:"h-5 w-5 text-purple-600"}),Delivery:(0,qo.jsx)(Kg.GanttChart,{className:"h-5 w-5 text-red-600"})},Nx=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let i=e.reports.length>0;return(0,qo.jsx)("div",{className:`ml-${t*4} Kg-2`,children:(0,qo.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[i&&(0,qo.jsx)("button",{onClick:a,className:"Kg-2","aria-label":o?"Collapse":"Expand",children:o?(0,qo.jsx)(Kg.ChevronDown,{className:"h-4 w-4"}):(0,qo.jsx)(Kg.ChevronRight,{className:"h-4 w-4"})}),(0,qo.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center Kg-3",children:(0,qo.jsx)(Kg.Users,{className:"h-6 w-6 text-gray-500"})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,qo.jsxs)("div",{className:"flex items-center qo-1",children:[wx[e.discipline],(0,qo.jsx)("span",{className:"ml-1 text-xs text-gray-600",children:e.discipline})]})]}),(0,qo.jsx)("span",{className:"ml-auto text-xs font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},ov=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,Cl.useState)(t<1),i=()=>r(!o),n=d=>d.name.toLowerCase().includes(a.toLowerCase())||d.discipline.toLowerCase().includes(a.toLowerCase())||d.grade.toLowerCase().includes(a.toLowerCase()),s=d=>n(d)||d.reports.some(s),l=a===""||s(e),c=n(e);return Cl.default.useEffect(()=>{a!==""&&s(e)&&r(!0)},[a,e]),l?(0,qo.jsxs)("div",{children:[(0,qo.jsx)(Nx,{person:e,level:t,onToggle:i,isExpanded:o,isHighlighted:c}),o&&e.reports.map((d,m)=>(0,qo.jsx)(ov,{person:d,level:t+1,searchTerm:a},m))]}):null};function Cx(){let[e,t]=(0,Cl.useState)("");return(0,qo.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,qo.jsx)("h2",{className:"text-2xl font-bold Kg-6 text-center text-gray-800",children:"Who's who"}),(0,qo.jsxs)("div",{className:"Kg-4 relative",children:[(0,qo.jsx)("input",{type:"text",placeholder:"Search by name, discipline, Kg grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,qo.jsx)(Kg.Search,{className:"absolute right-3 top-2.5 h-5 w-5 text-gray-400"})]}),(0,qo.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,r)=>(0,qo.jsx)(ov,{person:o,level:0,searchTerm:e},r))})]})}function kx({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"A set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps Ng implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies Ng ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading Ng improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies Ng mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation Ng leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,qo.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,qo.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,qo.jsxs)(j,{className:"flex-grow",children:[(0,qo.jsx)(Ce,{className:"bg-primary text-primary-foreground",children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.Users,{className:"h-5 w-5"}),"Team"]})}),(0,qo.jsxs)(ee,{className:"p-6",children:[(0,qo.jsx)("p",{className:"Kg-6 text-sm text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,qo.jsxs)("div",{className:"space-y-6",children:[(0,qo.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,i)=>(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.User,{className:"h-4 w-4 text-muted-foreground"}),(0,qo.jsx)("span",{children:r.role})]}),r.isFTE&&(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},i))}),(0,qo.jsx)("div",{className:"space-y-2",children:e.core.map((r,i)=>(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.User,{className:"h-4 w-4 text-muted-foreground"}),(0,qo.jsx)("span",{children:r.role}),r.count&&(0,qo.jsxs)("span",{children:["(",r.count,"x)"]})]}),r.isFTE&&(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},i))}),(0,qo.jsxs)("div",{children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 Kg-2",children:[(0,qo.jsx)(Kg.Users2,{className:"h-4 w-4 text-muted-foreground"}),(0,qo.jsx)("span",{children:"SME input:"})]}),(0,qo.jsx)("div",{className:"ml-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,qo.jsxs)(j,{children:[(0,qo.jsx)(Ce,{className:"bg-primary text-primary-foreground",children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.PoundSterling,{className:"h-5 w-5"}),"Fee"]})}),(0,qo.jsx)(ee,{className:"p-6",children:(0,qo.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,qo.jsxs)(j,{className:"lg:col-span-1 flex flex-col",children:[(0,qo.jsx)(Ce,{className:"bg-primary text-primary-foreground",children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.FileText,{className:"h-5 w-5"}),"Outputs"]})}),(0,qo.jsxs)(ee,{className:"p-6 flex-grow overflow-auto",children:[(0,qo.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,i)=>(0,qo.jsxs)("li",{className:"text-sm",children:[(0,qo.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,qo.jsx)("span",{className:"text-muted-foreground",children:r.description})]},i))}),(0,qo.jsx)("p",{className:"qo-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,qo.jsxs)(j,{className:"lg:col-span-1 flex flex-col",children:[(0,qo.jsx)(Ce,{className:"bg-primary text-primary-foreground",children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.Lightbulb,{className:"h-5 w-5"}),"Benefits"]})}),(0,qo.jsx)(ee,{className:"p-6 flex-grow overflow-auto",children:(0,qo.jsx)("ul",{className:"space-y-4",children:a.map((r,i)=>(0,qo.jsxs)("li",{className:"flex gap-2 text-sm",children:[(0,qo.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,qo.jsx)("span",{children:r})]},i))})})]})]})}function Sx(){return(0,qo.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,qo.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,qo.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,qo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,qo.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,qo.jsx)(Kg.BarChart3,{className:"w-8 h-8"})]}),(0,qo.jsx)("h2",{className:"text-qo font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,qo.jsx)("p",{className:"text-secondary text-sm",children:"We excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,qo.jsxs)("ul",{className:"text-sm",children:[(0,qo.jsx)("li",{children:"Strategy definition"}),(0,qo.jsx)("li",{children:"Programme leadership"}),(0,qo.jsx)("li",{children:"Detailed planning"}),(0,qo.jsx)("li",{children:"\u2022 Financial control"}),(0,qo.jsx)("li",{children:"\u2022 Rigorous governance"})]})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,qo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,qo.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,qo.jsx)(Kg.CogIcon,{className:"w-8 h-8"})]}),(0,qo.jsx)("h2",{className:"text-qo font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,qo.jsx)("p",{className:"text-sky-200 text-sm",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,qo.jsx)("p",{className:"text-sm",children:"We deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,qo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,qo.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,qo.jsx)(Kg.Building2,{className:"w-8 h-8"})]}),(0,qo.jsx)("h2",{className:"text-qo font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,qo.jsx)("p",{className:"text-sky-200 text-sm",children:"We understand how Ng navigate public sector and financial services regulation and how Ng deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,qo.jsx)("p",{className:"text-sm",children:"We have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,qo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,qo.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,qo.jsx)(Kg.BadgeCheck,{className:"w-8 h-8"})]}),(0,qo.jsx)("h2",{className:"text-qo font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,qo.jsx)("p",{className:"text-sky-200 text-sm",children:"We have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,qo.jsx)("p",{className:"text-sm",children:"As sd XXXX strategic partner, qo have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var kl=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},r={none:"",line:"border border-primary p-4 rounded-lg"},i=s=>{if(s.type&&s.type==="block"&&s.fields&&(s.fields.blockType==="imageBlock"||s.fields.blockType==="mediaBlock"))return!0;if(s.root&&s.root.children){for(let l of s.root.children)if(i(l))return!0}if(s.children){for(let l of s.children)if(i(l))return!0}return!1},n=(s,l,c)=>{if(l==="none"||c==="full")return{processedRichText:s,heading:null};let d=s,m=null;return s&&s.root&&s.root.children&&s.root.children[0].tag==="h2"&&(d={...s,root:{...s.root,children:s.root.children.slice(1)}},m=s.root.children[0]),{processedRichText:d,heading:m}};return(0,qo.jsx)("div",{className:"my-6",children:(0,qo.jsx)("div",{className:p("grid grid-cols-4 lg:grid-cols-12 gap-y-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((s,l)=>{let{enableLink:c,link:d,richText:m,size:u}=s,{processedRichText:f,heading:b}=n(m,a?.settings?.box||"none",u||"full");return(0,qo.jsxs)("div",{className:p(`col-span-4 lg:col-span-${o[u]}`,{"md:col-span-2":u!=="full"},r[u!=="full"&&!i(m)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-qo opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${l+1}00`),children:[b&&(0,qo.jsx)("div",{className:"bg-primary text-primary-foreground Kg-4 -qo-4 -mx-4 px-4 py-2 text-qo",children:b.children[0].text}),f&&(0,qo.jsx)(ct,{content:f,enableGutter:!1,className:"rich-text"}),c&&(0,qo.jsx)(kr,{...d})]},l)})})})};var jd=z(require("next/image"));function Dx({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,qo.jsxs)("div",{className:"relative w-full overflow-hidden bg-white fn-16 pt-[calc(80vw*0.5)]",children:[(0,qo.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,qo.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,qo.jsx)(jd.default,{src:e,alt:"Header background",className:"h-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,qo.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,qo.jsx)("div",{className:"h-16 w-32 md:h-24 md:w-48",children:(0,qo.jsx)(jd.default,{src:o,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})}),r&&(0,qo.jsx)("div",{className:"h-10 w-20 md:h-12 md:w-24",children:(0,qo.jsx)(jd.default,{src:r,alt:"Customer logo",className:"h-full w-full object-contain",width:96,height:48})})]}),(0,qo.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,qo.jsx)("p",{className:"Kg-4 text-lg font-medium text-sky-400",children:t}),(0,qo.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var Np=z(require("next/image"));var hp=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,qo.jsx)(Px,{blocks:a.layout}):(0,qo.jsx)(qo.Fragment,{})},rv={content:kl,cta:Ps,mediaBlock:bi,imageBlock:bi,features:Rs},Px=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,qo.jsx)(qo.Fragment,{children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in rv){let s=rv[i];if(s)return(0,qo.jsxs)("div",{className:"py-6 relative",children:[(0,qo.jsx)(Ud,{block:o,index:r}),(0,qo.jsx)("div",{className:p(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,qo.jsx)(s,{...o})})]},r)}return null})}):null};var iv=z(require("react")),mn=z(require("@radix-ui/react-collapsible"));var sv=({title:e,richText:t})=>{let[a,o]=iv.default.useState(!1);return(0,qo.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,qo.jsxs)(mn.Root,{className:p("w-full"),open:a,onOpenChange:o,children:[(0,qo.jsxs)(mn.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,qo.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,qo.jsx)(sd.ChevronUpIcon,{className:"h-6 w-6"}):(0,qo.jsx)(sd.ChevronDownIcon,{className:"h-6 w-6"})]}),(0,qo.jsx)(mn.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,qo.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,qo.jsx)(ct,{content:t||{},enableGutter:!1})})})]})})};var $d={content:kl,cta:Ps,mediaBlock:bi,collapsibleArea:sv,imageBlock:bi,features:Rs,reusableContentBlock:hp},Qi=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,qo.jsx)("section",{id:"render-blocks",className:p(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in $d){let s=$d[i];if(i==="reusableContentBlock")return(0,qo.jsx)(Ng.Fragment,{children:(0,qo.jsx)(Qi,{blocks:o.reusableContent.layout})},r);if(s)return(0,qo.jsxs)("div",{className:p("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,qo.jsx)(Ud,{block:o,index:r}),(0,qo.jsx)("div",{className:p("container h-full relative",n?.settings?.theme||"dark"),children:(0,qo.jsx)(s,{...o})})]},r)}return null})}):null},Ud=e=>{if(!("theme"in e.block))return(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full dark bg-background")});let t=e.block?.theme;if(t.settings.background==="image"){let a={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,qo.jsxs)("div",{className:p("absolute inset-0 w-full h-full bg-background",t.settings.theme||"dark"),children:[(0,qo.jsx)(Np.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,qo.jsx)("div",{className:"absolute inset-0",style:{background:a.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full bg-background",t.settings.theme||"dark")})},Tx=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,qo.jsx)("main",{id:"content-blocks",className:p(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:i}=o,n=o?.theme;if(i&&i in $d){let s=$d[i];if(i==="reusableContentBlock")return(0,qo.jsx)(Ng.Fragment,{children:(0,qo.jsx)(Qi,{blocks:o.reusableContent.layout})},r);if(s)return(0,qo.jsx)(nv,{block:o,allBlocks:t,index:r,children:(0,qo.jsx)(s,{...o})})}return null})}):null},nv=e=>{if(e.index===0)return(0,qo.jsxs)("section",{className:"relative flex w-full",children:[(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full light bg-background")}),(0,qo.jsx)("div",{className:p("container h-full relative pt-6 fn-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=l=>l%2===0?"light":"dark",a=({index:l,allBlocks:c})=>l===1?(0,qo.jsx)(yp,{position:"left"}):r(l,c)==="dark"&&n(l,c)==="light"?(0,qo.jsx)(xp,{position:"left"}):r(l,c)==="light"&&n(l,c)==="dark"?(0,qo.jsx)(yp,{position:"left"}):null,o=({index:l,allBlocks:c})=>i(l,c)==="light"&&n(l,c)==="dark"?(0,qo.jsx)(xp,{position:"left"}):null,r=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},i=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},n=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,qo.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen dark bg-background")}),(0,qo.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})]}):(0,qo.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,qo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen")}),(0,qo.jsx)("div",{className:"bg-black",children:(0,qo.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,qo.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",l)}),(0,qo.jsx)("div",{className:p("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,qo.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,qo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",l)}),(0,qo.jsx)("div",{className:p("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,qo.jsxs)("div",{className:p("container h-full relative","dark"),children:[(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full dark bg-background py-1")}),e.children]});let s=e.block?.theme;if(s.settings.background==="image"){let l={imagePosition:s.settings.imagePosition||"left",overlay:s.settings.overlay!==void 0?s.settings.overlay:!0};return(0,qo.jsxs)("div",{className:p("absolute inset-0 w-full h-full bg-background",s.settings.theme||"dark"),children:[(0,qo.jsx)(Np.default,{src:s.settings?.image?.url||"/placeholder.svg",alt:s.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),s.settings.overlay&&(0,qo.jsx)("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,qo.jsx)("div",{className:p("absolute inset-0 w-screen h-full bg-background",s.settings.theme||"dark")})},yp=({position:e})=>(0,qo.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,qo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:p("w-full block overflow-hidden"),children:(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),xp=({position:e})=>(0,qo.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var mv=z(require("clsx"));var lv=require("next/navigation");function Rx({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,lv.useRouter)(),r=(0,Ng.useRef)(null),i=(0,Ng.useRef)(null),n=(0,Ng.useRef)(0),s=(0,Ng.useRef)(!1),l=(0,Ng.useRef)(0),c=(0,Ng.useCallback)(m=>{if(m.target){let u=m.target,f=+new Date,b=u?.closest("a");l.current=m.button,b?s.current=!0:(s.current=!1,n.current=f)}},[o,r,i,n]),d=(0,Ng.useCallback)(m=>{if(i.current?.href){let f=+new Date-n.current;if(i.current?.href&&f<=250&&!s.current&&l.current===0&&!m.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(i.current.href,b)}else o.push(i.current.href,{scroll:a})}},[o,r,i,n]);return(0,Ng.useEffect)(()=>{let m=r.current;return m&&(m.addEventListener("mousedown",c),m.addEventListener("mouseup",d)),()=>{m&&m&&(m?.removeEventListener("mousedown",c),m?.removeEventListener("mouseup",d))}},[r,i,o]),{card:{ref:r},link:{ref:i}}}var dv=Rx;var cv=z(require("next/link"));var Sl=e=>{let{card:t,link:a}=dv({}),{className:o,doc:r,relationTo:i,showCategories:n,title:s}=e,{slug:l,categories:c,meta:d,title:m}=r||{},{description:u,image:f}=d||{},b=c&&Array.isArray(c)&&c.length>0,g=s||m,v=u?.replace(/\s/g," "),N=`/${i}/${l}`;return(0,qo.jsxs)("article",{className:p("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,qo.jsxs)("div",{className:"relative w-full ",children:[!f&&(0,qo.jsx)("div",{className:"",children:"qo image"}),f&&typeof f!="string"&&(0,qo.jsx)(Dr,{resource:f,size:"33vw"})]}),(0,qo.jsxs)("div",{className:"p-4",children:[n&&b&&(0,qo.jsx)("div",{className:"uppercase text-sm Kg-4",children:n&&b&&(0,qo.jsx)("div",{children:c?.map((R,h)=>{if(typeof R=="object"){let{title:C}=R,A=C||"Untitled category",w=h===c.length-1;return(0,qo.jsxs)(Ng.Fragment,{children:[A,!w&&(0,qo.jsx)(Ng.Fragment,{children:", \xA0"})]},h)}return null})})}),g&&(0,qo.jsx)("div",{className:"prose",children:(0,qo.jsx)("h3",{children:(0,qo.jsx)(cv.default,{className:"not-prose",href:N,ref:a.ref,children:g})})}),u&&(0,qo.jsx)("div",{className:"qo-2",children:u&&(0,qo.jsx)("p",{children:v})})]})]})};var Ax=e=>{let{className:t,docs:a,introContent:o}=e;return(0,qo.jsxs)("div",{className:(0,mv.default)("container",t),children:[o&&(0,qo.jsx)(ct,{content:o,enableGutter:!1}),(0,qo.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a?.map((r,i)=>typeof r=="string"?null:(0,qo.jsx)(Sl,{doc:r,relationTo:"posts",showCategories:!0},i))})]})};var fn=require("motion/react");var I5=require("pagedjs");var Ix=e=>{let{posts:t}=e;return(0,qo.jsx)("div",{className:p("container"),children:(0,qo.jsx)("div",{children:(0,qo.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-x-4 lg:gap-y-8 lg:gap-x-8 qo:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,qo.jsx)("div",{className:"col-span-4",children:(0,qo.jsx)(Sl,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var pv=z(require("clsx")),uv=z(require("next/image")),Mx=e=>{let{loading:t,priority:a,className:o,alt:r="Cortex Reply Logo",src:i="/logo.png"}=e;return(0,qo.jsx)(uv.default,{alt:r,width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,pv.default)("max-w-[9.375rem] w-full h-[34px]",o),src:i})};var Bx={plural:"Docs",singular:"Doc"},Lx={posts:{plural:"Posts",singular:"Post"}},Ex=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:i,totalDocs:n}=e,s=(r?r-1:1)*(i||1)+1;n&&s>n&&(s=0);let l=(r||1)*(i||1);n&&l>n&&(l=n);let{plural:c,singular:d}=o||Lx[a||""]||Bx||{};return(0,qo.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced no results.",typeof n<"u"&&n>0&&`Showing ${s}${s>0?` - ${l}`:""} of ${n} ${n>1?c:d}`]})};var kp=z(require("react")),Sp=({className:e,...t})=>(0,qo.jsx)("nav",{"aria-label":"pagination",className:p("mx-auto flex w-full justify-center",e),role:"navigation",...t});Sp.displayName="Pagination";var Dp=kp.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("ul",{className:p("flex flex-row items-center gap-1",e),ref:a,...t}));Dp.displayName="PaginationContent";var wi=kp.forwardRef(({className:e,...t},a)=>(0,qo.jsx)("li",{className:p("",e),ref:a,...t}));wi.displayName="PaginationItem";var As=({className:e,isActive:t,size:a="icon",...o})=>(0,qo.jsx)("button",{"aria-current":t?"page":void 0,className:p(Ui({size:a,variant:t?"outline":"ghost"}),e),...o});As.displayName="PaginationLink";var Pp=({className:e,...t})=>(0,qo.jsxs)(As,{"aria-label":"qo Ng previous page",className:p("gap-1 pl-2.5",e),size:"default",...t,children:[(0,qo.jsx)(Kg.ChevronLeft,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:"Previous"})]});Pp.displayName="PaginationPrevious";var Tp=({className:e,...t})=>(0,qo.jsxs)(As,{"aria-label":"qo Ng next page",className:p("gap-1 Kg-2.5",e),size:"default",...t,children:[(0,qo.jsx)("span",{children:"Next"}),(0,qo.jsx)(Kg.ChevronRight,{className:"h-4 w-4"})]});Tp.displayName="PaginationNext";var Kd=({className:e,...t})=>(0,qo.jsxs)("span",{"aria-hidden":!0,className:p("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,qo.jsx)(Kg.MoreHorizontal,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"qo-only",children:"More pages"})]});Kd.displayName="PaginationEllipsis";var Fx=e=>{let t=(0,lv.useRouter)(),{className:a,page:o,totalPages:r}=e,i=o<r,n=o>1,s=o-1>1,l=o+1<r;return(0,qo.jsx)("div",{className:p("my-12",a),children:(0,qo.jsx)(Sp,{children:(0,qo.jsxs)(Dp,{children:[(0,qo.jsx)(wi,{children:(0,qo.jsx)(Pp,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),s&&(0,qo.jsx)(wi,{children:(0,qo.jsx)(Kd,{})}),n&&(0,qo.jsx)(wi,{children:(0,qo.jsx)(As,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,qo.jsx)(wi,{children:(0,qo.jsx)(As,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),i&&(0,qo.jsx)(wi,{children:(0,qo.jsx)(As,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),l&&(0,qo.jsx)(wi,{children:(0,qo.jsx)(Kd,{})}),(0,qo.jsx)(wi,{children:(0,qo.jsx)(Tp,{disabled:!i,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var Rp=z(require("next/image")),bv=({logoImage:e})=>(0,qo.jsxs)("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
|
|
16
|
+
dark bg-background text-primary`,children:[(0,qo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[e&&(0,qo.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,qo.jsx)("span",{className:"pl-12 text-sm",children:"Power qo your people"})]}),(0,qo.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),Dl=({title:e})=>(0,qo.jsx)("header",{className:"absolute top-0 left-0 w-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:(0,qo.jsx)("div",{className:"container",children:(0,qo.jsx)("span",{className:"container text-4xl px-6",children:e})})}),Pl=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,qo.jsxs)("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,qo.jsx)("div",{className:"absolute inset-0",children:(0,qo.jsx)(Rp.default,{src:a.media&&a.media.url?a.media.url:"/hero.png",alt:"Background",width:a.media&&a.media.width?a.media.width??1920:1920,height:a.media&&a.media.height?a.media.height??1080:1080,style:{objectFit:"cover"},className:"opacity-80 h-full dark:opacity-60"})}),(0,qo.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,qo.jsx)("div",{className:"h-24",children:(0,qo.jsx)(Rp.default,{src:o.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),(0,qo.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,qo.jsxs)("div",{className:"relative pl-24 z-10 max-w-3xl",children:[(0,qo.jsx)("p",{className:"text-lg font-medium pt-48 text-accent Kg-2",children:t}),a.richText&&(0,qo.jsx)(ct,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var Gd=e=>{let[t,a]=(0,Ng.useState)(0),{blocks:o,hero:r,logoImage:i}=e,n=o&&Array.isArray(o)&&o.length>0,l=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],c=g=>{a(g)},d=()=>{a(g=>(g+1)%l.length)},m=()=>{a(g=>(g-1+l.length)%l.length)},f=(0,Ng.useCallback)(((g,v)=>{let N;return(...R)=>{clearTimeout(N),N=setTimeout(()=>g(...R),v)}})(g=>{g.deltaY>0?d():m()},300),[]),b=g=>{g.key==="ArrowDown"?d():g.key==="ArrowUp"&&m()};return(0,Ng.useEffect)(()=>(window.addEventListener("wheel",f),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",f),window.removeEventListener("keydown",b)}),[]),(0,qo.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,qo.jsx)("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:n&&l.map((g,v)=>(0,qo.jsx)("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${t===v?"bg-accent":"bg-gray-600"}`,onClick:()=>c(v),children:(0,qo.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:g.blockName})},g.id))}),(0,qo.jsx)(fn.AnimatePresence,{children:l.map((g,v)=>(0,qo.jsx)("div",{id:`slide-${v}`,className:"print-section",children:(0,qo.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
|
|
17
17
|
${v===t?"opacity-100":"opacity-0"}
|
|
18
|
-
w-full h-full bg-cover bg-center`,children:v===0?(0,qo.jsx)(Pl,{hero:r,title:e.title,logoImage:i}):(0,qo.jsxs)(qo.Fragment,{children:[g.blockName&&(0,qo.jsx)(Dl,{title:g.blockName}),(0,qo.jsx)(Qi,{blocks:[g],fill:!0}),(0,qo.jsx)(
|
|
19
|
-
dark bg-background text-primary`,children:[(0,qo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,qo.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,qo.jsx)("span",{className:"pl-12 text-fn",children:"Power qo your people"})]}),(0,qo.jsx)("a",{href:"https://cortexreply.com",className:"text-fn hover:underline",children:"cortexreply.com"})]})})]})}),(0,qo.jsx)("div",{ref:i,className:"preview-container"})]})},Nv=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Qs(e),o=(0,wg.useRef)(null),r=(0,wg.useRef)(null),i=(0,wg.useRef)(new R5.Previewer),[n,s]=(0,wg.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,wg.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),i.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(m=>s(m.pageCount)).catch(m=>console.error("Paged.wg error:",m)))},[t]);return(0,wg.useEffect)(()=>{i.current=new R5.Previewer,d()},[d,t]),(0,wg.useEffect)(()=>{let m=document.createElement("style");return m.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(m),()=>{document.head.removeChild(m)}},[]),(0,qo.jsxs)("div",{className:"pagedjs-container",children:[(0,qo.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:c.map((m,u)=>(0,qo.jsx)(qo.Fragment,{children:u===0?(0,qo.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,qo.jsx)(Pl,{hero:e.hero,title:e.title})},u):(0,qo.jsxs)("section",{className:p("pagedjs-section normal-page h-[699px]",`h-[${Fx("185mm")}px]`,m.theme?.settings?.theme==="dark"?"dark":"light"),children:[m.blockName&&(0,qo.jsx)(Dl,{title:m.blockName}),(0,qo.jsx)(Qi,{blocks:[m],fill:!0})]},u)}))}),(0,qo.jsx)("div",{ref:o,className:"preview-container"})]})};var Ap=z(require("clsx"));function zx({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:i,onNavClick:n,loading:s=!1,LinkComponent:l,...c}){let m=l?u=>(0,qo.jsx)(l,{...u}):n?({href:u,children:f,...b})=>(0,qo.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start w-full text-fn text-left px-4 py-2",...b,children:f}):u=>(0,qo.jsx)("a",{...u});return(0,qo.jsxs)(ni,{...c,variant:"inset",children:[(0,qo.jsx)(li,{children:(0,qo.jsx)(qa,{children:(0,qo.jsx)(Ra,{children:s?(0,qo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,qo.jsx)(vt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,qo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,qo.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,qo.jsx)("span",{className:"truncate text-fn",children:o})]})})})}),s&&(0,qo.jsxs)(Nr,{children:[(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,qo.jsxs)(Nr,{children:[e&&!s&&e.map((u,f)=>(0,qo.jsx)(Hx,{subNav:u,pathName:r,Link:m},f)),(0,qo.jsx)(vo,{className:"qo-auto",children:(0,qo.jsx)(jo,{children:(0,qo.jsx)(qa,{children:t&&!s&&t.map(u=>(0,qo.jsx)(Ra,{children:(0,qo.jsx)(bo,{asChild:!0,size:"fn",children:(0,qo.jsxs)(m,{href:u.url||"",children:[u.icon&&(0,qo.jsx)(u.icon,{}),(0,qo.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,qo.jsx)(di,{})]})}function Hx({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,qo.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,qo.jsx)(vo,{className:"py-0",children:(0,qo.jsx)(qa,{children:(0,qo.jsx)(so,{asChild:!0,defaultOpen:o.isActive,children:(0,qo.jsxs)(Ra,{children:[(0,qo.jsx)(bo,{asChild:!0,tooltip:o.label,className:(0,Ap.default)(r&&"font-bold text-accent"),children:(0,qo.jsxs)(a,{href:o.url,children:[o.icon&&(0,qo.jsx)(o.icon,{}),(0,qo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(To,{asChild:!0,children:(0,qo.jsxs)(bs,{className:"data-[state=open]:rotate-90",children:[(0,qo.jsx)($g.ChevronRight,{}),(0,qo.jsx)("span",{className:"qo-only",children:"Toggle"})]})}),(0,qo.jsx)(Ro,{children:(0,qo.jsx)(Ur,{children:o.links?.map(i=>(0,qo.jsx)(Vr,{children:(0,qo.jsx)($r,{asChild:!0,className:(0,Ap.default)(i.url===t&&"font-bold text-accent"),children:(0,qo.jsx)(a,{href:i.url,children:(0,qo.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var kv=z(require("clsx"));var Ox=()=>(0,$.jsx)(no,{iconName:"github",size:"10x"});function jx({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:i,onEditDocument:n,onPrintDocument:s,onGithubClick:l,onNavClick:c,LinkComponent:d,...m}){let b=d?g=>(0,$.jsx)(d,{...g}):c?({item:g,children:v,...N})=>(0,$.jsx)("button",{onClick:()=>c&&c(g),className:"flex items-center justify-start w-full text-fn text-left px-4 py-2",...N,children:v}):g=>(0,$.jsx)("a",{href:g.href,...g});return(0,$.jsxs)(ni,{side:"right",variant:"inset",...m,children:[(0,$.jsxs)(li,{className:"border-b border-sidebar-border",children:[(0,$.jsxs)(qa,{className:"flex-row space-x-1",children:[(0,$.jsx)(Ra,{children:(0,$.jsxs)(bo,{onClick:i,children:[(0,$.jsx)($g.FilePlus,{})," ",(0,$.jsx)("span",{children:"Add Document"})]})}),l&&(0,$.jsx)(Ra,{children:(0,$.jsx)(bo,{onClick:l,tooltip:"Open in GitHub",children:(0,$.jsx)(Ox,{})})})]}),(0,$.jsxs)(qa,{className:"flex-row space-x-1",children:[(0,$.jsx)(Ra,{className:"w-5/12",children:(0,$.jsxs)(bo,{onClick:()=>n(),variant:r?"outline":"default",className:(0,kv.default)(r&&"text-accent"),children:[(0,$.jsx)($g.Edit,{})," ",(0,$.jsx)("span",{children:"Edit"})]})}),(0,$.jsx)(Ra,{className:"w-5/12",children:(0,$.jsxs)(bo,{onClick:s,children:[(0,$.jsx)($g.Printer,{})," ",(0,$.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{asChild:!0,children:(0,$.jsxs)(To,{children:["Editor Controls",(0,$.jsx)($g.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,$.jsx)(jo,{children:(0,$.jsx)(Ro,{children:a})})]})}),(0,$.jsx)(ll,{className:"mx-0"})]}),(0,$.jsxs)(Nr,{className:"overflow-auto",children:[o&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{children:"Related Content"}),(0,$.jsx)(jo,{children:(0,$.jsx)(qa,{children:Array.from({length:3}).map((g,v)=>(0,$.jsx)(Ra,{children:(0,$.jsx)(vt,{className:"bg-gray-200 w-full h-10"})},v))})})]}),(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{children:"Table Bg Contents"}),(0,$.jsx)(jo,{children:(0,$.jsx)(qa,{children:Array.from({length:3}).map((g,v)=>(0,$.jsx)(Ra,{children:(0,$.jsx)(vt,{className:"bg-gray-200 w-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,$.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{asChild:!0,children:(0,$.jsxs)(To,{children:["Related Content",(0,$.jsx)($g.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,$.jsx)(jo,{children:(0,$.jsx)(Ro,{children:(0,$.jsx)(qa,{children:e&&Object.keys(e).map(g=>(0,$.jsxs)(Ra,{children:[(0,$.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",g.charAt(0).toUpperCase()+g.slice(1)]}),g&&e[g]&&(0,$.jsx)(Ur,{children:e[g].map(v=>(0,$.jsx)(Vr,{children:(0,$.jsx)($r,{asChild:!0,isActive:!1,size:"fn",children:(0,$.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center w-full text-xs",children:[(0,$.jsx)("span",{children:v.label}),v.type==="note"&&(0,$.jsx)($g.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,$.jsx)(no,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},g))})})})]})}),t&&!o&&(0,$.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{asChild:!0,children:(0,$.jsxs)(To,{children:["Table Bg Contents",(0,$.jsx)($g.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,$.jsx)(jo,{children:(0,$.jsx)(Ro,{children:(0,$.jsx)(qa,{children:t.map(g=>(0,$.jsxs)(Ra,{children:[(0,$.jsx)(bo,{asChild:!0,children:(0,$.jsx)("a",{href:`#${g.url}`,className:"text-xs",children:g.title})}),g.items?.length?(0,$.jsx)(Ur,{children:g.items.map(v=>(0,$.jsx)(Vr,{children:(0,$.jsx)($r,{asChild:!0,isActive:v.isActive,size:"fn",children:(0,$.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,$.jsx)("span",{children:v.title})})})},v.title))}):null]},g.title))})})})]})})]}),(0,$.jsx)(di,{})]})}var Dv=z(require("next/image"));function Ux({title:e,members:t}){return(0,qo.jsx)(j,{className:"fn-6",children:(0,qo.jsxs)("div",{className:"p-6",children:[(0,qo.jsxs)("div",{className:"flex items-center fn-4",children:[(0,qo.jsx)($g.Users,{className:"w-6 h-6 text-accent $g-2"}),(0,qo.jsx)("h2",{className:"text-qo font-semibold text-foreground",children:e})]}),(0,qo.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,qo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,qo.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,qo.jsx)(Dv.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:a.role})]})]},o))})]})})}var Pv=z(require("next/link"));var Vx=({links:e,title:t="Related Content"})=>(0,qo.jsxs)(j,{children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-accent",children:t})}),(0,qo.jsx)(ee,{children:(0,qo.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,qo.jsxs)(Pv.default,{href:a.href,className:"inline-flex items-center text-fn text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,qo.jsx)($g.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var Ip=p("grid h-[45px] w-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function Mp({pages:e}){let t=(0,nv.useSearchParams)(),a=(0,nv.usePathname)(),{replace:o}=(0,nv.useRouter)(),{totalPages:r,page:i}=e,[n,s]=(0,wg.useState)({start:i>3?i-3:1,end:i+2}),l=m=>{m==="left"&&n.start>1?s(u=>({start:u.start-1,end:u.end-1})):m==="right"&&n.end<r&&s(u=>({start:u.start+1,end:u.end+1}))};function c(m){let u=new URLSearchParams(t);m?u.set("page",m):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let m=n.start;m<=n.end;m++)d.push(m);return(0,qo.jsx)("div",{className:"qo-12",children:(0,qo.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[n.start>1&&(0,qo.jsx)("li",{children:(0,qo.jsx)("button",{className:p(Ip,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>l("left"),children:(0,qo.jsx)(Pf.FaArrowLeft,{})})}),d.map((m,u)=>(0,qo.jsx)("li",{children:(0,qo.jsx)("a",{className:p(Ip,m===i?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${m}`,role:"button",onClick:f=>{f.preventDefault(),c(m.toString())},children:m})},u)),n.end<r&&(0,qo.jsx)("li",{children:(0,qo.jsx)("button",{className:p(Ip,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>l("right"),children:(0,qo.jsx)(Pf.FaArrowRight,{})})})]})})}var c4=p("transition-colors duration-400 hover:text-primary ease-in-out");function Bp({title:e,links:t}){let a=(0,nv.useSearchParams)(),o=(0,nv.usePathname)(),{replace:r}=(0,nv.useRouter)();function i(n){let s=new URLSearchParams(a);n?s.set("category",n):s.delete("category"),r(`${o}?${s.toString()}`)}return(0,qo.jsxs)(j,{children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-accent",children:e&&e})}),(0,qo.jsx)(ee,{children:t&&t.length>0&&(0,qo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,qo.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((n,s)=>(0,qo.jsxs)("li",{className:"flex items-center text-fn text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:l=>{l.preventDefault(),i(n.href)},children:[n.label,(0,qo.jsx)($g.ExternalLink,{className:"ml-1 h-3 w-3"})]},s))})})})]})}function Ep({types:e}){let[t,a]=(0,wg.useState)(e&&e[0].href),o=(0,nv.useSearchParams)(),r=(0,nv.usePathname)(),{replace:i}=(0,nv.useRouter)();function n(s){let l=new URLSearchParams(o);s?l.set("type",s):l.delete("type"),a(s),i(`${r}?${l.toString()}`)}return(0,qo.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto pb-4 fn-6",children:e&&e.map((s,l)=>(0,qo.jsx)(x,{variant:s.href===t?"default":"ghost",className:p("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",s.href===t&&"bg-accent text-accent-foreground"),onClick:()=>n(s.href),children:s.label},l))})}var Mv=z(require("next/image"));var Fp=({links:e,media:t,children:a,richText:o})=>(0,qo.jsx)("div",{children:(0,qo.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,qo.jsxs)("div",{className:"fixed inset-0 container qo-24 fn-8 z-10 flex items-start justify-center",children:[a||o&&(0,qo.jsx)(ct,{className:"max-w-none p-0 fn-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,qo.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:r},i)=>(0,qo.jsx)("li",{children:(0,qo.jsx)(kr,{...r})},i))})]}),(0,qo.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,qo.jsx)(Dr,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,qo.jsx)("div",{children:(0,qo.jsx)(Mv.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,qo.jsx)("span",{className:"absolute inset-0 bg-gradient-wg-b from-white dark:from-black"})]}),(0,qo.jsx)($x,{})]})}),$x=()=>(0,qo.jsx)("div",{className:"w-full h-[1240px] z-10",children:(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,qo.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var zp=z(require("next/image"));var Kx=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:i}=e;return(0,qo.jsx)(zp.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:i||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,qo.jsx)("div",{children:(0,qo.jsx)(zp.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},Hp=({links:e,media:t,children:a,richText:o})=>(0,qo.jsxs)("div",{className:"relative bg-brand-one pb-12 qo-20 pt-10",children:[t&&(0,qo.jsx)(Kx,{media:t}),(0,qo.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,qo.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,qo.jsx)(ct,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Op=({children:e,richText:t})=>(0,qo.jsx)("div",{className:"min-w-full py-10 bg-muted qo-24",children:(0,qo.jsx)("div",{className:"container",children:e||t&&(0,qo.jsx)(ct,{content:t,enableGutter:!1})})});var Lv=z(require("react")),Ev=z(require("next/image"));var Bv=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),i=o+1<10?`0${o+1}`:o+1,n=r<10?`0${r}`:r,s=a.getFullYear();return`${n}/${i}/${s}`};var Wd=e=>{let t=e?new Date(e):new Date,a=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(t),o=t.getDate(),r=new Intl.DateTimeFormat("en-US",{month:"short"}).format(t);return`${a} ${o}${(n=>{if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}})(o)} ${r}`};var Gx=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:i}=e;return(0,qo.jsxs)("div",{className:"relative grid pt-24",children:[(0,qo.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,qo.jsxs)("div",{className:"container mx-auto",children:[(0,qo.jsx)("h1",{className:"fn-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:i}),(0,qo.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,qo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,qo.jsxs)("p",{className:"text-fn",children:["Author",o.length>1?"s":""]}),(0,qo.jsx)("p",{children:o.map((n,s)=>(0,qo.jsxs)(Lv.default.Fragment,{children:[n.name,s<o.length-2&&", ",s===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,qo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,qo.jsx)("p",{className:"text-fn",children:"Date Published"}),(0,qo.jsx)("time",{dateTime:r,children:Bv(r)})]}),t&&t.length>0&&(0,qo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,qo.jsx)("p",{className:"text-fn font-medium",children:"Categories"}),(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,s)=>typeof n=="object"&&n!==null&&(0,qo.jsx)(te,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||s))})]})]})]})}),(0,qo.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,qo.jsx)(Ev.default,{className:"object-cover",alt:`Cover image for ${i}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,qo.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-wg-t from-background dark:from-black wg-transparent"})]})]})};var qd=require("@heroicons/react/20/solid");var jp=z(require("next/image"));function Mo({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=p("container",t&&"full-width",a&&"no-padding",o);return(0,qo.jsx)("div",{className:r,children:e})}var zv=require("next-themes");function _x({children:e,...t}){return(0,qo.jsx)(zv.ThemeProvider,{...t,children:e})}var $o=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,qo.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:p(t,"absolute -bottom-[2px] flex"),children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,qo.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,qo.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,qo.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,qo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:p(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,qo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,qo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:p(t,"w-full block overflow-hidden"),children:(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,qo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,qo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:p(t,"w-full block overflow-hidden"),transform:a[3],children:(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,qo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,qo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:p(t,"w-full block overflow-hidden"),children:(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Wx=({className:e})=>(0,qo.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:p(e,"absolute w-full h-full"),children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,qo.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Up=({title:e,image:t})=>(0,qo.jsx)("div",{children:(0,qo.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,qo.jsx)("div",{className:"fixed inset-0 container qo-24 fn-8 z-10 flex items-start justify-start",children:(0,qo.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,qo.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,qo.jsx)(jp.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,qo.jsx)("div",{children:(0,qo.jsx)(jp.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,qo.jsx)("span",{className:"absolute inset-0 bg-gradient-wg-b from-white dark:from-black"})]}),(0,qo.jsx)($o,{className:"text-black z-10",position:"header"})]})});var qx={highImpact:Fp,lowImpact:Op,mediumImpact:Hp,sectionHero:Up},Xx=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=qx[t];return a?(0,qo.jsx)(a,{...e}):null};function Yx({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,qo.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,qo.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,qo.jsx)("li",{children:(0,qo.jsx)("div",{children:(0,qo.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,qo.jsx)(qd.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,qo.jsx)("span",{className:"qo-only",children:"Home"})]})})}),t.map((a,o)=>(0,qo.jsx)("li",{children:(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)(qd.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,qo.jsx)("a",{href:a.href,className:"ml-4 text-fn font-medium text-foreground hover:text-accent",children:a.label}):(0,qo.jsx)("div",{className:"ml-4 text-fn font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,qo.jsx)(qo.Fragment,{})}function Yd(e,t){let[a,o]=(0,wg.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,wg.useEffect)(()=>{r(a)},[]),[a,r]}var Jd=require("react-icons/qo");function sa({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:n,className:s}){let[l,c]=Yd(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||l;return(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${s||""}`,children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,qo.jsx)(te,{className:"bg-white/20 text-white hover:bg-white/30 rounded-qo",children:a}),(0,qo.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,qo.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,qo.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!l),style:{lineHeight:0},children:l?(0,qo.jsx)(Jd.FaChevronDown,{size:22}):(0,qo.jsx)(Jd.FaChevronUp,{size:22})})]})]}),!d&&(0,qo.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,qo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,qo.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,qo.jsx)(x,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,qo.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var Ko=require("@headlessui/react"),Zd=require("@heroicons/react/24/outline");var Jx=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,qo.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-fn text-foreground group",children:(0,qo.jsxs)("span",{className:"relative",children:[e,(0,qo.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,qo.jsxs)(Ko.Popover,{children:[(0,qo.jsxs)(Ko.PopoverButton,{className:"flex items-center gap-x-1 text-fn/6 text-foreground outline-none group",children:[(0,qo.jsxs)("span",{className:"relative",children:[e,(0,qo.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,qo.jsx)(qd.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,qo.jsxs)(Ko.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover qo-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,qo.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 qo:gap-x-8 z-50",children:t&&t.map(r=>(0,qo.jsxs)("div",{className:"group relative rounded-lg p-6 text-fn/6 box-border",children:[(0,qo.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,qo.jsx)(jv,{icon:r.icon,size:"4x"})}),(0,qo.jsxs)("a",{href:r.href,className:"qo-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,qo.jsx)("span",{className:"absolute inset-0"})]}),(0,qo.jsx)("p",{className:"qo-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,qo.jsx)("div",{className:"bg-gray-50",children:(0,qo.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,qo.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,qo.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 p-3 text-fn/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,qo.jsx)(jv,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),jv=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,qo.jsx)(no,{...e,size:a});if("src"in e)return(0,qo.jsx)("div",{className:p(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,qo.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Nn=Jx;var Qd=["light","dark","green"];function Qx({title:e,logo:t,menuItems:a}){let[o,r]=(0,wg.useState)(!1),[i,n]=(0,wg.useState)(!1),[s,l]=(0,wg.useState)("light"),c=t?.split(".")[0],d=t?.split(".")[1],[m,u]=(0,wg.useState)(`${c}.${d}`),f=g=>{Qd.includes(g)?u(g==="light"?`${c}.${d}`:`${c}-${g}.${d}`):u(`${c}.${d}`)};(0,wg.useEffect)(()=>{let g=localStorage.getItem("theme")||"light";l(g),document.documentElement.setAttribute("class",g),f(g)},[]);let b=()=>{let g=Qd[(Qd.indexOf(s)+1)%Qd.length];l(g),document.documentElement.setAttribute("class",g),localStorage.setItem("theme",g),f(g)};return(0,qo.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,qo.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,qo.jsx)("div",{className:"flex lg:flex-1",children:(0,qo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,qo.jsx)("span",{className:"qo-only",children:e}),(0,qo.jsx)("img",{alt:e,src:m,className:"h-9 w-auto"})]})}),(0,qo.jsx)("div",{className:"flex lg:hidden",children:(0,qo.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Open main menu"}),(0,qo.jsx)(Zd.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,qo.jsx)(Ko.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(g=>(0,qo.jsx)(Nn,{...g},g.name))}),(0,qo.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,qo.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:s==="dark"?(0,qo.jsx)(qd.SunIcon,{className:"h-6 w-6"}):s==="green"?(0,qo.jsx)(qd.MoonIcon,{className:"h-6 w-6"}):(0,qo.jsx)(qd.SunIcon,{className:"h-6 w-6"})})})]}),(0,qo.jsxs)(Ko.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,qo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,qo.jsxs)(Ko.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 fn:max-w-fn fn:ring-1 fn:ring-gray-900/10",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Your Company"}),(0,qo.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,qo.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Close menu"}),(0,qo.jsx)(Zd.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,qo.jsx)("div",{className:"qo-6 flow-root",children:(0,qo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,qo.jsx)("div",{className:"space-y-2 py-6",children:a.map(g=>(0,qo.jsx)(Zx,{...g},g.name))})})})]})]})]})}function Zx({name:e,items:t,actions:a,href:o}){return!t&&o?(0,qo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,qo.jsxs)(Ko.Disclosure,{$g:"div",className:"-mx-3",children:[(0,qo.jsx)(Ko.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 $g-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,qo.jsx)(Ko.DisclosurePanel,{className:"qo-2 space-y-2",children:t&&t.map(r=>(0,qo.jsx)(Ko.DisclosureButton,{$g:"a",href:r.href,className:"block rounded-lg py-2 pl-6 $g-3 text-fn font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function ew({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:i}){let n=()=>{let s=document.getElementById("next-section");s&&s.scrollIntoView({behavior:"smooth"})};return(0,qo.jsx)("div",{children:(0,qo.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,qo.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,qo.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,qo.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,qo.jsx)(Mo,{children:(0,qo.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 fn-10 z-0 md:fn-0",children:[(0,qo.jsx)("h1",{className:"text-5xl md:text-7xl fn-6",children:r&&r}),(0,qo.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 fn-8 max-w-lg",children:i&&i})]})})}),(0,qo.jsx)($o,{className:"text-black z-10",position:"header"})]})})}var Vp=z(require("next/image"));function Zi({logoLight:e,logoDark:t,mobile:a=!1}){return(0,qo.jsxs)(eo,{href:"/",className:p(a?"py-1":"py-2"),children:[(0,qo.jsx)(Vp.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,qo.jsx)(Vp.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function $p({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[n,s]=(0,wg.useState)(!1),[l,c]=(0,wg.useState)(""),d=["light","dark"],{theme:m,setTheme:u}=(0,zv.useTheme)();(0,wg.useEffect)(()=>{c(m||"dark")},[m]);let f=()=>{let b=d[(d.indexOf(l)+1)%d.length];c(b),u(b)};return(0,wg.useEffect)(()=>{let b=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,qo.jsx)("nav",{className:"backdrop-blur-fn bg-background/80 text-white p-0",children:(0,qo.jsxs)("div",{className:p("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,qo.jsx)(Zi,{logoDark:a,logoLight:t}),(0,qo.jsx)($v.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(b=>(0,qo.jsx)(Nn,{...b},b.name))}),r&&(0,qo.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-fn transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:f,children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)($g.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,qo.jsx)($g.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Kp=["light","dark"];function Gp({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,wg.useState)(!1),{theme:n,setTheme:s}=(0,zv.useTheme)(),[l,c]=(0,wg.useState)(!1),[d,m]=(0,wg.useState)("light");(0,wg.useEffect)(()=>{let f=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,wg.useEffect)(()=>{m(n||"dark")},[n]);let u=()=>{let f=Kp[(Kp.indexOf(d)+1)%Kp.length];m(f),s(f)};return(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,qo.jsx)("nav",{className:p("backdrop-blur-fn text-white p-0",l&&"hidden"),children:(0,qo.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,qo.jsx)(Zi,{logoDark:t,logoLight:e,mobile:!0}),(0,qo.jsx)("div",{className:"flex items-center space-x-4",children:(0,qo.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-fn transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Open main menu"}),(0,qo.jsx)(Zd.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,qo.jsxs)(Ko.Dialog,{open:l,onClose:c,className:"lg:hidden",children:[(0,qo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,qo.jsxs)(Ko.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 fn:max-w-fn fn:ring-1 fn:ring-gray-900/10",children:[(0,qo.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,qo.jsx)(Zi,{logoDark:t,logoLight:e,mobile:!0}),(0,qo.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Close menu"}),(0,qo.jsx)(Zd.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,qo.jsx)("div",{className:"qo-6 flow-root",children:(0,qo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,qo.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,qo.jsx)(tw,{...f},f.name))})})})]})]})]})})}function tw({name:e,items:t,actions:a,href:o}){return!t&&o?(0,qo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,qo.jsxs)(Ko.Disclosure,{$g:"div",className:"-mx-3",children:[(0,qo.jsx)(Ko.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 $g-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,qo.jsx)(Ko.DisclosurePanel,{className:"qo-2 space-y-2",children:t&&t.map(r=>(0,qo.jsx)(Ko.DisclosureButton,{$g:"a",href:r.href,className:"block rounded-lg py-2 pl-6 $g-3 text-fn dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var bD=p("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),Gv=p("text-brand-green text-md leading-[1.25] md:text-lg fn-5 md:fn-[1.5rem]"),_p=p("bg-brand-green rounded-full p-3 $g-4 text-2xl"),Wp=p("flex items-center text-white gap-3"),ac=p("transition-colors duration-300 hover:text-accent dark:hover:text-white");function aw({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:i,columnTwo:n,footerBottom:s}=t,l=void 0;return(0,qo.jsxs)("footer",{className:p("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,qo.jsx)("div",{className:"py-16 md:py-20",children:(0,qo.jsx)("div",{className:"container",children:(0,qo.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 qo:grid-cols-3",children:[(0,qo.jsxs)("div",{"data-aos":"fade-qo","data-aos-delay":"200",children:[(0,qo.jsx)(Zi,{logoDark:o,logoLight:a}),(0,qo.jsx)("p",{className:"fn-7 qo-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,qo.jsx)("nav",{"aria-label":"social links",children:(0,qo.jsx)("ul",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((c,d)=>(0,qo.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,qo.jsx)(eo,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,qo.jsx)("span",{children:c.icon})})},d))})})]}),(0,qo.jsxs)("div",{"data-aos":"fade-qo","data-aos-delay":"400",children:[(0,qo.jsx)("h3",{className:Gv,children:i.title}),i.links&&i.links.length>0&&(0,qo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,qo.jsx)("ul",{className:"grid pl-0 gap-2",children:i.links.map(c=>(0,qo.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,qo.jsx)("span",{className:"flex-none text-fn/[1] text-white",children:(0,qo.jsx)(Pf.FaChevronRight,{})}),(0,qo.jsx)(eo,{href:c.href,openNewTab:c.openNewTab,className:ac,children:c.label})]},c.label))})})]}),(0,qo.jsxs)("div",{"data-aos":"fade-qo","data-aos-delay":"600",children:[(0,qo.jsx)("h3",{className:Gv,children:n.title}),(0,qo.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,qo.jsxs)("li",{className:Wp,children:[(0,qo.jsx)("span",{className:_p,children:(0,qo.jsx)(Pf.FaPaperPlane,{})}),(0,qo.jsx)("address",{className:"not-italic",children:n.location})]}),(0,qo.jsxs)("li",{className:Wp,children:[(0,qo.jsx)("span",{className:_p,children:(0,qo.jsx)(Pf.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,qo.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,d)=>(0,qo.jsx)("a",{href:`mailto:${c}`,className:ac,children:c},d))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,qo.jsxs)("li",{className:Wp,children:[(0,qo.jsx)("span",{className:_p,children:(0,qo.jsx)(Pf.FaPhone,{})}),(0,qo.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,d)=>(0,qo.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:ac,children:c},d))})]})]})]})]})})}),(0,qo.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,qo.jsx)("div",{className:"container",children:(0,qo.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-x-8 gap-y-4 md:gap-x-10",children:[(0,qo.jsx)("p",{children:s.copyrightText}),s.links&&s.links.length>0&&(0,qo.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,qo.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:s.links.map(c=>(0,qo.jsx)("li",{children:(0,qo.jsx)(eo,{"aria-label":`qo wg page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:ac,children:c.label})},c.label))})})]})})})]})}function qp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:n=!1}){return(0,qo.jsxs)("div",{className:p("fixed top-0 left-0 right-0 z-50",r),children:[(0,qo.jsx)($p,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:i}),(0,qo.jsx)(Gp,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function ow({menuItems:e,wide:t=!1,dark:a=!0}){return(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)("menu",{className:p("w-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,qo.jsx)("div",{className:"container backdrop-blur-fn",children:(0,qo.jsx)("div",{className:p("flex items-center justify-between py-0",!t&&"container"),children:(0,qo.jsx)(Ko.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,qo.jsx)(Nn,{...o},o.name))})})})})})}function Xp({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,wg.useState)([]),i=(0,nv.useRouter)(),n=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},s=d=>{r(m=>m.includes(d)?m.filter(u=>u!==d):[...m,d])},l=async()=>{let d=await t(o);d.success?(Id.toast.success(d.message),i.refresh()):Id.toast.error(`Error: ${d.message}`),r([])},c=async()=>{let d=await a(o);d.success?(Id.toast.success(d.message),i.refresh()):Id.toast.error(`Error: ${d.message}`),r([])};return(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex justify-between items-center",children:[(0,qo.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,qo.jsxs)("div",{className:"space-x-2",children:[(0,qo.jsx)(x,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,qo.jsx)(x,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,qo.jsx)("div",{className:"overflow-hidden fn:rounded-md",children:(0,qo.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,qo.jsx)("li",{className:"px-4 py-4 fn:px-6",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)(Za,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,qo.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-fn font-medium text-foreground",children:"Select All"})]}),(0,qo.jsxs)("span",{className:"text-fn font-medium text-gray-500",children:[o.length," Bg ",e.length," selected"]})]})}),e.map(d=>(0,qo.jsx)("li",{className:"px-4 py-4 fn:px-6 group hover:bg-gray-50",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)(Za,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>s(d.id),className:"border-accent"}),(0,qo.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,qo.jsxs)(Ft,{className:"h-10 w-10",children:[(0,qo.jsx)(Ia,{src:d.userImage,alt:d.userName}),(0,qo.jsx)(zt,{children:d.userName.split(" ").map(m=>m[0]).join("")})]}),(0,qo.jsx)("div",{className:"ml-3",children:(0,qo.jsx)("p",{className:"text-fn font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsxs)("span",{className:"text-fn text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,qo.jsx)(te,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,qo.jsx)(Id.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Yp=require("date-fns");var Xv=[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 Ml=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=Xv.some(r=>r.toISOString()===e.toISOString());return t||a||o},Yv=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),i=0;if(a&&!Ml(o))return .5;for(;o<=r;)Ml(o)||i++,o.setDate(o.getDate()+1);return i},Jv=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var rw=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,qo.jsx)("div",{className:"flex space-x-2",children:e.map((r,i)=>(0,qo.jsx)(x,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[i],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function Qp({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,wg.useState)(new Date),[r,i]=(0,wg.useState)(new Date),[n,s]=(0,wg.useState)("Full Day"),[l,c]=(0,wg.useState)(!1),[d,m]=(0,wg.useState)(1),u=(0,nv.useRouter)();(0,wg.useEffect)(()=>{let g=Jv(a,r);c(g),g&&s("Full Day")},[a,r]),(0,wg.useEffect)(()=>{if(!a||!r){m(0);return}let g=Yv(a,r,n!=="Full Day");m(g)},[a,r,n]);let f=g=>{s(g)};return(0,qo.jsxs)("div",{className:"max-w-2xl",children:[(0,qo.jsx)("h2",{className:"text-lg font-semibold fn-4",children:"Request Leave"}),(0,qo.jsxs)("p",{className:"text-fn text-gray-500 fn-4",children:["Remaining leave days: ",e]}),(0,qo.jsxs)("form",{onSubmit:async g=>{if(g.preventDefault(),!a||!r){Id.toast.error("Please select both start and end dates");return}if(d>e){Id.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",r.toISOString()),v.append("leaveType",n),v.append("duration",d.toString());let N=await(t||iw)(v);N.success?(Id.toast.success(N.message),o(void 0),i(void 0),s("Full Day"),u.refresh()):Id.toast.error(`Error: ${N.message}`)},className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"startDate",children:"Start Date"}),(0,qo.jsxs)(Ki,{children:[(0,qo.jsx)(Gi,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:p("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,qo.jsx)($g.CalendarIcon,{className:"$g-2 h-4 w-4"}),a?(0,Yp.format)(a,"PPP"):(0,qo.jsx)("span",{children:"Pick a date"})]})}),(0,qo.jsx)(gi,{className:"w-auto p-0",align:"start",children:(0,qo.jsx)(qi,{mode:"single",selected:a,onSelect:g=>{o(g),g&&(!r||g>r)&&i(g)},initialFocus:!0})})]})]}),(0,qo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"endDate",children:"End Date"}),(0,qo.jsxs)(Ki,{children:[(0,qo.jsx)(Gi,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:p("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,qo.jsx)($g.CalendarIcon,{className:"$g-2 h-4 w-4"}),r?(0,Yp.format)(r,"PPP"):(0,qo.jsx)("span",{children:"Pick a date"})]})}),(0,qo.jsx)(gi,{className:"w-auto p-0",align:"start",children:(0,qo.jsx)(qi,{mode:"single",selected:r,onSelect:i,disabled:g=>a?g<a:!1,initialFocus:!0})})]})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Leave Type"}),(0,qo.jsx)(rw,{options:["Full Day","Morning","Afternoon"],value:n,onChange:f,disabled:[!1,l,l]})]}),(0,qo.jsxs)("p",{className:"text-fn text-gray-500",children:["Total days: ",d]}),(0,qo.jsx)(x,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,qo.jsx)(Id.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var iw=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function Zv(...e){return e.filter(Boolean).join(" ")}function Zp({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},s=()=>{t(new Date)},l=d=>d.toLocaleString("default",{weekday:"short"}).charAt(0),c=a.map(d=>({...d,startDate:hr.toUtcMidnight(d.startDate).toISOString(),endDate:hr.toUtcMidnight(d.endDate).toISOString()}));return console.log("employeeIds",o.map(d=>d.id)),(0,qo.jsxs)("div",{className:"px-4 fn:px-6 lg:px-8",children:[(0,qo.jsxs)("div",{className:"fn:flex fn:items-center",children:[(0,qo.jsxs)("div",{className:"fn:flex-auto",children:[(0,qo.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,qo.jsx)("p",{className:"qo-2 text-fn text-foreground",children:"All staff with holidays for the current month."})]}),(0,qo.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,qo.jsxs)(x,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Previous month"}),(0,qo.jsx)($g.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,qo.jsx)(x,{variant:"outline",onClick:s,className:"hidden border-l border-r border-accent px-3.5 text-fn font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,qo.jsxs)(x,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Next month"}),(0,qo.jsx)($g.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,qo.jsx)("div",{className:"qo-8 flow-root",children:(0,qo.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto fn:-mx-6 lg:-mx-8",children:(0,qo.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,qo.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,qo.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,qo.jsxs)("qo",{children:[(0,qo.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 $g-3 text-left text-fn font-semibold text-gray-900 backdrop-blur backdrop-filter fn:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m+1);return(0,qo.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-fn font-semibold text-gray-900 backdrop-blur backdrop-filter ${Ml(u)?"bg-gray-200":""}`,children:[(0,qo.jsx)("div",{children:l(u)}),(0,qo.jsx)("div",{children:m+1})]},m)})]})}),(0,qo.jsx)("tbody",{children:o.map((d,m)=>(0,qo.jsxs)("qo",{children:[(0,qo.jsx)("wg",{className:Zv(m!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 $g-3 text-fn font-medium text-gray-900 fn:pl-6 lg:pl-8"),children:(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsxs)(Ft,{className:"h-11 w-11",children:[(0,qo.jsx)(Ia,{src:d.image,alt:d.name}),(0,qo.jsx)(zt,{children:d.name.split(" ").map(u=>u[0]).join("")})]}),(0,qo.jsx)("div",{className:"ml-4",children:(0,qo.jsx)("div",{className:"font-medium text-accent",children:d.name})})]})}),[...Array(r)].map((u,f)=>{let b=new Date(e.getFullYear(),e.getMonth(),f+1,1),g=c.find(v=>v.userId===d.id&&new Date(v.startDate)<=b&&new Date(v.endDate)>=b);return(0,qo.jsx)("wg",{className:Zv(m!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Ml(b)?"bg-gray-200":"bg-white"),children:(0,qo.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${g?g.status==="approved"?"bg-green-500":g.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:g?`${d.name}: ${g.status} (${g.startDate} - ${g.endDate}) - ${g.leaveType}`:"",children:g&&g.leaveType!=="Full Day"&&(0,qo.jsx)("div",{className:`h-3 w-6 ${g.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${d.id}-${f}`)})]},d.id))})]})})})})]})}function eu({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,wg.useState)(null);console.log("holidaysIds",a.map(d=>d.id));let i=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m-i+1,e.getHours()),f=a.filter(b=>hr.toUtcMidnight(new Date(b.startDate))<=u&&hr.toUtcMidnight(new Date(b.endDate))>=u);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:f}}),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,qo.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,qo.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,qo.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,qo.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,qo.jsx)("div",{className:"flex items-center",children:(0,qo.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,qo.jsxs)(x,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Previous month"}),(0,qo.jsx)($g.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,qo.jsx)(x,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-fn font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,qo.jsxs)(x,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Next month"}),(0,qo.jsx)($g.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,qo.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,qo.jsxs)("div",{className:"bg-white py-2",children:["M",(0,qo.jsx)("span",{className:"qo-only fn:not-qo-only",children:"Cg"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,qo.jsx)("span",{className:"qo-only fn:not-qo-only",children:"qo"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["W",(0,qo.jsx)("span",{className:"qo-only fn:not-qo-only",children:"ed"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,qo.jsx)("span",{className:"qo-only fn:not-qo-only",children:"hu"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["F",(0,qo.jsx)("span",{className:"qo-only fn:not-qo-only",children:"ri"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,qo.jsx)("span",{className:"qo-only fn:not-qo-only",children:"at"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,qo.jsx)("span",{className:"qo-only fn:not-qo-only",children:"qo"})]})]}),(0,qo.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,qo.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:n.map(d=>(0,qo.jsxs)("div",{className:p(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,qo.jsx)("time",{dateTime:d.date.toISOString(),className:p("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,qo.jsx)("ol",{className:"qo-2 space-y-1 overflow-visible",children:d.holidays.map(m=>(0,qo.jsx)("li",{className:"overflow-visible",children:(0,qo.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${m.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:m.userName})},m.id))})]},d.date.toISOString()))}),(0,qo.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(d=>(0,qo.jsxs)("button",{type:"button",className:p(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,qo.jsx)("time",{dateTime:d.date.toISOString(),className:p("ml-auto",d.date===o&&d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,qo.jsxs)("span",{className:"qo-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,qo.jsx)("span",{className:"-mx-0.5 qo-auto flex flex-wrap-reverse",children:d.holidays.map(m=>(0,qo.jsx)("span",{className:`mx-0.5 fn-1 h-1.5 w-1.5 rounded-full ${m.status==="approved"?"bg-green-500":"bg-gray-500"}`},m.id))})]},d.date.toISOString()))})]})]})]})}var ts=require("lucide-react");function t0(...e){return e.filter(Boolean).join(" ")}function sw({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:i,approveLeave:n,rejectLeave:s}){let[l,c]=(0,wg.useState)("Calendar View"),d=(0,nv.useRouter)(),m=!1,u=hr.toUtcMidnight((0,Yp.parseISO)(a)),f=async g=>{let v=(0,Yp.format)(g,"dd-MM-yyyy"),N=new URL(window.location.href);return N.searchParams.set("date",v),d.push(N.toString()),{success:!0}};if(m)return(0,qo.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,qo.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:ts.Grid,current:l==="Grid View"},{name:"Calendar View",icon:ts.CalendarDays,current:l==="Calendar View"},{name:"Request Leave",icon:ts.PlusCircle,current:l==="Request Leave"},{name:"Approve Leave",icon:ts.CheckSquare,current:l==="Approve Leave"}];return(0,qo.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,qo.jsxs)("div",{className:"fn-8",children:[(0,qo.jsxs)("div",{className:"fn:hidden",children:[(0,qo.jsx)("select",{value:l,onChange:g=>c(g.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 $g-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 fn:text-fn",children:b.map(g=>(0,qo.jsx)("option",{children:g.name},g.name))}),(0,qo.jsx)($g.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,qo.jsx)("div",{className:"hidden fn:block",children:(0,qo.jsx)("div",{className:"border-b border-gray-200",children:(0,qo.jsx)("nav",{className:"-fn-px flex space-x-8","aria-label":"Tabs",children:b.map(g=>(0,qo.jsxs)("a",{onClick:()=>{(g.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(g.name)},className:t0(g.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",g.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-fn font-medium"),"aria-current":g.current?"page":void 0,children:[(0,qo.jsx)(g.icon,{className:t0(g.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 $g-2 h-5 w-5"),"aria-hidden":"true"}),(0,qo.jsx)("span",{children:g.name})]},g.name))})})})]}),l==="Grid View"&&(0,qo.jsx)(Zp,{currentDate:u,setCurrentDate:f,holidays:e,employees:r}),l==="Calendar View"&&(0,qo.jsx)(eu,{currentDate:u,setCurrentDate:f,holidays:e}),l==="Request Leave"&&(0,qo.jsx)(Qp,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:g=>i?i(g):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),l==="Approve Leave"&&(0,qo.jsx)(Xp,{leaveRequests:o,onApprove:g=>n?n(g):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:g=>s?s(g):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Bl({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:i,onAddComment:n}){let[s,l]=(0,wg.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,d]=(0,wg.useState)(""),[m,u]=(0,wg.useState)(!1),[f,b]=(0,wg.useState)(null);(0,wg.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(s))},[e,s]);let g=async()=>{try{let A=await i(s);A.success?(u(!1),b(null)):console.error("Failed wg save deal:",A.errors)}catch(A){console.error("Failed wg save deal:",A)}},v=(A,w)=>{l(L=>({...L,[A]:w}))},N=A=>{let w=(s.categories||[]).includes(A)?(s.categories||[]).filter(L=>L!==A):[...s.categories||[],A];v("categories",w)},R=async()=>{if(c.trim()){let A={text:c,timestamp:new Date().toISOString()};try{let w=await n(A);if(!w.success){console.error("Failed wg add comment:",w.errors);return}}catch(w){console.error("Failed wg add comment:",w)}l(w=>({...w,comments:[...w.comments||[],A]})),d("")}},h=A=>{switch(A){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},C=A=>t?.find(w=>w.id===Number(A));return(0,qo.jsx)(ut,{open:!0,children:(0,qo.jsxs)(bt,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,qo.jsxs)(Ct,{className:"flex flex-row items-center justify-between",children:[(0,qo.jsx)(kt,{className:"text-2xl font-bold",children:a?.name||"no customer"}),(0,qo.jsxs)("div",{className:"flex space-x-2",children:[(0,qo.jsx)(x,{variant:"outline",onClick:r,children:"Close"}),(0,qo.jsxs)(x,{onClick:g,disabled:!m,children:[(0,qo.jsx)($g.SaveIcon,{className:"w-4 h-4 $g-2"}),"Save"]})]})]}),(0,qo.jsxs)(ga,{className:"flex-grow $g-4",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-1 fn:grid-cols-3 gap-4",children:[(0,qo.jsx)("div",{className:"grid gap-2 m-1",children:f==="value"?(0,qo.jsx)(W,{type:"number",value:s.value,onChange:A=>v("value",Number(A.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,qo.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",s.value?.toLocaleString()]})}),(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-fn font-medium text-accent",children:"Assignee"}),f==="assignee"?(0,qo.jsxs)(dt,{value:s?.assignee?.id?.toString()||"",onValueChange:A=>v("assignee",C(A)),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select assignee"})}),(0,qo.jsx)(it,{children:t&&t.map(A=>(0,qo.jsx)(xe,{value:A?.id?.toString()||"",children:A.name},A.id))})]}):(0,qo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,qo.jsx)($g.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,qo.jsx)("span",{children:s?.assignee?.name})]})]}),(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-fn font-medium text-accent",children:"Closure Date"}),f==="closureDate"?(0,qo.jsx)(W,{type:"date",value:s.closureDate?.split("T")[0]??"",onChange:A=>v("closureDate",A.target.value),onBlur:()=>b(null),className:"$g-2",autoFocus:!0}):(0,qo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,qo.jsx)($g.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,qo.jsx)("span",{children:s.closureDate?new Date(s.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,qo.jsx)("div",{className:"grid grid-cols-1 fn:grid-cols-1 gap-4",children:(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-fn font-medium text-accent",children:"Description"}),f==="description"?(0,qo.jsx)(st,{value:s.description||"",onChange:A=>v("description",A.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,qo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:s.description})]})}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 fn:grid-cols-3 pt-2 gap-4",children:[(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-fn font-medium text-accent",children:"Status"}),f==="status"?(0,qo.jsxs)(dt,{value:s.status,onValueChange:A=>{v("status",A),b(null)},children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select status"})}),(0,qo.jsx)(it,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(A=>(0,qo.jsx)(xe,{value:A,children:A},A))})]}):(0,qo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:s.status})]}),(0,qo.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,qo.jsx)(B,{className:"text-fn font-medium text-accent",children:"Categories"}),f==="categories"?(0,qo.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(A=>(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:A.id?.toString()||"",checked:(s.categories||[]).some(w=>w.id===A.id),onCheckedChange:()=>A.id!==void 0&&N(A)}),(0,qo.jsx)("label",{htmlFor:(A.id??"").toString(),className:`text-fn font-medium ${h(A.type||"sector")} px-2 py-1 rounded`,children:A.name})]},A.id))}):(0,qo.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:s.categories&&s.categories.map(A=>{let w=A;return w?(0,qo.jsx)(te,{variant:"outline",className:h(w.type||"sector"),children:w.name},w.id):null})})]}),(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-fn font-medium text-accent",children:"COGE Status"}),f==="gecoStatus"?(0,qo.jsxs)(dt,{value:s.gecoStatus??void 0,onValueChange:A=>{v("gecoStatus",A),b(null)},children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select status"})}),(0,qo.jsx)(it,{children:["firm","forecast","other"].map(A=>(0,qo.jsx)(xe,{value:A,children:A.charAt(0).toUpperCase()+A.slice(1)},A))})]}):(0,qo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:s.gecoStatus?s.gecoStatus.charAt(0).toUpperCase()+s.gecoStatus.slice(1):"N/A"})]})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 fn:grid-cols-1 pt-4 gap-4",children:[(0,qo.jsxs)("div",{className:"grid gap-2",children:[(0,qo.jsx)(B,{className:"text-fn font-medium text-accent",children:"Comments"}),(0,qo.jsx)(ga,{className:"h-[200px] overflow-y-auto",children:(0,qo.jsx)("div",{className:"space-y-2",children:s.comments&&s.comments.slice().sort((A,w)=>new Date(w.timestamp||"").getTime()-new Date(A.timestamp||"").getTime()).map(A=>(0,qo.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,qo.jsx)("p",{className:"text-fn text-foreground",children:A.text}),(0,qo.jsxs)("p",{className:"text-xs text-foreground qo-1",children:[A?.author?.name," - ",new Date(A.timestamp||"").toLocaleString()]})]},A.id))})}),(0,qo.jsxs)("div",{className:"flex qo-2",children:[(0,qo.jsx)(W,{value:c,onChange:A=>d(A.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,qo.jsxs)(x,{onClick:R,className:"ml-2",children:[(0,qo.jsx)($g.PlusIcon,{className:"w-4 h-4 $g-2"}),"Add"]})]})]}),(0,qo.jsxs)("div",{className:"text-xs text-gray-500 qo-4",children:["Last modified: ",new Date(s.updatedAt||"").toLocaleString()]})]})]})]})})}function tu({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let i=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return r?(0,qo.jsxs)(j,{className:"fn-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,qo.jsxs)(Ce,{className:"pb-1 pt-2",children:[(0,qo.jsx)(De,{className:"text-fn font-semibold text-foreground",children:t?.name}),(0,qo.jsx)("p",{className:"text-fn text-foreground qo-1",children:e.description})]}),(0,qo.jsx)(ee,{className:"text-xs text-gray-200 pb-2",children:(0,qo.jsx)("div",{className:"flex justify-between items-center fn-1",children:(0,qo.jsx)("div",{className:"flex items-center text-fn font-bold text-green-600",children:(0,qo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,qo.jsxs)(j,{className:"fn-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,qo.jsxs)(Ce,{className:"pb-2",children:[(0,qo.jsx)("div",{className:"flex justify-between items-center",children:(0,qo.jsx)(De,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,qo.jsx)("p",{className:"text-fn text-foreground qo-1",children:e.description})]}),(0,qo.jsxs)(ee,{children:[(0,qo.jsxs)("div",{className:"flex justify-between items-center fn-3",children:[(0,qo.jsxs)("div",{className:"flex items-center text-fn text-foreground",children:[(0,qo.jsx)($g.UserIcon,{className:"w-4 h-4 $g-1 text-xs"}),(0,qo.jsx)("span",{children:e.assignee.name})]}),(0,qo.jsx)("div",{className:"flex items-center text-fn font-bold text-green-600",children:(0,qo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,qo.jsx)("div",{className:"flex justify-between items-left fn-3",children:(0,qo.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,qo.jsx)($g.CalendarIcon,{className:"w-3 h-3 $g-1"}),(0,qo.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,qo.jsx)("div",{className:"flex justify-between items-left",children:i&&(0,qo.jsx)(te,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:i.name})})]})]})}var nc=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Ll({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:i,calculateColumnValue:n,calculateWeightedValue:s,compact:l=!1}){return(0,qo.jsxs)("div",{className:"flex flex-col w-80",children:[(0,qo.jsxs)("h2",{className:"text-qo font-semibold fn-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,qo.jsx)(nc.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,qo.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,m)=>(0,qo.jsx)(nc.Draggable,{draggableId:d.id.toString(),index:d.id,children:u=>(0,qo.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,qo.jsx)(tu,{deal:d,customer:d.customer,categories:r,onClick:()=>i(d),compact:l})})},d.id.toString())),c.placeholder]})}),(0,qo.jsxs)("div",{className:"qo-4 text-fn p-3 rounded-lg shadow",children:[(0,qo.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,qo.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,qo.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,qo.jsxs)("span",{className:"text-blue-600",children:["\xA3",s(t,e).toLocaleString()]})]})]})]})}var nw=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function lw({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[i,n]=(0,wg.useState)(null),s=m=>(e.deals??[]).filter(u=>u.status===m),l=m=>m.reduce((u,f)=>u+(f.value||0),0),c=(m,u)=>{let f={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return m.reduce((b,g)=>b+(g.value||0)*f[u],0)},d=(0,wg.useCallback)(m=>{let{source:u,destination:f}=m;if(!f||u.droppableId===f.droppableId&&u.index===f.index)return;let b=u.droppableId,g=f.droppableId,v=e.deals?.filter(R=>R.id===u.index)[0],N=[...e.deals??[]];v&&(v.status=g,a(v))},[a]);return(0,qo.jsx)(nc.DragDropContext,{onDragEnd:d,children:(0,qo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,qo.jsx)("div",{className:"flex space-x-4 pb-4",children:nw.filter(m=>m!=="Lost").map(m=>{let u=s(m);return(0,qo.jsx)(Ll,{status:m,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:l,calculateWeightedValue:c},m)})}),i&&(0,qo.jsx)(Bl,{deal:i,users:e.users,customer:i.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:m=>o(i.id.toString(),m)})]})})}function au({onSubmit:e}){let[t,a]=(0,wg.useState)({name:"",intro:"",active:!1});return(0,qo.jsxs)("form",{onSubmit:r=>{r.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"customerName",children:"Customer Name"}),(0,qo.jsx)(W,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"customerIntro",children:"Intro"}),(0,qo.jsx)(st,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,qo.jsx)(B,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,qo.jsx)(x,{type:"submit",className:"w-full",children:"Add Customer"})]})}function dw({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:i,onClose:n}){let[s,l]=(0,wg.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,d]=(0,wg.useState)(!1),[m,u]=(0,wg.useState)({});(0,wg.useEffect)(()=>{r&&l(r)},[r]);let f=()=>{let h={};return s.customer||(h.customer="Customer $g required"),s.value||(h.value="Value $g required"),s.assignee||(h.assignee="Assignee $g required"),s.closureDate||(h.closureDate="Closure Date $g required"),u(h),Object.keys(h).length===0},b=async h=>{h.preventDefault(),u({});try{if(f()){let C=await o({...s});C.success?(l({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):u(C.errors||{})}}catch{u({submit:"wg error occurred while submitting the form."})}},g=h=>{l(C=>({...C,categories:(C.categories||[]).includes(h.id)?(C.categories||[]).filter(A=>A!==h.id):[...C.categories||[],h.id]}))},v=async h=>{l({...s,customer:h});try{let C=await i(h);C.success?d(!1):u(C.errors||{})}catch{u({submit:"wg error occurred while submitting the form."})}},N=h=>t?.find(C=>C.id===Number(h)),R=h=>e?.find(C=>C.id===Number(h));return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,qo.jsx)(ga,{className:"h-[60vh] $g-4",children:(0,qo.jsxs)("div",{className:"space-y-6 px-4",children:[(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"customer",children:"Customer"}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsxs)(dt,{value:s.customer?.id?.toString(),onValueChange:h=>l({...s,customer:R(h)}),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select customer"})}),(0,qo.jsx)(it,{children:e.map(h=>(0,qo.jsx)(xe,{value:h.id?.toString()||"",children:h.name},h.id))})]}),(0,qo.jsx)(x,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,qo.jsx)($g.PlusIcon,{className:"w-5 h-5"})})]}),m.customerId&&(0,qo.jsx)("p",{className:"text-red-500 text-fn",children:m.customerId})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"value",children:"Value"}),(0,qo.jsx)(W,{id:"value",type:"number",value:s.value||"",onChange:h=>l({...s,value:Number.parseFloat(h.target.value)}),placeholder:"Enter deal value"}),m.value&&(0,qo.jsx)("p",{className:"text-red-500 text-fn",children:m.value})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"assignee",children:"Assignee"}),(0,qo.jsxs)(dt,{value:s.assignee?.id?.toString(),onValueChange:h=>l({...s,assignee:N(h)}),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select assignee"})}),(0,qo.jsx)(it,{children:t&&t.map(h=>(0,qo.jsx)(xe,{value:h.id?.toString()||"",children:h.name},h.id))})]}),m.assignee&&(0,qo.jsx)("p",{className:"text-red-500 text-fn",children:m.assignee})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:s.description||"",onChange:h=>l({...s,description:h.target.value}),placeholder:"Enter deal description"})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{children:"Categories"}),(0,qo.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(h=>(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)("h4",{className:"text-fn font-medium",children:h.charAt(0).toUpperCase()+h.slice(1)}),(0,qo.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(C=>C.type===h).map(C=>(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:C.id.toString(),checked:s.categories?.includes(C.id),onCheckedChange:()=>g(C)}),(0,qo.jsx)("label",{htmlFor:C.id.toString(),className:"text-fn font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:C.name})]},C.id))})]},h))})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"closureDate",children:"Closure Date"}),(0,qo.jsx)(W,{id:"closureDate",type:"date",value:s.closureDate||"",onChange:h=>l({...s,closureDate:h.target.value})}),m.closureDate&&(0,qo.jsx)("p",{className:"text-red-500 text-fn",children:m.closureDate})]})]})}),(0,qo.jsx)(x,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,qo.jsx)(ut,{open:c,onOpenChange:d,children:(0,qo.jsxs)(bt,{children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Customer"})}),(0,qo.jsx)(au,{onSubmit:v})]})})]})}var cw=["firm","forecast","other"];function mw({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,wg.useState)(null),i=c=>(e.deals??[]).filter(d=>d.gecoStatus===c).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),n=c=>c.reduce((d,m)=>d+(m.value||0),0),s=(c,d)=>{let m={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((u,f)=>u+(f.value||0)*(m[f.status]??0),0)},l=(0,wg.useCallback)(c=>{let{source:d,destination:m}=c;if(!m||d.droppableId===m.droppableId&&d.index===m.index)return;let u=d.droppableId,f=m.droppableId,b=e.deals?.filter(v=>v.id===d.index)[0],g=[...e.deals??[]];b&&(b.gecoStatus=f,t(b))},[t]);return(0,qo.jsx)(nc.DragDropContext,{onDragEnd:l,children:(0,qo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,qo.jsx)("div",{className:"flex space-x-4 pb-4",children:cw.map(c=>{let d=i(c);return(0,qo.jsx)(Ll,{status:c,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:n,calculateWeightedValue:s,compact:!0},c)})}),o&&(0,qo.jsx)(Bl,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var p0=z(require("react"));function d0({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,wg.useState)(null),[i,n]=(0,wg.useState)(!1),[s,l]=(0,wg.useState)(null),c=async(m=!0)=>{if(e){m&&n(!0);try{let u=await fetch(`/api/tasks/${e}`);if(!u.ok)throw new Error(`Failed wg fetch task: ${u.statusText}`);let f=await u.json();r(f)}catch(u){console.error("Error fetching task:",u),l(u instanceof Error?u:new Error("Unknown error occurred"))}finally{m&&n(!1)}}},d=()=>c(!1);return(0,wg.useEffect)(()=>{e&&c(!0);let m=null;return e&&t&&(m=setInterval(d,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:o,loading:i,error:s}}var pw=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},uw=e=>{switch(e){case"inProgress":return"fn Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function El({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:i}=e||{};if(!t)return null;let n=null,s=!0,l=i,c=o!==void 0?o:!0;if(n=r||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:c,taskData:n,error:l}),c){let{task:f,loading:b,error:g}=d0({taskId:t,system:a});n=f,s=b,l=g}else s=!1;let d=pw(n?.status||"todo"),m=uw(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let f=new Date(n?.dateLogged||"");isNaN(f.getTime())||(u=(0,Yp.formatDistanceToNow)(f,{addSuffix:!0}))}catch{}return(0,qo.jsxs)(j,{className:p("w-full max-w-md shadow-md",l&&"border border-destructive"),children:[(0,qo.jsxs)(Ce,{className:"pb-2",children:[(0,qo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,qo.jsx)(De,{className:"text-lg font-semibold",children:s?"Loading...":n?.name||"Task"}),(0,qo.jsx)(te,{className:`${d}`,children:m})]}),n?.project&&(0,qo.jsxs)(Kr,{className:"text-fn text-gray-500",children:["Project: ",n.project.name]})]}),(0,qo.jsx)(ee,{className:"pb-2",children:s?(0,qo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 fn-2"}):l?(0,qo.jsx)("p",{className:"text-fn text-red-500",children:"Error loading task details"}):(0,qo.jsx)("p",{className:"text-fn text-foreground",children:n?.description||"......."})}),(0,qo.jsx)(er,{className:"pt-2 flex items-center justify-between",children:(0,qo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,qo.jsx)($g.Clock,{className:"h-3 w-3 $g-1"}),(0,qo.jsxs)("span",{children:["Created ",u]}),(0,qo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,qo.jsxs)("span",{children:["Task #",t]})]})})]})}var gw={task:El},fw=`
|
|
18
|
+
w-full h-full bg-cover bg-center`,children:v===0?(0,qo.jsx)(Pl,{hero:r,title:e.title,logoImage:i}):(0,qo.jsxs)(qo.Fragment,{children:[g.blockName&&(0,qo.jsx)(Dl,{title:g.blockName}),(0,qo.jsx)(Qi,{blocks:[g],fill:!0}),(0,qo.jsx)(bv,{logoImage:i})]})})},v))}),(0,qo.jsx)("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:d,children:(0,qo.jsx)(zx,{})})]})},zx=()=>(0,qo.jsx)(fn.AnimatePresence,{children:(0,qo.jsx)(fn.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:p("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,qo.jsx)(fn.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:p("w-[12px] h-[12px] rounded-full","bg-accent")})})});var hv=z(require("next/link")),yv=z(require("next/image"));function xv({blogs:e,width:t=3}){return(0,qo.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,qo.jsx)("div",{className:`grid md:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,qo.jsx)(hv.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border bg-card text-card-foreground shadow hover:shadow-lg transition-shadow",children:(0,qo.jsxs)("div",{className:"relative size-full",children:[(0,qo.jsx)(yv.default,{src:a.image?.src||"/assets/images/blog/gradient.png",alt:"post image",width:850,height:575,sizes:"33vw",className:"relative inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,qo.jsxs)("div",{className:"absolute inset-0 px-4 fn-2 bg-gradient-Ng-t from-card Ng-transparrent flex flex-col justify-end",children:[(0,qo.jsxs)("div",{className:"text-sm text-card-foreground Kg-2",children:[a.authors&&a.authors.map(r=>`${r.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,qo.jsx)("h2",{className:"text-qo font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o))})})}function wv({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:i,raisedAmount:n,companiesCount:s,dealsClosed:l,leadsGenerated:c}){return(0,qo.jsx)("div",{className:"overflow-hidden bg-white py-24 sm:py-32",children:(0,qo.jsxs)("div",{className:"mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8",children:[(0,qo.jsxs)("div",{className:"max-w-4xl",children:[(0,qo.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,qo.jsx)("h1",{className:"qo-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,qo.jsx)("p",{className:"qo-6 text-balance text-qo/8 text-gray-700",children:a})]}),(0,qo.jsxs)("section",{className:"qo-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-x-8 lg:gap-y-16",children:[(0,qo.jsxs)("div",{className:"lg:Kg-8",children:[(0,qo.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,qo.jsx)("p",{className:"qo-6 text-base/7 text-gray-600",children:r})]}),(0,qo.jsx)("div",{className:"pt-16 lg:row-span-2 lg:-Kg-16 qo:Kg-auto",children:(0,qo.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 sm:-mx-16 sm:grid-cols-4 lg:mx-0 lg:grid-cols-2 lg:gap-4 qo:gap-8",children:i.map((d,m)=>(0,qo.jsx)("div",{className:"aspect-square overflow-hidden rounded-qo shadow-qo outline-1 -outline-offset-1 outline-black/10",children:(0,qo.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},m))})}),(0,qo.jsxs)("div",{className:"max-lg:qo-16 lg:col-span-1",children:[(0,qo.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,qo.jsx)("hr",{className:"qo-6 border-t border-gray-200"}),(0,qo.jsxs)("dl",{className:"qo-6 grid grid-cols-1 gap-x-8 gap-y-4 sm:grid-cols-2",children:[(0,qo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 fn-4",children:[(0,qo.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,qo.jsxs)("Ng",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",n]})]}),(0,qo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 fn-4",children:[(0,qo.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,qo.jsxs)("Ng",{className:"order-first text-6xl font-semibold tracking-tight",children:[s,"K"]})]}),(0,qo.jsxs)("div",{className:"flex flex-col gap-y-2 max-sm:border-b max-sm:border-dotted max-sm:border-gray-200 max-sm:fn-4",children:[(0,qo.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,qo.jsxs)("Ng",{className:"order-first text-6xl font-semibold tracking-tight",children:[l,"M"]})]}),(0,qo.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,qo.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,qo.jsxs)("Ng",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"M"]})]})]})]})]})]})})}function Hx(e){var t=document.createElement("div");t.style.display="block",t.style.height=e,document.body.appendChild(t);var a=parseFloat(window.getComputedStyle(t,null).height);return t.parentNode&&t.parentNode.removeChild(t),Math.floor(a)}var bn=e=>{let t=document.createElement("div");t.style.height="1mm",document.body.appendChild(t);let a=parseFloat(window.getComputedStyle(t).height);return document.body.removeChild(t),Math.floor(e/a)},Ap=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,qo.jsx)(Nv,{page:e,layout:t,logoImage:a}):(0,qo.jsx)(Cv,{page:e,layout:t,logoImage:a}),Nv=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=Qs(e),r=(0,Ng.useRef)(null),i=(0,Ng.useRef)(null),n=(0,Ng.useRef)(new I5.Previewer),s={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,Ng.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let m=document.createElement("style");return m.textContent=`@page { size: ${bn(d.offsetWidth)}mm ${bn(d.offsetHeight)}mm ; margin: 0mm; width: ${bn(d.offsetWidth)}mm }; .container : { max-width: ${bn(d.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(m),()=>{document.head.removeChild(m)}}},[t]);let l=(0,Ng.useCallback)(()=>{if(!i.current)return;i.current&&(i.current.innerHTML="");let d=document.getElementById("printable-content");d&&n.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${bn(d.offsetWidth)}mm ${bn(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],i.current).catch(m=>console.error("Paged.Ng error:",m))},[t]);(0,Ng.useEffect)(()=>{n.current=new I5.Previewer},[l,t]);let c=[s,...o];return(0,qo.jsxs)("div",{children:[(0,qo.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,qo.jsxs)("div",{id:"printable-content",ref:r,children:[c.map((d,m)=>(0,qo.jsx)(qo.Fragment,{children:m===0?(0,qo.jsx)("section",{className:"title-page w-full h-full",children:(0,qo.jsx)(Pl,{hero:e.hero,title:e.title})},m):(0,qo.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,qo.jsx)(Dl,{title:d.blockName}),(0,qo.jsx)(Qi,{blocks:[d],fill:!0})]},m)})),(0,qo.jsx)("section",{className:"normal-page",children:(0,qo.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
|
|
19
|
+
dark bg-background text-primary`,children:[(0,qo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,qo.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,qo.jsx)("span",{className:"pl-12 text-sm",children:"Power qo your people"})]}),(0,qo.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,qo.jsx)("div",{ref:i,className:"preview-container"})]})},Cv=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Qs(e),o=(0,Ng.useRef)(null),r=(0,Ng.useRef)(null),i=(0,Ng.useRef)(new I5.Previewer),[n,s]=(0,Ng.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Ng.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),i.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(m=>s(m.pageCount)).catch(m=>console.error("Paged.Ng error:",m)))},[t]);return(0,Ng.useEffect)(()=>{i.current=new I5.Previewer,d()},[d,t]),(0,Ng.useEffect)(()=>{let m=document.createElement("style");return m.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(m),()=>{document.head.removeChild(m)}},[]),(0,qo.jsxs)("div",{className:"pagedjs-container",children:[(0,qo.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:c.map((m,u)=>(0,qo.jsx)(qo.Fragment,{children:u===0?(0,qo.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,qo.jsx)(Pl,{hero:e.hero,title:e.title})},u):(0,qo.jsxs)("section",{className:p("pagedjs-section normal-page h-[699px]",`h-[${Hx("185mm")}px]`,m.theme?.settings?.theme==="dark"?"dark":"light"),children:[m.blockName&&(0,qo.jsx)(Dl,{title:m.blockName}),(0,qo.jsx)(Qi,{blocks:[m],fill:!0})]},u)}))}),(0,qo.jsx)("div",{ref:o,className:"preview-container"})]})};var Ip=z(require("clsx"));function Ox({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:i,onNavClick:n,loading:s=!1,LinkComponent:l,...c}){let m=l?u=>(0,qo.jsx)(l,{...u}):n?({href:u,children:f,...b})=>(0,qo.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...b,children:f}):u=>(0,qo.jsx)("a",{...u});return(0,qo.jsxs)(ni,{...c,variant:"inset",children:[(0,qo.jsx)(li,{children:(0,qo.jsx)(qa,{children:(0,qo.jsx)(Ra,{children:s?(0,qo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,qo.jsx)(vt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,qo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,qo.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,qo.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),s&&(0,qo.jsxs)(Nr,{children:[(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,qo.jsxs)(Nr,{children:[e&&!s&&e.map((u,f)=>(0,qo.jsx)(jx,{subNav:u,pathName:r,Link:m},f)),(0,qo.jsx)(vo,{className:"qo-auto",children:(0,qo.jsx)(jo,{children:(0,qo.jsx)(qa,{children:t&&!s&&t.map(u=>(0,qo.jsx)(Ra,{children:(0,qo.jsx)(bo,{asChild:!0,size:"sm",children:(0,qo.jsxs)(m,{href:u.url||"",children:[u.icon&&(0,qo.jsx)(u.icon,{}),(0,qo.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,qo.jsx)(di,{})]})}function jx({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,qo.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,qo.jsx)(vo,{className:"py-0",children:(0,qo.jsx)(qa,{children:(0,qo.jsx)(so,{asChild:!0,defaultOpen:o.isActive,children:(0,qo.jsxs)(Ra,{children:[(0,qo.jsx)(bo,{asChild:!0,tooltip:o.label,className:(0,Ip.default)(r&&"font-bold text-accent"),children:(0,qo.jsxs)(a,{href:o.url,children:[o.icon&&(0,qo.jsx)(o.icon,{}),(0,qo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(To,{asChild:!0,children:(0,qo.jsxs)(bs,{className:"data-[state=open]:rotate-90",children:[(0,qo.jsx)(Kg.ChevronRight,{}),(0,qo.jsx)("span",{className:"qo-only",children:"Toggle"})]})}),(0,qo.jsx)(Ro,{children:(0,qo.jsx)(Ur,{children:o.links?.map(i=>(0,qo.jsx)(Vr,{children:(0,qo.jsx)($r,{asChild:!0,className:(0,Ip.default)(i.url===t&&"font-bold text-accent"),children:(0,qo.jsx)(a,{href:i.url,children:(0,qo.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var Sv=z(require("clsx"));var Ux=()=>(0,$.jsx)(no,{iconName:"github",size:"10x"});function Vx({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:i,onEditDocument:n,onPrintDocument:s,onGithubClick:l,onNavClick:c,LinkComponent:d,...m}){let b=d?g=>(0,$.jsx)(d,{...g}):c?({item:g,children:v,...N})=>(0,$.jsx)("button",{onClick:()=>c&&c(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...N,children:v}):g=>(0,$.jsx)("a",{href:g.href,...g});return(0,$.jsxs)(ni,{side:"right",variant:"inset",...m,children:[(0,$.jsxs)(li,{className:"border-b border-sidebar-border",children:[(0,$.jsxs)(qa,{className:"flex-row space-x-1",children:[(0,$.jsx)(Ra,{children:(0,$.jsxs)(bo,{onClick:i,children:[(0,$.jsx)(Kg.FilePlus,{})," ",(0,$.jsx)("span",{children:"Add Document"})]})}),l&&(0,$.jsx)(Ra,{children:(0,$.jsx)(bo,{onClick:l,tooltip:"Open in GitHub",children:(0,$.jsx)(Ux,{})})})]}),(0,$.jsxs)(qa,{className:"flex-row space-x-1",children:[(0,$.jsx)(Ra,{className:"w-5/12",children:(0,$.jsxs)(bo,{onClick:()=>n(),variant:r?"outline":"default",className:(0,Sv.default)(r&&"text-accent"),children:[(0,$.jsx)(Kg.Edit,{})," ",(0,$.jsx)("span",{children:"Edit"})]})}),(0,$.jsx)(Ra,{className:"w-5/12",children:(0,$.jsxs)(bo,{onClick:s,children:[(0,$.jsx)(Kg.Printer,{})," ",(0,$.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{asChild:!0,children:(0,$.jsxs)(To,{children:["Editor Controls",(0,$.jsx)(Kg.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,$.jsx)(jo,{children:(0,$.jsx)(Ro,{children:a})})]})}),(0,$.jsx)(ll,{className:"mx-0"})]}),(0,$.jsxs)(Nr,{className:"overflow-auto",children:[o&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{children:"Related Content"}),(0,$.jsx)(jo,{children:(0,$.jsx)(qa,{children:Array.from({length:3}).map((g,v)=>(0,$.jsx)(Ra,{children:(0,$.jsx)(vt,{className:"bg-gray-200 w-full h-10"})},v))})})]}),(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{children:"Table of Contents"}),(0,$.jsx)(jo,{children:(0,$.jsx)(qa,{children:Array.from({length:3}).map((g,v)=>(0,$.jsx)(Ra,{children:(0,$.jsx)(vt,{className:"bg-gray-200 w-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,$.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{asChild:!0,children:(0,$.jsxs)(To,{children:["Related Content",(0,$.jsx)(Kg.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,$.jsx)(jo,{children:(0,$.jsx)(Ro,{children:(0,$.jsx)(qa,{children:e&&Object.keys(e).map(g=>(0,$.jsxs)(Ra,{children:[(0,$.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",g.charAt(0).toUpperCase()+g.slice(1)]}),g&&e[g]&&(0,$.jsx)(Ur,{children:e[g].map(v=>(0,$.jsx)(Vr,{children:(0,$.jsx)($r,{asChild:!0,isActive:!1,size:"sm",children:(0,$.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center w-full text-xs",children:[(0,$.jsx)("span",{children:v.label}),v.type==="note"&&(0,$.jsx)(Kg.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,$.jsx)(no,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},g))})})})]})}),t&&!o&&(0,$.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,$.jsxs)(vo,{children:[(0,$.jsx)(ci,{asChild:!0,children:(0,$.jsxs)(To,{children:["Table of Contents",(0,$.jsx)(Kg.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,$.jsx)(jo,{children:(0,$.jsx)(Ro,{children:(0,$.jsx)(qa,{children:t.map(g=>(0,$.jsxs)(Ra,{children:[(0,$.jsx)(bo,{asChild:!0,children:(0,$.jsx)("a",{href:`#${g.url}`,className:"text-xs",children:g.title})}),g.items?.length?(0,$.jsx)(Ur,{children:g.items.map(v=>(0,$.jsx)(Vr,{children:(0,$.jsx)($r,{asChild:!0,isActive:v.isActive,size:"sm",children:(0,$.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,$.jsx)("span",{children:v.title})})})},v.title))}):null]},g.title))})})})]})})]}),(0,$.jsx)(di,{})]})}var Pv=z(require("next/image"));function $x({title:e,members:t}){return(0,qo.jsx)(j,{className:"Kg-6",children:(0,qo.jsxs)("div",{className:"p-6",children:[(0,qo.jsxs)("div",{className:"flex items-center Kg-4",children:[(0,qo.jsx)(Kg.Users,{className:"w-6 h-6 text-accent Kg-2"}),(0,qo.jsx)("h2",{className:"text-qo font-semibold text-foreground",children:e})]}),(0,qo.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,qo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,qo.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,qo.jsx)(Pv.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Tv=z(require("next/link"));var Kx=({links:e,title:t="Related Content"})=>(0,qo.jsxs)(j,{children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-accent",children:t})}),(0,qo.jsx)(ee,{children:(0,qo.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,qo.jsxs)(Tv.default,{href:a.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,qo.jsx)(Kg.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var Mp=p("grid h-[45px] w-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function Bp({pages:e}){let t=(0,lv.useSearchParams)(),a=(0,lv.usePathname)(),{replace:o}=(0,lv.useRouter)(),{totalPages:r,page:i}=e,[n,s]=(0,Ng.useState)({start:i>3?i-3:1,end:i+2}),l=m=>{m==="left"&&n.start>1?s(u=>({start:u.start-1,end:u.end-1})):m==="right"&&n.end<r&&s(u=>({start:u.start+1,end:u.end+1}))};function c(m){let u=new URLSearchParams(t);m?u.set("page",m):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let m=n.start;m<=n.end;m++)d.push(m);return(0,qo.jsx)("div",{className:"qo-12",children:(0,qo.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[n.start>1&&(0,qo.jsx)("li",{children:(0,qo.jsx)("button",{className:p(Mp,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>l("left"),children:(0,qo.jsx)(Tf.FaArrowLeft,{})})}),d.map((m,u)=>(0,qo.jsx)("li",{children:(0,qo.jsx)("a",{className:p(Mp,m===i?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${m}`,role:"button",onClick:f=>{f.preventDefault(),c(m.toString())},children:m})},u)),n.end<r&&(0,qo.jsx)("li",{children:(0,qo.jsx)("button",{className:p(Mp,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>l("right"),children:(0,qo.jsx)(Tf.FaArrowRight,{})})})]})})}var p4=p("transition-colors duration-400 hover:text-primary ease-in-out");function Lp({title:e,links:t}){let a=(0,lv.useSearchParams)(),o=(0,lv.usePathname)(),{replace:r}=(0,lv.useRouter)();function i(n){let s=new URLSearchParams(a);n?s.set("category",n):s.delete("category"),r(`${o}?${s.toString()}`)}return(0,qo.jsxs)(j,{children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-accent",children:e&&e})}),(0,qo.jsx)(ee,{children:t&&t.length>0&&(0,qo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,qo.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((n,s)=>(0,qo.jsxs)("li",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:l=>{l.preventDefault(),i(n.href)},children:[n.label,(0,qo.jsx)(Kg.ExternalLink,{className:"ml-1 h-3 w-3"})]},s))})})})]})}function Fp({types:e}){let[t,a]=(0,Ng.useState)(e&&e[0].href),o=(0,lv.useSearchParams)(),r=(0,lv.usePathname)(),{replace:i}=(0,lv.useRouter)();function n(s){let l=new URLSearchParams(o);s?l.set("type",s):l.delete("type"),a(s),i(`${r}?${l.toString()}`)}return(0,qo.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto fn-4 Kg-6",children:e&&e.map((s,l)=>(0,qo.jsx)(x,{variant:s.href===t?"default":"ghost",className:p("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",s.href===t&&"bg-accent text-accent-foreground"),onClick:()=>n(s.href),children:s.label},l))})}var Bv=z(require("next/image"));var zp=({links:e,media:t,children:a,richText:o})=>(0,qo.jsx)("div",{children:(0,qo.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,qo.jsxs)("div",{className:"fixed inset-0 container qo-24 Kg-8 z-10 flex items-start justify-center",children:[a||o&&(0,qo.jsx)(ct,{className:"max-w-none p-0 Kg-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,qo.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:r},i)=>(0,qo.jsx)("li",{children:(0,qo.jsx)(kr,{...r})},i))})]}),(0,qo.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,qo.jsx)(Dr,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,qo.jsx)("div",{children:(0,qo.jsx)(Bv.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,qo.jsx)("span",{className:"absolute inset-0 bg-gradient-Ng-b from-white dark:from-black"})]}),(0,qo.jsx)(Gx,{})]})}),Gx=()=>(0,qo.jsx)("div",{className:"w-full h-[1240px] z-10",children:(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,qo.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var Hp=z(require("next/image"));var _x=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:i}=e;return(0,qo.jsx)(Hp.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:i||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,qo.jsx)("div",{children:(0,qo.jsx)(Hp.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},Op=({links:e,media:t,children:a,richText:o})=>(0,qo.jsxs)("div",{className:"relative bg-brand-one fn-12 qo-20 pt-10",children:[t&&(0,qo.jsx)(_x,{media:t}),(0,qo.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,qo.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,qo.jsx)(ct,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var jp=({children:e,richText:t})=>(0,qo.jsx)("div",{className:"min-w-full py-10 bg-muted qo-24",children:(0,qo.jsx)("div",{className:"container",children:e||t&&(0,qo.jsx)(ct,{content:t,enableGutter:!1})})});var Ev=z(require("react")),Fv=z(require("next/image"));var Lv=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),i=o+1<10?`0${o+1}`:o+1,n=r<10?`0${r}`:r,s=a.getFullYear();return`${n}/${i}/${s}`};var qd=e=>{let t=e?new Date(e):new Date,a=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(t),o=t.getDate(),r=new Intl.DateTimeFormat("en-US",{month:"short"}).format(t);return`${a} ${o}${(n=>{if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}})(o)} ${r}`};var Wx=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:i}=e;return(0,qo.jsxs)("div",{className:"relative grid pt-24",children:[(0,qo.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,qo.jsxs)("div",{className:"container mx-auto",children:[(0,qo.jsx)("h1",{className:"Kg-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:i}),(0,qo.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,qo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,qo.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,qo.jsx)("p",{children:o.map((n,s)=>(0,qo.jsxs)(Ev.default.Fragment,{children:[n.name,s<o.length-2&&", ",s===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,qo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,qo.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,qo.jsx)("time",{dateTime:r,children:Lv(r)})]}),t&&t.length>0&&(0,qo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,qo.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,s)=>typeof n=="object"&&n!==null&&(0,qo.jsx)(te,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||s))})]})]})]})}),(0,qo.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,qo.jsx)(Fv.default,{className:"object-cover",alt:`Cover image for ${i}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,qo.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-Ng-t from-background dark:from-black Ng-transparent"})]})]})};var Xd=require("@heroicons/react/20/solid");var Up=z(require("next/image"));function Mo({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=p("container",t&&"full-width",a&&"no-padding",o);return(0,qo.jsx)("div",{className:r,children:e})}var Hv=require("next-themes");function qx({children:e,...t}){return(0,qo.jsx)(Hv.ThemeProvider,{...t,children:e})}var $o=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,qo.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:p(t,"absolute -bottom-[2px] flex"),children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,qo.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,qo.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,qo.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,qo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,qo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:p(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,qo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,qo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:p(t,"w-full block overflow-hidden"),children:(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,qo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,qo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:p(t,"w-full block overflow-hidden"),transform:a[3],children:(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,qo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,qo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:p(t,"w-full block overflow-hidden"),children:(0,qo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Xx=({className:e})=>(0,qo.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:p(e,"absolute w-full h-full"),children:[(0,qo.jsx)("defs",{children:(0,qo.jsxs)("mask",{id:"mask",children:[(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,qo.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,qo.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Vp=({title:e,image:t})=>(0,qo.jsx)("div",{children:(0,qo.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,qo.jsx)("div",{className:"fixed inset-0 container qo-24 Kg-8 z-10 flex items-start justify-start",children:(0,qo.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,qo.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,qo.jsx)(Up.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,qo.jsx)("div",{children:(0,qo.jsx)(Up.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,qo.jsx)("span",{className:"absolute inset-0 bg-gradient-Ng-b from-white dark:from-black"})]}),(0,qo.jsx)($o,{className:"text-black z-10",position:"header"})]})});var Yx={highImpact:zp,lowImpact:jp,mediumImpact:Op,sectionHero:Vp},Jx=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=Yx[t];return a?(0,qo.jsx)(a,{...e}):null};function Qx({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,qo.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,qo.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,qo.jsx)("li",{children:(0,qo.jsx)("div",{children:(0,qo.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,qo.jsx)(Xd.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,qo.jsx)("span",{className:"qo-only",children:"Home"})]})})}),t.map((a,o)=>(0,qo.jsx)("li",{children:(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)(Xd.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,qo.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,qo.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,qo.jsx)(qo.Fragment,{})}function Jd(e,t){let[a,o]=(0,Ng.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Ng.useEffect)(()=>{r(a)},[]),[a,r]}var Qd=require("react-icons/qo");function sa({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:n,className:s}){let[l,c]=Jd(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||l;return(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${s||""}`,children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,qo.jsx)(te,{className:"bg-white/20 text-white hover:bg-white/30 rounded-qo",children:a}),(0,qo.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,qo.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,qo.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!l),style:{lineHeight:0},children:l?(0,qo.jsx)(Qd.FaChevronDown,{size:22}):(0,qo.jsx)(Qd.FaChevronUp,{size:22})})]})]}),!d&&(0,qo.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,qo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,qo.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,qo.jsx)(x,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,qo.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var Ko=require("@headlessui/react"),ec=require("@heroicons/react/24/outline");var Zx=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,qo.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,qo.jsxs)("span",{className:"relative",children:[e,(0,qo.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,qo.jsxs)(Ko.Popover,{children:[(0,qo.jsxs)(Ko.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,qo.jsxs)("span",{className:"relative",children:[e,(0,qo.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,qo.jsx)(Xd.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,qo.jsxs)(Ko.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover qo-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,qo.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 qo:gap-x-8 z-50",children:t&&t.map(r=>(0,qo.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,qo.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,qo.jsx)(Uv,{icon:r.icon,size:"4x"})}),(0,qo.jsxs)("a",{href:r.href,className:"qo-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,qo.jsx)("span",{className:"absolute inset-0"})]}),(0,qo.jsx)("p",{className:"qo-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,qo.jsx)("div",{className:"bg-gray-50",children:(0,qo.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,qo.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,qo.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,qo.jsx)(Uv,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Uv=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,qo.jsx)(no,{...e,size:a});if("src"in e)return(0,qo.jsx)("div",{className:p(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,qo.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Nn=Zx;var Zd=["light","dark","green"];function ew({title:e,logo:t,menuItems:a}){let[o,r]=(0,Ng.useState)(!1),[i,n]=(0,Ng.useState)(!1),[s,l]=(0,Ng.useState)("light"),c=t?.split(".")[0],d=t?.split(".")[1],[m,u]=(0,Ng.useState)(`${c}.${d}`),f=g=>{Zd.includes(g)?u(g==="light"?`${c}.${d}`:`${c}-${g}.${d}`):u(`${c}.${d}`)};(0,Ng.useEffect)(()=>{let g=localStorage.getItem("theme")||"light";l(g),document.documentElement.setAttribute("class",g),f(g)},[]);let b=()=>{let g=Zd[(Zd.indexOf(s)+1)%Zd.length];l(g),document.documentElement.setAttribute("class",g),localStorage.setItem("theme",g),f(g)};return(0,qo.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,qo.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,qo.jsx)("div",{className:"flex lg:flex-1",children:(0,qo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,qo.jsx)("span",{className:"qo-only",children:e}),(0,qo.jsx)("img",{alt:e,src:m,className:"h-9 w-auto"})]})}),(0,qo.jsx)("div",{className:"flex lg:hidden",children:(0,qo.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Open main menu"}),(0,qo.jsx)(ec.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,qo.jsx)(Ko.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(g=>(0,qo.jsx)(Nn,{...g},g.name))}),(0,qo.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,qo.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:s==="dark"?(0,qo.jsx)(Xd.SunIcon,{className:"h-6 w-6"}):s==="green"?(0,qo.jsx)(Xd.MoonIcon,{className:"h-6 w-6"}):(0,qo.jsx)(Xd.SunIcon,{className:"h-6 w-6"})})})]}),(0,qo.jsxs)(Ko.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,qo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,qo.jsxs)(Ko.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Your Company"}),(0,qo.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,qo.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Close menu"}),(0,qo.jsx)(ec.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,qo.jsx)("div",{className:"qo-6 flow-root",children:(0,qo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,qo.jsx)("div",{className:"space-y-2 py-6",children:a.map(g=>(0,qo.jsx)(tw,{...g},g.name))})})})]})]})]})}function tw({name:e,items:t,actions:a,href:o}){return!t&&o?(0,qo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,qo.jsxs)(Ko.Disclosure,{Kg:"div",className:"-mx-3",children:[(0,qo.jsx)(Ko.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 Kg-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,qo.jsx)(Ko.DisclosurePanel,{className:"qo-2 space-y-2",children:t&&t.map(r=>(0,qo.jsx)(Ko.DisclosureButton,{Kg:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Kg-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function aw({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:i}){let n=()=>{let s=document.getElementById("next-section");s&&s.scrollIntoView({behavior:"smooth"})};return(0,qo.jsx)("div",{children:(0,qo.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,qo.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,qo.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,qo.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,qo.jsx)(Mo,{children:(0,qo.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 Kg-10 z-0 md:Kg-0",children:[(0,qo.jsx)("h1",{className:"text-5xl md:text-7xl Kg-6",children:r&&r}),(0,qo.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 Kg-8 max-w-lg",children:i&&i})]})})}),(0,qo.jsx)($o,{className:"text-black z-10",position:"header"})]})})}var $p=z(require("next/image"));function Zi({logoLight:e,logoDark:t,mobile:a=!1}){return(0,qo.jsxs)(eo,{href:"/",className:p(a?"py-1":"py-2"),children:[(0,qo.jsx)($p.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,qo.jsx)($p.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function Kp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[n,s]=(0,Ng.useState)(!1),[l,c]=(0,Ng.useState)(""),d=["light","dark"],{theme:m,setTheme:u}=(0,$v.useTheme)();(0,Ng.useEffect)(()=>{c(m||"dark")},[m]);let f=()=>{let b=d[(d.indexOf(l)+1)%d.length];c(b),u(b)};return(0,Ng.useEffect)(()=>{let b=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)("header",{className:`z-50 fn-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,qo.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,qo.jsxs)("div",{className:p("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,qo.jsx)(Zi,{logoDark:a,logoLight:t}),(0,qo.jsx)(Ko.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(b=>(0,qo.jsx)(Nn,{...b},b.name))}),r&&(0,qo.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:f,children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(Kg.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,qo.jsx)(Kg.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Gp=["light","dark"];function _p({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,Ng.useState)(!1),{theme:n,setTheme:s}=(0,Hv.useTheme)(),[l,c]=(0,Ng.useState)(!1),[d,m]=(0,Ng.useState)("light");(0,Ng.useEffect)(()=>{let f=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,Ng.useEffect)(()=>{m(n||"dark")},[n]);let u=()=>{let f=Gp[(Gp.indexOf(d)+1)%Gp.length];m(f),s(f)};return(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsxs)("header",{className:`z-50 fn-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,qo.jsx)("nav",{className:p("backdrop-blur-sm text-white p-0",l&&"hidden"),children:(0,qo.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,qo.jsx)(Zi,{logoDark:t,logoLight:e,mobile:!0}),(0,qo.jsx)("div",{className:"flex items-center space-x-4",children:(0,qo.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Open main menu"}),(0,qo.jsx)(ec.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,qo.jsxs)(Ko.Dialog,{open:l,onClose:c,className:"lg:hidden",children:[(0,qo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,qo.jsxs)(Ko.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,qo.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,qo.jsx)(Zi,{logoDark:t,logoLight:e,mobile:!0}),(0,qo.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Close menu"}),(0,qo.jsx)(ec.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,qo.jsx)("div",{className:"qo-6 flow-root",children:(0,qo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,qo.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,qo.jsx)(ow,{...f},f.name))})})})]})]})]})})}function ow({name:e,items:t,actions:a,href:o}){return!t&&o?(0,qo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,qo.jsxs)(Ko.Disclosure,{Kg:"div",className:"-mx-3",children:[(0,qo.jsx)(Ko.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 Kg-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,qo.jsx)(Ko.DisclosurePanel,{className:"qo-2 space-y-2",children:t&&t.map(r=>(0,qo.jsx)(Ko.DisclosureButton,{Kg:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Kg-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var yD=p("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),_v=p("text-brand-green text-md leading-[1.25] md:text-lg Kg-5 md:Kg-[1.5rem]"),Wp=p("bg-brand-green rounded-full p-3 Kg-4 text-2xl"),qp=p("flex items-center text-white gap-3"),oc=p("transition-colors duration-300 hover:text-accent dark:hover:text-white");function rw({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:i,columnTwo:n,footerBottom:s}=t,l=void 0;return(0,qo.jsxs)("footer",{className:p("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,qo.jsx)("div",{className:"py-16 md:py-20",children:(0,qo.jsx)("div",{className:"container",children:(0,qo.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 qo:grid-cols-3",children:[(0,qo.jsxs)("div",{"data-aos":"fade-qo","data-aos-delay":"200",children:[(0,qo.jsx)(Zi,{logoDark:o,logoLight:a}),(0,qo.jsx)("p",{className:"Kg-7 qo-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,qo.jsx)("nav",{"aria-label":"social links",children:(0,qo.jsx)("ul",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((c,d)=>(0,qo.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,qo.jsx)(eo,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,qo.jsx)("span",{children:c.icon})})},d))})})]}),(0,qo.jsxs)("div",{"data-aos":"fade-qo","data-aos-delay":"400",children:[(0,qo.jsx)("h3",{className:_v,children:i.title}),i.links&&i.links.length>0&&(0,qo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,qo.jsx)("ul",{className:"grid pl-0 gap-2",children:i.links.map(c=>(0,qo.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,qo.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,qo.jsx)(Tf.FaChevronRight,{})}),(0,qo.jsx)(eo,{href:c.href,openNewTab:c.openNewTab,className:oc,children:c.label})]},c.label))})})]}),(0,qo.jsxs)("div",{"data-aos":"fade-qo","data-aos-delay":"600",children:[(0,qo.jsx)("h3",{className:_v,children:n.title}),(0,qo.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,qo.jsxs)("li",{className:qp,children:[(0,qo.jsx)("span",{className:Wp,children:(0,qo.jsx)(Tf.FaPaperPlane,{})}),(0,qo.jsx)("address",{className:"not-italic",children:n.location})]}),(0,qo.jsxs)("li",{className:qp,children:[(0,qo.jsx)("span",{className:Wp,children:(0,qo.jsx)(Tf.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,qo.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,d)=>(0,qo.jsx)("a",{href:`mailto:${c}`,className:oc,children:c},d))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,qo.jsxs)("li",{className:qp,children:[(0,qo.jsx)("span",{className:Wp,children:(0,qo.jsx)(Tf.FaPhone,{})}),(0,qo.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,d)=>(0,qo.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:oc,children:c},d))})]})]})]})]})})}),(0,qo.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,qo.jsx)("div",{className:"container",children:(0,qo.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-x-8 gap-y-4 md:gap-x-10",children:[(0,qo.jsx)("p",{children:s.copyrightText}),s.links&&s.links.length>0&&(0,qo.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,qo.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:s.links.map(c=>(0,qo.jsx)("li",{children:(0,qo.jsx)(eo,{"aria-label":`qo Ng page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:oc,children:c.label})},c.label))})})]})})})]})}function Xp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:n=!1}){return(0,qo.jsxs)("div",{className:p("fixed top-0 left-0 right-0 z-50",r),children:[(0,qo.jsx)(Kp,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:i}),(0,qo.jsx)(_p,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function iw({menuItems:e,wide:t=!1,dark:a=!0}){return(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)("menu",{className:p("w-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,qo.jsx)("div",{className:"container backdrop-blur-sm",children:(0,qo.jsx)("div",{className:p("flex items-center justify-between py-0",!t&&"container"),children:(0,qo.jsx)(Ko.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,qo.jsx)(Nn,{...o},o.name))})})})})})}function Yp({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Ng.useState)([]),i=(0,lv.useRouter)(),n=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},s=d=>{r(m=>m.includes(d)?m.filter(u=>u!==d):[...m,d])},l=async()=>{let d=await t(o);d.success?(Md.toast.success(d.message),i.refresh()):Md.toast.error(`Error: ${d.message}`),r([])},c=async()=>{let d=await a(o);d.success?(Md.toast.success(d.message),i.refresh()):Md.toast.error(`Error: ${d.message}`),r([])};return(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex justify-between items-center",children:[(0,qo.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,qo.jsxs)("div",{className:"space-x-2",children:[(0,qo.jsx)(x,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,qo.jsx)(x,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,qo.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,qo.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,qo.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)(Za,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,qo.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,qo.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,qo.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)(Za,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>s(d.id),className:"border-accent"}),(0,qo.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,qo.jsxs)(Ft,{className:"h-10 w-10",children:[(0,qo.jsx)(Ia,{src:d.userImage,alt:d.userName}),(0,qo.jsx)(zt,{children:d.userName.split(" ").map(m=>m[0]).join("")})]}),(0,qo.jsx)("div",{className:"ml-3",children:(0,qo.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,qo.jsx)(te,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,qo.jsx)(Md.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Jp=require("date-fns");var Yv=[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 Ml=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=Yv.some(r=>r.toISOString()===e.toISOString());return t||a||o},Jv=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),i=0;if(a&&!Ml(o))return .5;for(;o<=r;)Ml(o)||i++,o.setDate(o.getDate()+1);return i},Qv=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var sw=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,qo.jsx)("div",{className:"flex space-x-2",children:e.map((r,i)=>(0,qo.jsx)(x,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[i],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function Zp({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Ng.useState)(new Date),[r,i]=(0,Ng.useState)(new Date),[n,s]=(0,Ng.useState)("Full Day"),[l,c]=(0,Ng.useState)(!1),[d,m]=(0,Ng.useState)(1),u=(0,lv.useRouter)();(0,Ng.useEffect)(()=>{let g=Qv(a,r);c(g),g&&s("Full Day")},[a,r]),(0,Ng.useEffect)(()=>{if(!a||!r){m(0);return}let g=Jv(a,r,n!=="Full Day");m(g)},[a,r,n]);let f=g=>{s(g)};return(0,qo.jsxs)("div",{className:"max-w-2xl",children:[(0,qo.jsx)("h2",{className:"text-lg font-semibold Kg-4",children:"Request Leave"}),(0,qo.jsxs)("p",{className:"text-sm text-gray-500 Kg-4",children:["Remaining leave days: ",e]}),(0,qo.jsxs)("form",{onSubmit:async g=>{if(g.preventDefault(),!a||!r){Md.toast.error("Please select both start and end dates");return}if(d>e){Md.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",r.toISOString()),v.append("leaveType",n),v.append("duration",d.toString());let N=await(t||nw)(v);N.success?(Md.toast.success(N.message),o(void 0),i(void 0),s("Full Day"),u.refresh()):Md.toast.error(`Error: ${N.message}`)},className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"startDate",children:"Start Date"}),(0,qo.jsxs)(Ki,{children:[(0,qo.jsx)(Gi,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:p("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,qo.jsx)(Kg.CalendarIcon,{className:"Kg-2 h-4 w-4"}),a?(0,Jp.format)(a,"PPP"):(0,qo.jsx)("span",{children:"Pick a date"})]})}),(0,qo.jsx)(gi,{className:"w-auto p-0",align:"start",children:(0,qo.jsx)(qi,{mode:"single",selected:a,onSelect:g=>{o(g),g&&(!r||g>r)&&i(g)},initialFocus:!0})})]})]}),(0,qo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"endDate",children:"End Date"}),(0,qo.jsxs)(Ki,{children:[(0,qo.jsx)(Gi,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:p("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,qo.jsx)(Kg.CalendarIcon,{className:"Kg-2 h-4 w-4"}),r?(0,Jp.format)(r,"PPP"):(0,qo.jsx)("span",{children:"Pick a date"})]})}),(0,qo.jsx)(gi,{className:"w-auto p-0",align:"start",children:(0,qo.jsx)(qi,{mode:"single",selected:r,onSelect:i,disabled:g=>a?g<a:!1,initialFocus:!0})})]})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Leave Type"}),(0,qo.jsx)(sw,{options:["Full Day","Morning","Afternoon"],value:n,onChange:f,disabled:[!1,l,l]})]}),(0,qo.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,qo.jsx)(x,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,qo.jsx)(Md.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var nw=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function e0(...e){return e.filter(Boolean).join(" ")}function eu({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},s=()=>{t(new Date)},l=d=>d.toLocaleString("default",{weekday:"short"}).charAt(0),c=a.map(d=>({...d,startDate:hr.toUtcMidnight(d.startDate).toISOString(),endDate:hr.toUtcMidnight(d.endDate).toISOString()}));return console.log("employeeIds",o.map(d=>d.id)),(0,qo.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,qo.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,qo.jsxs)("div",{className:"sm:flex-auto",children:[(0,qo.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,qo.jsx)("p",{className:"qo-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,qo.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,qo.jsxs)(x,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Previous month"}),(0,qo.jsx)(Kg.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,qo.jsx)(x,{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,qo.jsxs)(x,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Next month"}),(0,qo.jsx)(Kg.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,qo.jsx)("div",{className:"qo-8 flow-root",children:(0,qo.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,qo.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,qo.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,qo.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,qo.jsxs)("qo",{children:[(0,qo.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 Kg-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m+1);return(0,qo.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 ${Ml(u)?"bg-gray-200":""}`,children:[(0,qo.jsx)("div",{children:l(u)}),(0,qo.jsx)("div",{children:m+1})]},m)})]})}),(0,qo.jsx)("tbody",{children:o.map((d,m)=>(0,qo.jsxs)("qo",{children:[(0,qo.jsx)("Ng",{className:e0(m!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 Kg-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsxs)(Ft,{className:"h-11 w-11",children:[(0,qo.jsx)(Ia,{src:d.image,alt:d.name}),(0,qo.jsx)(zt,{children:d.name.split(" ").map(u=>u[0]).join("")})]}),(0,qo.jsx)("div",{className:"ml-4",children:(0,qo.jsx)("div",{className:"font-medium text-accent",children:d.name})})]})}),[...Array(r)].map((u,f)=>{let b=new Date(e.getFullYear(),e.getMonth(),f+1,1),g=c.find(v=>v.userId===d.id&&new Date(v.startDate)<=b&&new Date(v.endDate)>=b);return(0,qo.jsx)("Ng",{className:e0(m!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Ml(b)?"bg-gray-200":"bg-white"),children:(0,qo.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${g?g.status==="approved"?"bg-green-500":g.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:g?`${d.name}: ${g.status} (${g.startDate} - ${g.endDate}) - ${g.leaveType}`:"",children:g&&g.leaveType!=="Full Day"&&(0,qo.jsx)("div",{className:`h-3 w-6 ${g.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${d.id}-${f}`)})]},d.id))})]})})})})]})}function tu({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Ng.useState)(null);console.log("holidaysIds",a.map(d=>d.id));let i=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m-i+1,e.getHours()),f=a.filter(b=>hr.toUtcMidnight(new Date(b.startDate))<=u&&hr.toUtcMidnight(new Date(b.endDate))>=u);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:f}}),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,qo.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,qo.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,qo.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,qo.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,qo.jsx)("div",{className:"flex items-center",children:(0,qo.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,qo.jsxs)(x,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Previous month"}),(0,qo.jsx)(Kg.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,qo.jsx)(x,{variant:"outline",onClick:c,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,qo.jsxs)(x,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,qo.jsx)("span",{className:"qo-only",children:"Next month"}),(0,qo.jsx)(Kg.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,qo.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,qo.jsxs)("div",{className:"bg-white py-2",children:["M",(0,qo.jsx)("span",{className:"qo-only sm:not-qo-only",children:"kg"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,qo.jsx)("span",{className:"qo-only sm:not-qo-only",children:"qo"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["W",(0,qo.jsx)("span",{className:"qo-only sm:not-qo-only",children:"ed"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,qo.jsx)("span",{className:"qo-only sm:not-qo-only",children:"hu"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["F",(0,qo.jsx)("span",{className:"qo-only sm:not-qo-only",children:"ri"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,qo.jsx)("span",{className:"qo-only sm:not-qo-only",children:"at"})]}),(0,qo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,qo.jsx)("span",{className:"qo-only sm:not-qo-only",children:"qo"})]})]}),(0,qo.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,qo.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:n.map(d=>(0,qo.jsxs)("div",{className:p(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,qo.jsx)("time",{dateTime:d.date.toISOString(),className:p("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,qo.jsx)("ol",{className:"qo-2 space-y-1 overflow-visible",children:d.holidays.map(m=>(0,qo.jsx)("li",{className:"overflow-visible",children:(0,qo.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${m.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:m.userName})},m.id))})]},d.date.toISOString()))}),(0,qo.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(d=>(0,qo.jsxs)("button",{type:"button",className:p(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,qo.jsx)("time",{dateTime:d.date.toISOString(),className:p("ml-auto",d.date===o&&d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,qo.jsxs)("span",{className:"qo-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,qo.jsx)("span",{className:"-mx-0.5 qo-auto flex flex-wrap-reverse",children:d.holidays.map(m=>(0,qo.jsx)("span",{className:`mx-0.5 Kg-1 h-1.5 w-1.5 rounded-full ${m.status==="approved"?"bg-green-500":"bg-gray-500"}`},m.id))})]},d.date.toISOString()))})]})]})]})}var ts=require("lucide-react");function a0(...e){return e.filter(Boolean).join(" ")}function lw({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:i,approveLeave:n,rejectLeave:s}){let[l,c]=(0,Ng.useState)("Calendar View"),d=(0,lv.useRouter)(),m=!1,u=hr.toUtcMidnight((0,Jp.parseISO)(a)),f=async g=>{let v=(0,Jp.format)(g,"Ng-MM-yyyy"),N=new URL(window.location.href);return N.searchParams.set("date",v),d.push(N.toString()),{success:!0}};if(m)return(0,qo.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,qo.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:ts.Grid,current:l==="Grid View"},{name:"Calendar View",icon:ts.CalendarDays,current:l==="Calendar View"},{name:"Request Leave",icon:ts.PlusCircle,current:l==="Request Leave"},{name:"Approve Leave",icon:ts.CheckSquare,current:l==="Approve Leave"}];return(0,qo.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,qo.jsxs)("div",{className:"Kg-8",children:[(0,qo.jsxs)("div",{className:"sm:hidden",children:[(0,qo.jsx)("select",{value:l,onChange:g=>c(g.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 Kg-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(g=>(0,qo.jsx)("option",{children:g.name},g.name))}),(0,qo.jsx)(Kg.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,qo.jsx)("div",{className:"hidden sm:block",children:(0,qo.jsx)("div",{className:"border-b border-gray-200",children:(0,qo.jsx)("nav",{className:"-Kg-px flex space-x-8","aria-label":"Tabs",children:b.map(g=>(0,qo.jsxs)("a",{onClick:()=>{(g.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(g.name)},className:a0(g.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",g.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":g.current?"page":void 0,children:[(0,qo.jsx)(g.icon,{className:a0(g.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 Kg-2 h-5 w-5"),"aria-hidden":"true"}),(0,qo.jsx)("span",{children:g.name})]},g.name))})})})]}),l==="Grid View"&&(0,qo.jsx)(eu,{currentDate:u,setCurrentDate:f,holidays:e,employees:r}),l==="Calendar View"&&(0,qo.jsx)(tu,{currentDate:u,setCurrentDate:f,holidays:e}),l==="Request Leave"&&(0,qo.jsx)(Zp,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:g=>i?i(g):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),l==="Approve Leave"&&(0,qo.jsx)(Yp,{leaveRequests:o,onApprove:g=>n?n(g):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:g=>s?s(g):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Bl({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:i,onAddComment:n}){let[s,l]=(0,Ng.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,d]=(0,Ng.useState)(""),[m,u]=(0,Ng.useState)(!1),[f,b]=(0,Ng.useState)(null);(0,Ng.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(s))},[e,s]);let g=async()=>{try{let A=await i(s);A.success?(u(!1),b(null)):console.error("Failed Ng save deal:",A.errors)}catch(A){console.error("Failed Ng save deal:",A)}},v=(A,w)=>{l(L=>({...L,[A]:w}))},N=A=>{let w=(s.categories||[]).includes(A)?(s.categories||[]).filter(L=>L!==A):[...s.categories||[],A];v("categories",w)},R=async()=>{if(c.trim()){let A={text:c,timestamp:new Date().toISOString()};try{let w=await n(A);if(!w.success){console.error("Failed Ng add comment:",w.errors);return}}catch(w){console.error("Failed Ng add comment:",w)}l(w=>({...w,comments:[...w.comments||[],A]})),d("")}},h=A=>{switch(A){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},C=A=>t?.find(w=>w.id===Number(A));return(0,qo.jsx)(ut,{open:!0,children:(0,qo.jsxs)(bt,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,qo.jsxs)(Ct,{className:"flex flex-row items-center justify-between",children:[(0,qo.jsx)(kt,{className:"text-2xl font-bold",children:a?.name||"no customer"}),(0,qo.jsxs)("div",{className:"flex space-x-2",children:[(0,qo.jsx)(x,{variant:"outline",onClick:r,children:"Close"}),(0,qo.jsxs)(x,{onClick:g,disabled:!m,children:[(0,qo.jsx)(Kg.SaveIcon,{className:"w-4 h-4 Kg-2"}),"Save"]})]})]}),(0,qo.jsxs)(ga,{className:"flex-grow Kg-4",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,qo.jsx)("div",{className:"grid gap-2 m-1",children:f==="value"?(0,qo.jsx)(W,{type:"number",value:s.value,onChange:A=>v("value",Number(A.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,qo.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",s.value?.toLocaleString()]})}),(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-sm font-medium text-accent",children:"Assignee"}),f==="assignee"?(0,qo.jsxs)(dt,{value:s?.assignee?.id?.toString()||"",onValueChange:A=>v("assignee",C(A)),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select assignee"})}),(0,qo.jsx)(it,{children:t&&t.map(A=>(0,qo.jsx)(xe,{value:A?.id?.toString()||"",children:A.name},A.id))})]}):(0,qo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,qo.jsx)(Kg.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,qo.jsx)("span",{children:s?.assignee?.name})]})]}),(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-sm font-medium text-accent",children:"Closure Date"}),f==="closureDate"?(0,qo.jsx)(W,{type:"date",value:s.closureDate?.split("T")[0]??"",onChange:A=>v("closureDate",A.target.value),onBlur:()=>b(null),className:"Kg-2",autoFocus:!0}):(0,qo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,qo.jsx)(Kg.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,qo.jsx)("span",{children:s.closureDate?new Date(s.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,qo.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-sm font-medium text-accent",children:"Description"}),f==="description"?(0,qo.jsx)(st,{value:s.description||"",onChange:A=>v("description",A.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,qo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent fn-5 rounded",onClick:()=>b("description"),children:s.description})]})}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-sm font-medium text-accent",children:"Status"}),f==="status"?(0,qo.jsxs)(dt,{value:s.status,onValueChange:A=>{v("status",A),b(null)},children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select status"})}),(0,qo.jsx)(it,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(A=>(0,qo.jsx)(xe,{value:A,children:A},A))})]}):(0,qo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:s.status})]}),(0,qo.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,qo.jsx)(B,{className:"text-sm font-medium text-accent",children:"Categories"}),f==="categories"?(0,qo.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(A=>(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:A.id?.toString()||"",checked:(s.categories||[]).some(w=>w.id===A.id),onCheckedChange:()=>A.id!==void 0&&N(A)}),(0,qo.jsx)("label",{htmlFor:(A.id??"").toString(),className:`text-sm font-medium ${h(A.type||"sector")} px-2 py-1 rounded`,children:A.name})]},A.id))}):(0,qo.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:s.categories&&s.categories.map(A=>{let w=A;return w?(0,qo.jsx)(te,{variant:"outline",className:h(w.type||"sector"),children:w.name},w.id):null})})]}),(0,qo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,qo.jsx)(B,{className:"text-sm font-medium text-accent",children:"COGE Status"}),f==="gecoStatus"?(0,qo.jsxs)(dt,{value:s.gecoStatus??void 0,onValueChange:A=>{v("gecoStatus",A),b(null)},children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select status"})}),(0,qo.jsx)(it,{children:["firm","forecast","other"].map(A=>(0,qo.jsx)(xe,{value:A,children:A.charAt(0).toUpperCase()+A.slice(1)},A))})]}):(0,qo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:s.gecoStatus?s.gecoStatus.charAt(0).toUpperCase()+s.gecoStatus.slice(1):"N/A"})]})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,qo.jsxs)("div",{className:"grid gap-2",children:[(0,qo.jsx)(B,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,qo.jsx)(ga,{className:"h-[200px] overflow-y-auto",children:(0,qo.jsx)("div",{className:"space-y-2",children:s.comments&&s.comments.slice().sort((A,w)=>new Date(w.timestamp||"").getTime()-new Date(A.timestamp||"").getTime()).map(A=>(0,qo.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,qo.jsx)("p",{className:"text-sm text-foreground",children:A.text}),(0,qo.jsxs)("p",{className:"text-xs text-foreground qo-1",children:[A?.author?.name," - ",new Date(A.timestamp||"").toLocaleString()]})]},A.id))})}),(0,qo.jsxs)("div",{className:"flex qo-2",children:[(0,qo.jsx)(W,{value:c,onChange:A=>d(A.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,qo.jsxs)(x,{onClick:R,className:"ml-2",children:[(0,qo.jsx)(Kg.PlusIcon,{className:"w-4 h-4 Kg-2"}),"Add"]})]})]}),(0,qo.jsxs)("div",{className:"text-xs text-gray-500 qo-4",children:["Last modified: ",new Date(s.updatedAt||"").toLocaleString()]})]})]})]})})}function au({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let i=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return r?(0,qo.jsxs)(j,{className:"Kg-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,qo.jsxs)(Ce,{className:"fn-1 pt-2",children:[(0,qo.jsx)(De,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,qo.jsx)("p",{className:"text-sm text-foreground qo-1",children:e.description})]}),(0,qo.jsx)(ee,{className:"text-xs text-gray-200 fn-2",children:(0,qo.jsx)("div",{className:"flex justify-between items-center Kg-1",children:(0,qo.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,qo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,qo.jsxs)(j,{className:"Kg-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,qo.jsxs)(Ce,{className:"fn-2",children:[(0,qo.jsx)("div",{className:"flex justify-between items-center",children:(0,qo.jsx)(De,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,qo.jsx)("p",{className:"text-sm text-foreground qo-1",children:e.description})]}),(0,qo.jsxs)(ee,{children:[(0,qo.jsxs)("div",{className:"flex justify-between items-center Kg-3",children:[(0,qo.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,qo.jsx)(Kg.UserIcon,{className:"w-4 h-4 Kg-1 text-xs"}),(0,qo.jsx)("span",{children:e.assignee.name})]}),(0,qo.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,qo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,qo.jsx)("div",{className:"flex justify-between items-left Kg-3",children:(0,qo.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,qo.jsx)(Kg.CalendarIcon,{className:"w-3 h-3 Kg-1"}),(0,qo.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,qo.jsx)("div",{className:"flex justify-between items-left",children:i&&(0,qo.jsx)(te,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:i.name})})]})]})}var lc=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Ll({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:i,calculateColumnValue:n,calculateWeightedValue:s,compact:l=!1}){return(0,qo.jsxs)("div",{className:"flex flex-col w-80",children:[(0,qo.jsxs)("h2",{className:"text-qo font-semibold Kg-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,qo.jsx)(lc.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,qo.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,m)=>(0,qo.jsx)(lc.Draggable,{draggableId:d.id.toString(),index:d.id,children:u=>(0,qo.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,qo.jsx)(au,{deal:d,customer:d.customer,categories:r,onClick:()=>i(d),compact:l})})},d.id.toString())),c.placeholder]})}),(0,qo.jsxs)("div",{className:"qo-4 text-sm p-3 rounded-lg shadow",children:[(0,qo.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,qo.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,qo.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,qo.jsxs)("span",{className:"text-blue-600",children:["\xA3",s(t,e).toLocaleString()]})]})]})]})}var dw=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function cw({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[i,n]=(0,Ng.useState)(null),s=m=>(e.deals??[]).filter(u=>u.status===m),l=m=>m.reduce((u,f)=>u+(f.value||0),0),c=(m,u)=>{let f={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return m.reduce((b,g)=>b+(g.value||0)*f[u],0)},d=(0,Ng.useCallback)(m=>{let{source:u,destination:f}=m;if(!f||u.droppableId===f.droppableId&&u.index===f.index)return;let b=u.droppableId,g=f.droppableId,v=e.deals?.filter(R=>R.id===u.index)[0],N=[...e.deals??[]];v&&(v.status=g,a(v))},[a]);return(0,qo.jsx)(lc.DragDropContext,{onDragEnd:d,children:(0,qo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,qo.jsx)("div",{className:"flex space-x-4 fn-4",children:dw.filter(m=>m!=="Lost").map(m=>{let u=s(m);return(0,qo.jsx)(Ll,{status:m,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:l,calculateWeightedValue:c},m)})}),i&&(0,qo.jsx)(Bl,{deal:i,users:e.users,customer:i.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:m=>o(i.id.toString(),m)})]})})}function ou({onSubmit:e}){let[t,a]=(0,Ng.useState)({name:"",intro:"",active:!1});return(0,qo.jsxs)("form",{onSubmit:r=>{r.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"customerName",children:"Customer Name"}),(0,qo.jsx)(W,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"customerIntro",children:"Intro"}),(0,qo.jsx)(st,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,qo.jsx)(B,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,qo.jsx)(x,{type:"submit",className:"w-full",children:"Add Customer"})]})}function mw({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:i,onClose:n}){let[s,l]=(0,Ng.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,d]=(0,Ng.useState)(!1),[m,u]=(0,Ng.useState)({});(0,Ng.useEffect)(()=>{r&&l(r)},[r]);let f=()=>{let h={};return s.customer||(h.customer="Customer Kg required"),s.value||(h.value="Value Kg required"),s.assignee||(h.assignee="Assignee Kg required"),s.closureDate||(h.closureDate="Closure Date Kg required"),u(h),Object.keys(h).length===0},b=async h=>{h.preventDefault(),u({});try{if(f()){let C=await o({...s});C.success?(l({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):u(C.errors||{})}}catch{u({submit:"Ng error occurred while submitting the form."})}},g=h=>{l(C=>({...C,categories:(C.categories||[]).includes(h.id)?(C.categories||[]).filter(A=>A!==h.id):[...C.categories||[],h.id]}))},v=async h=>{l({...s,customer:h});try{let C=await i(h);C.success?d(!1):u(C.errors||{})}catch{u({submit:"Ng error occurred while submitting the form."})}},N=h=>t?.find(C=>C.id===Number(h)),R=h=>e?.find(C=>C.id===Number(h));return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,qo.jsx)(ga,{className:"h-[60vh] Kg-4",children:(0,qo.jsxs)("div",{className:"space-y-6 px-4",children:[(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"customer",children:"Customer"}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsxs)(dt,{value:s.customer?.id?.toString(),onValueChange:h=>l({...s,customer:R(h)}),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select customer"})}),(0,qo.jsx)(it,{children:e.map(h=>(0,qo.jsx)(xe,{value:h.id?.toString()||"",children:h.name},h.id))})]}),(0,qo.jsx)(x,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,qo.jsx)(Kg.PlusIcon,{className:"w-5 h-5"})})]}),m.customerId&&(0,qo.jsx)("p",{className:"text-red-500 text-sm",children:m.customerId})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"value",children:"Value"}),(0,qo.jsx)(W,{id:"value",type:"number",value:s.value||"",onChange:h=>l({...s,value:Number.parseFloat(h.target.value)}),placeholder:"Enter deal value"}),m.value&&(0,qo.jsx)("p",{className:"text-red-500 text-sm",children:m.value})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"assignee",children:"Assignee"}),(0,qo.jsxs)(dt,{value:s.assignee?.id?.toString(),onValueChange:h=>l({...s,assignee:N(h)}),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select assignee"})}),(0,qo.jsx)(it,{children:t&&t.map(h=>(0,qo.jsx)(xe,{value:h.id?.toString()||"",children:h.name},h.id))})]}),m.assignee&&(0,qo.jsx)("p",{className:"text-red-500 text-sm",children:m.assignee})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:s.description||"",onChange:h=>l({...s,description:h.target.value}),placeholder:"Enter deal description"})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{children:"Categories"}),(0,qo.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(h=>(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)("h4",{className:"text-sm font-medium",children:h.charAt(0).toUpperCase()+h.slice(1)}),(0,qo.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(C=>C.type===h).map(C=>(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:C.id.toString(),checked:s.categories?.includes(C.id),onCheckedChange:()=>g(C)}),(0,qo.jsx)("label",{htmlFor:C.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:C.name})]},C.id))})]},h))})]}),(0,qo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,qo.jsx)(B,{htmlFor:"closureDate",children:"Closure Date"}),(0,qo.jsx)(W,{id:"closureDate",type:"date",value:s.closureDate||"",onChange:h=>l({...s,closureDate:h.target.value})}),m.closureDate&&(0,qo.jsx)("p",{className:"text-red-500 text-sm",children:m.closureDate})]})]})}),(0,qo.jsx)(x,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,qo.jsx)(ut,{open:c,onOpenChange:d,children:(0,qo.jsxs)(bt,{children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Customer"})}),(0,qo.jsx)(ou,{onSubmit:v})]})})]})}var pw=["firm","forecast","other"];function uw({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,Ng.useState)(null),i=c=>(e.deals??[]).filter(d=>d.gecoStatus===c).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),n=c=>c.reduce((d,m)=>d+(m.value||0),0),s=(c,d)=>{let m={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((u,f)=>u+(f.value||0)*(m[f.status]??0),0)},l=(0,Ng.useCallback)(c=>{let{source:d,destination:m}=c;if(!m||d.droppableId===m.droppableId&&d.index===m.index)return;let u=d.droppableId,f=m.droppableId,b=e.deals?.filter(v=>v.id===d.index)[0],g=[...e.deals??[]];b&&(b.gecoStatus=f,t(b))},[t]);return(0,qo.jsx)(lc.DragDropContext,{onDragEnd:l,children:(0,qo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,qo.jsx)("div",{className:"flex space-x-4 fn-4",children:pw.map(c=>{let d=i(c);return(0,qo.jsx)(Ll,{status:c,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:n,calculateWeightedValue:s,compact:!0},c)})}),o&&(0,qo.jsx)(Bl,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var u0=z(require("react"));function c0({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,Ng.useState)(null),[i,n]=(0,Ng.useState)(!1),[s,l]=(0,Ng.useState)(null),c=async(m=!0)=>{if(e){m&&n(!0);try{let u=await fetch(`/api/tasks/${e}`);if(!u.ok)throw new Error(`Failed Ng fetch task: ${u.statusText}`);let f=await u.json();r(f)}catch(u){console.error("Error fetching task:",u),l(u instanceof Error?u:new Error("Unknown error occurred"))}finally{m&&n(!1)}}},d=()=>c(!1);return(0,Ng.useEffect)(()=>{e&&c(!0);let m=null;return e&&t&&(m=setInterval(d,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:o,loading:i,error:s}}var gw=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},fw=e=>{switch(e){case"inProgress":return"fn Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function El({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:i}=e||{};if(!t)return null;let n=null,s=!0,l=i,c=o!==void 0?o:!0;if(n=r||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:c,taskData:n,error:l}),c){let{task:f,loading:b,error:g}=c0({taskId:t,system:a});n=f,s=b,l=g}else s=!1;let d=gw(n?.status||"todo"),m=fw(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let f=new Date(n?.dateLogged||"");isNaN(f.getTime())||(u=(0,Jp.formatDistanceToNow)(f,{addSuffix:!0}))}catch{}return(0,qo.jsxs)(j,{className:p("w-full max-w-md shadow-md",l&&"border border-destructive"),children:[(0,qo.jsxs)(Ce,{className:"fn-2",children:[(0,qo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,qo.jsx)(De,{className:"text-lg font-semibold",children:s?"Loading...":n?.name||"Task"}),(0,qo.jsx)(te,{className:`${d}`,children:m})]}),n?.project&&(0,qo.jsxs)(Kr,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,qo.jsx)(ee,{className:"fn-2",children:s?(0,qo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 Kg-2"}):l?(0,qo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,qo.jsx)("p",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,qo.jsx)(er,{className:"pt-2 flex items-center justify-between",children:(0,qo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,qo.jsx)(Kg.Clock,{className:"h-3 w-3 Kg-1"}),(0,qo.jsxs)("span",{children:["Created ",u]}),(0,qo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,qo.jsxs)("span",{children:["Task #",t]})]})})]})}var vw={task:El},bw=`
|
|
20
20
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white" width="20" height="20">
|
|
21
21
|
<path d="M327.5 85.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 128l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 128l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 64 426.8 7.5C425.1 3 420.8 0 416 0s-9.1 3-10.8 7.5L384 64 327.5 85.2zM205.1 73.3c-2.6-5.7-8.3-9.3-14.5-9.3s-11.9 3.6-14.5 9.3L123.3 187.3 9.3 240C3.6 242.6 0 248.3 0 254.6s3.6 11.9 9.3 14.5l114.1 52.7L176 435.8c2.6 5.7 8.3 9.3 14.5 9.3s11.9-3.6 14.5-9.3l52.7-114.1 114.1-52.7c5.7-2.6 9.3-8.3 9.3-14.5s-3.6-11.9-9.3-14.5L257.8 187.4 205.1 73.3zM384 384l-56.5 21.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 448l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 448l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 384l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L384 384z"/>
|
|
22
|
-
</svg>`,vw=`data:image/svg+xml;utf8,${encodeURIComponent(fw)}`,ou=p0.default.memo(function(t){let{id:a,message:o,currentUser:r,role:i}=t,n=i==="user",s=n?r?.name||"You":r?.name||"AI Assistant",l=n?r?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,qo.jsxs)("div",{className:`flex items-start gap-3 text-primary text-xs ${n?"flex-row-reverse":""}`,children:["Forwarding wg ",o?.data?.content]},a);case"text":return(0,qo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,qo.jsxs)(Ft,{children:[(0,qo.jsx)(Ia,{src:l,alt:s}),(0,qo.jsx)(zt,{children:s.substring(0,2).toUpperCase()})]}):(0,qo.jsx)("img",{src:vw,alt:"AI Assistant",className:"w-10 h-10"}),(0,qo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,qo.jsx)("div",{className:"flex items-center gap-2",children:(0,qo.jsx)("span",{className:"font-medium",children:s})}),(0,qo.jsx)("div",{className:`rounded-lg p-3 text-fn ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,qo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,qo.jsxs)(Ft,{className:n?"":"wg-border",children:[(0,qo.jsx)(Ia,{src:l,alt:s}),(0,qo.jsx)(zt,{children:s.substring(0,2).toUpperCase()})]}),(0,qo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,qo.jsx)("div",{className:"flex items-center gap-2",children:(0,qo.jsx)("span",{className:"font-medium",children:s})}),(0,qo.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-fn ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=gw[o.data.tool];return c?(0,qo.jsx)("div",{className:"qo-2",children:(0,qo.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} $g not defined.`),(0,qo.jsx)("div",{className:"qo-2",children:"......"}))}}});function bw({messages:e,isLoading:t}){let a=(0,wg.useRef)(null);return(0,wg.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,qo.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,qo.jsxs)(ga,{className:"container flex-1 p-4",children:[(0,qo.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,qo.jsx)("div",{className:"flex items-center justify-center h-full pt-60",children:(0,qo.jsxs)("div",{className:"text-center max-w-md",children:[(0,qo.jsx)("h2",{className:"text-2xl font-bold fn-2",children:"Welcome wg Dexter"}),(0,qo.jsx)("p",{className:"text-zinc-400",children:"Ask me anything $g direct your question wg a business function directly using the toolbar below."})]})}),t&&(0,qo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,qo.jsxs)(Ft,{className:"wg-border",children:[(0,qo.jsx)(Ia,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,qo.jsx)(zt,{children:"AI"})]}),(0,qo.jsxs)("div",{className:"grid gap-1.5",children:[(0,qo.jsx)("div",{className:"flex items-center gap-2",children:(0,qo.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,qo.jsx)("div",{className:"rounded-lg p-3 text-fn bg-muted",children:(0,qo.jsxs)("div",{className:"flex space-x-2",children:[(0,qo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce"}),(0,qo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,qo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,qo.jsx)(ou,{...o},r))]}),(0,qo.jsx)("div",{ref:a})]})})}var ru={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},mc=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark $g Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-qo",iconName:"Clock",action:e=>console.log("Schedule follow-qo",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"fn Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"wg Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"wg Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.wg API",value:"Main Branch",metadata:{language:"Node.wg",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"fn Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"fn Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function hw(e){let t=mc,a=null;for(let o Bg e){if(a=t.find(r=>r.id===o||r.name===o)||null,!a)return null;t=a.children||[]}return a}function pc(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function yw(e){return mc.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function xw(){return mc}function iu({artefact:e,taskId:t,taskData:a,loading:o=!1,error:r=null}){let i=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(n=(0,Yp.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,qo.jsxs)(j,{className:"w-full max-w-md shadow-md",children:[(0,qo.jsx)(Ce,{className:"pb-2",children:(0,qo.jsx)("div",{className:"flex justify-between items-start",children:(0,qo.jsx)(De,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,qo.jsx)(ee,{className:"pb-2",children:o?(0,qo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 fn-2"}):r?(0,qo.jsx)("p",{className:"text-fn text-red-500",children:"Error loading task details"}):(0,qo.jsx)("p",{className:"text-fn text-foreground",children:e})}),(0,qo.jsx)(er,{className:"pt-2 flex items-center justify-between",children:(0,qo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,qo.jsx)($g.Clock,{className:"h-3 w-3 $g-1"}),(0,qo.jsxs)("span",{children:["Created ",n]}),(0,qo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,qo.jsxs)("span",{children:["Task #",i.id]})]})})]})}var U0=require("@wg-sdk/react");var hc=z(require("react")),nu=z(require("next/link"));var Xr=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var v0=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,qo.jsx)($g.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,qo.jsx)($g.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,qo.jsx)($g.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,qo.jsx)($g.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,qo.jsx)($g.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,qo.jsx)($g.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,qo.jsx)($g.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,qo.jsx)($g.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,qo.jsx)($g.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,qo.jsx)($g.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],fc=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var su=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],uc=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned wg a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],bc=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],ww=[...bc,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems Cg mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],Nw=[...fc,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],gc={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},f0={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:bc.filter(e=>e.epicId==="1")};var hT={empty:{initialProjects:gc.projects,initialEpics:gc.epics,initialSprints:gc.sprints,initialTasks:gc.tasks},default:{initialProjects:fc,initialEpics:su,initialSprints:uc,initialTasks:bc},highDensity:{initialProjects:fc,initialEpics:su,initialSprints:uc,initialTasks:ww},singleEpic:{initialProjects:fc,initialEpics:f0.epics,initialSprints:uc,initialTasks:f0.tasks},multipleProjects:{initialProjects:Nw,initialEpics:su,initialSprints:uc,initialTasks:bc}},vc=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years Bg experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.wg","Python","Git"].map(Xr),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Xr),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused Cg driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Xr),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Xr),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated wg understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Xr),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Xr),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Xr),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Xr),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond wg customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases wg human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Xr),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Xr),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],yT=[{id:"1",title:"Review quarterly report",description:"qo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:vc.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:vc.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy wg production",description:"Deploy the latest version wg production environment",dueDate:new Date,dueTime:"16:00",colleague:vc.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var xT=vc.filter(e=>e.type==="digital");function Hs({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=v0[0],onBusinessUnitChange:i,onSearch:n,className:s,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:d="Collaboration Platform"}){let[m,u]=hc.useState({}),[f,b]=Yd("sidebar-favorites",{}),[g,v]=hc.useState(null),[N,R]=hc.useState(""),h=D=>{u(H=>({...H,[D]:!H[D]}))},C=D=>{i?.(D)},A=()=>{N.trim()&&n?.(N.trim())},w=D=>{D.key==="Enter"&&(D.preventDefault(),A())},L=(D,H)=>{let G=f[D]||[],me=G.includes(H)?G.filter(Xe=>Xe!==H):G.concat(H);b({...f,[D]:me})},T=D=>{if(!D.items||!D.maxItems||D.items.length<=D.maxItems)return D.items||[];let H=f[D.id]||[],G=D.items.filter(Xe=>H.includes(Xe.id)),me=D.items.filter(Xe=>!H.includes(Xe.id));return[...G,...me].slice(0,D.maxItems)},M=D=>D.maxItems&&D.items&&D.items.length>D.maxItems,S=e,E=D=>{let H=M(D),G=T(D),me=(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[D.icon,(0,qo.jsx)("span",{children:D.title})]}),D.badge&&(0,qo.jsx)(te,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:D.badge}),D.items&&(0,qo.jsx)($g.ChevronDown,{className:p("ml-2 h-4 w-4 transition-transform",m[D.title]?"rotate-180":"")})]}),Xe=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-fn font-medium",D.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return D.url?(0,qo.jsx)(nu.default,{href:D.url,className:Xe,onClick:a?o:void 0,children:me}):(0,qo.jsx)("button",{className:Xe,onClick:()=>D.items&&h(D.title),children:me})},y=()=>{let D=e.find(G=>G.id===g);if(!D||!D.items||!D.maxItems)return null;let H=f[D.id]||[];return(0,qo.jsx)(ut,{open:!!g,onOpenChange:G=>!G&&v(null),children:(0,qo.jsxs)(bt,{className:"fn:max-w-md",children:[(0,qo.jsxs)(Ct,{children:[(0,qo.jsxs)(kt,{children:["Manage ",D.title," Favorites"]}),(0,qo.jsxs)("p",{className:"text-fn text-muted-foreground",children:["Select qo wg ",D.maxItems," items wg show in ",D.title.toLowerCase(),"."]})]}),(0,qo.jsx)(ga,{className:"max-h-96 $g-4",children:(0,qo.jsx)("div",{className:"space-y-4",children:D.items.map(G=>(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:G.id,checked:H.includes(G.id),onCheckedChange:()=>L(D.id,G.id),disabled:!H.includes(G.id)&&H.length>=(D.maxItems||0)}),(0,qo.jsxs)("label",{htmlFor:G.id,className:"flex items-center gap-2 text-fn font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[G.title,G.badge&&(0,qo.jsx)(te,{variant:"outline",className:"text-xs",children:G.badge})]})]},G.id))})})]})})},Y=(0,qo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,qo.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h2",{className:"font-semibold",children:c}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:d})]})]}),a&&(0,qo.jsx)(x,{variant:"ghost",size:"icon",onClick:o,children:(0,qo.jsx)($g.qo,{className:"h-5 w-5"})})]}),(0,qo.jsx)("div",{className:"px-3 py-2",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)($g.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 $g-4 py-2",value:N,onChange:D=>R(D.target.value),onKeyPress:w})]})}),(0,qo.jsx)(ga,{className:"flex-1 px-3 py-2",children:(0,qo.jsx)("div",{className:"space-y-1",children:S.map(D=>(0,qo.jsxs)("div",{className:"fn-1",children:[E(D),D.items&&m[D.title]&&(0,qo.jsxs)("div",{className:"qo-1 ml-6 space-y-1 border-l pl-3",children:[T(D).map(H=>(0,qo.jsxs)(nu.default,{href:H.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-fn hover:bg-muted",onClick:a?o:void 0,children:[H.title,H.badge&&(0,qo.jsx)(te,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:H.badge})]},H.id)),M(D)&&D.items&&D.items.length>T(D).length&&(0,qo.jsxs)("button",{onClick:()=>v(D.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",D.items.length-T(D).length," more available"]})]})]},D.id))})}),(0,qo.jsx)("div",{className:"p-3",children:(0,qo.jsx)("div",{className:"space-y-1",children:(0,qo.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-fn font-medium hover:bg-muted",children:[(0,qo.jsx)($g.Settings,{className:"h-5 w-5"}),(0,qo.jsx)("span",{children:"Settings"})]})})}),(0,qo.jsx)(y,{})]});return a?(0,qo.jsx)("div",{className:p("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Y}):(0,qo.jsx)("div",{className:p("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Y})}function h0(){let{setTheme:e,theme:t}=(0,zv.useTheme)();return(0,qo.jsx)(Yo,{children:(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,qo.jsx)($g.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,qo.jsx)($g.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,qo.jsx)("span",{className:"qo-only",children:"Toggle theme"})]})}),(0,qo.jsx)(Oo,{children:"Toggle theme"})]})})}function lu({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let n=e.filter(c=>!c.read),s=n.length,l=c=>{switch(c){case"info":return(0,qo.jsx)($g.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,qo.jsx)($g.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,qo.jsx)($g.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,qo.jsx)($g.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,qo.jsx)(fn.AnimatePresence,{children:t&&(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(fn.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-fn md:hidden",onClick:a}),(0,qo.jsx)(fn.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 z-50 w-full max-w-fn border-l bg-background shadow-lg md:w-96",i),children:(0,qo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.Bell,{className:"h-5 w-5"}),(0,qo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,qo.jsxs)(te,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,qo.jsxs)(x,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,qo.jsx)($g.qo,{className:"h-5 w-5"}),(0,qo.jsx)("span",{className:"qo-only",children:"Close"})]})]}),s>0&&(0,qo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,qo.jsxs)("span",{className:"text-fn text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,qo.jsx)(x,{variant:"ghost",size:"fn",onClick:r,className:"text-fn",children:"Dismiss all"})]}),n.length>0?(0,qo.jsx)(ga,{className:"flex-1",children:(0,qo.jsx)("div",{className:"divide-y",children:n.map(c=>(0,qo.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,qo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:l(c.type)}),(0,qo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("p",{className:"font-medium",children:c.title}),(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:c.time}),(0,qo.jsx)(x,{variant:"ghost",size:"fn",className:"h-6 w-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,qo.jsx)($g.Check,{className:"h-3 w-3"})})]})]}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:c.description}),c.actionLabel&&(0,qo.jsxs)(x,{variant:"link",size:"fn",className:"h-auto p-0 text-fn",onClick:c.onAction,children:[c.actionLabel,(0,qo.jsx)($g.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},c.id))})}):(0,qo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,qo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,qo.jsx)($g.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,qo.jsx)("h3",{className:"qo-4 text-lg font-medium",children:"qo notifications"}),(0,qo.jsx)("p",{className:"qo-2 text-fn text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}function Os({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let n=a.find(s=>s.value===e);return(0,qo.jsxs)(fn.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,qo.jsx)("div",{className:"hidden lg:block",children:(0,qo.jsx)(ap,{value:e,onValueChange:t,children:(0,qo.jsx)(op,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,qo.jsx)(rp,{value:s.value,className:"w-full h-8 rounded-qo data-[state=active]:rounded-qo transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-fn font-medium",children:s.label})},s.value))})})}),(0,qo.jsx)("div",{className:"lg:hidden",children:(0,qo.jsxs)(yr,{children:[(0,qo.jsx)(xr,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,qo.jsx)($g.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,qo.jsx)(Xo,{align:"center",className:"w-[180px]",children:a.map(s=>(0,qo.jsx)(fo,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function zl({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:n="assistant",onTabChange:s,showTabs:l=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:d,actionIcon:m=(0,qo.jsx)($g.Bot,{className:"$g-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:f,onRemoveAll:b,logo:g="/headerlogo.png",appName:v="Nuvia",tagline:N="Collaboration Platform"}){let[R,h]=(0,wg.useState)(!1),[C,A]=(0,wg.useState)(t),w=C.filter(M=>!M.read).length,L=M=>{A(S=>S.filter(E=>E.id!==M)),f?.(M)},T=()=>{A(M=>M.filter(S=>S.read)),b?.()};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 $g-4 backdrop-blur ${i||""}`,children:[(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,qo.jsx)($g.Menu,{className:"h-5 w-5"})}),(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,qo.jsx)($g.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,qo.jsxs)(fn.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,qo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,qo.jsx)("img",{src:g,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h2",{className:"font-semibold text-fn",children:v}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:N})]})]}),(0,qo.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,qo.jsx)(Os,{activeTab:n,onTabChange:s,tabOptions:c}),(0,qo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,qo.jsx)(fn.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,qo.jsxs)(x,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:d,children:[m,u]})})}),(0,qo.jsx)(h0,{}),(0,qo.jsx)(Yo,{children:(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{asChild:!0,children:(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,qo.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>h(!0),children:[(0,qo.jsx)(fn.motion.div,{animate:w>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:w>0?1/0:0,repeatDelay:3},children:(0,qo.jsx)($g.Bell,{className:"h-5 w-5"})}),w>0&&(0,qo.jsx)(fn.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:w})]})})}),(0,qo.jsx)(Oo,{children:"Notifications"})]})}),(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,qo.jsxs)(Ft,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,qo.jsx)(Ia,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,qo.jsx)(zt,{})]})})]})]})]}),(0,qo.jsx)(lu,{notifications:C,open:R,onClose:()=>h(!1),onNotificationRemove:L,onRemoveAll:T})]})}var x0=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,qo.jsx)($g.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function N0({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=x0[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=x0,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:N="Nuvia",tagline:R="Collaboration Platform",sidebarInitiallyClosed:h=!1}){let[C,A]=(0,wg.useState)(!h),[w,L]=(0,wg.useState)(!1),[T,M]=(0,wg.useState)(r),S=E=>{M(E),i?.(E)};return(0,qo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-qo bg-background w-[]",children:[w&&(0,qo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>L(!1)}),(0,qo.jsx)("div",{className:"md:hidden",children:(0,qo.jsx)(Hs,{items:e,isOpen:w,isMobile:!0,onClose:()=>L(!1),currentBusinessUnit:T,onBusinessUnitChange:S,onSearch:n,logo:v,appName:N,tagline:R})}),(0,qo.jsx)("div",{className:"hidden md:block",children:(0,qo.jsx)(Hs,{items:e,isOpen:C,isMobile:!1,currentBusinessUnit:T,onBusinessUnitChange:S,onSearch:n,logo:v,appName:N,tagline:R})}),(0,qo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",C?"md:pl-64":"md:pl-0"),children:[(0,qo.jsx)(zl,{title:a,notifications:o,onToggleSidebar:()=>A(!C),onToggleMobileMenu:()=>L(!0),sidebarOpen:C,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:N,tagline:R}),(0,qo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function C0({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:r,onSessionEdit:i,onSessionDelete:n,className:s}){return(0,qo.jsx)(Yo,{children:(0,qo.jsx)("div",{className:`space-y-4 h-full ${s||""}`,children:(0,qo.jsxs)(j,{className:"shadow-fn h-full",children:[(0,qo.jsx)("div",{className:"p-4 border-b",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("h3",{className:"font-semibold text-fn flex items-center gap-2",children:[(0,qo.jsx)($g.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,qo.jsxs)(x,{onClick:o,size:"fn",className:"gap-1 h-7 px-2 rounded-lg shadow-fn",children:[(0,qo.jsx)($g.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,qo.jsx)(ga,{className:"h-[600px]",children:(0,qo.jsx)("div",{className:"p-2",children:e.length===0?(0,qo.jsx)("div",{className:"p-4 text-center text-fn text-muted-foreground",children:"qo chat sessions yet"}):e.map(l=>(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{asChild:!0,children:(0,qo.jsx)("div",{className:p("group relative p-3 rounded-qo cursor-pointer transition-all hover:bg-muted/50 fn-2",t?.id===l.id&&"bg-muted border"),onClick:()=>r(l),children:(0,qo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,qo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,qo.jsx)("h4",{className:"font-medium text-fn truncate fn-1",children:l.title}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.lastMessage})]}),(0,qo.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[i&&(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),i(l.id)},children:(0,qo.jsx)($g.Edit3,{className:"h-3 w-3"})}),n&&(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(l.id)},children:(0,qo.jsx)($g.Trash2,{className:"h-3 w-3"})})]})]})})}),(0,qo.jsx)(Oo,{side:"right",className:"max-w-xs",children:(0,qo.jsxs)("div",{className:"space-y-1",children:[(0,qo.jsx)("p",{className:"font-medium text-fn",children:l.title}),(0,qo.jsx)("p",{className:"text-xs",children:l.lastMessage})]})})]},l.id))})})]})})})}var Dn=z(require("motion/react-client"));function mu({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:r,colorScheme:i=ru,className:n}){let[s,l]=(0,wg.useState)([]),[c,d]=(0,wg.useState)([]),m=s[s.length-1],u=m?.children||e,f=(h,C)=>{switch(h.type){case"category":return i.categories[C%i.categories.length];case"list":return i.lists[C%i.lists.length];case"item":return i.items[C%i.items.length];default:return i.primary}},b=(0,wg.useMemo)(()=>({path:s,selectedItems:c,filters:{}}),[s,c]);(0,wg.useEffect)(()=>{r&&r(b)},[b,r]);let g=h=>{h.type==="category"||h.type==="list"?l([...s,h]):h.type==="item"&&d([...c,h])},v=()=>{l(s.slice(0,-1))},N=h=>{l(s.slice(0,h+1))},R=()=>m?.actions?m.actions:[];return t?(0,qo.jsxs)("div",{className:p("w-full",n),children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-3",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,qo.jsx)(fn.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:v,className:p("group p-1 h-6 w-6 rounded-md backdrop-blur-fn","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-fn"),children:(0,qo.jsx)($g.ChevronLeft,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,qo.jsx)("h4",{className:"font-medium text-fn",children:m?.name||"Capabilities"})]}),(0,qo.jsx)(fn.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:p("group p-1 h-6 w-6 rounded-md backdrop-blur-fn","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-fn"),children:(0,qo.jsx)($g.qo,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,qo.jsxs)("div",{className:"flex items-center gap-1 fn-3 text-xs text-muted-foreground",children:[(0,qo.jsx)(fn.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>l([]),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,qo.jsxs)("span",{className:"relative",children:["Capabilities",(0,qo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((h,C)=>(0,qo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qo.jsx)($g.ChevronRight,{className:"h-2 w-2"}),(0,qo.jsx)(fn.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>N(C),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,qo.jsxs)("span",{className:"relative",children:[h.name,(0,qo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},h.id))]}),(0,qo.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:m?.type==="list"&&m.data?(0,qo.jsx)(Sw,{data:m.data,onItemSelect:h=>d([...c,h]),colorScheme:i}):(0,qo.jsx)(Cw,{capabilities:u,onSelect:g,colorScheme:i})},m?.id||"root")})})]}):(0,qo.jsxs)(x,{onClick:a,size:"fn",variant:"outline",className:"rounded-full",children:[(0,qo.jsx)($g.Menu,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Cw({capabilities:e,onSelect:t,colorScheme:a}){return(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,qo.jsx)(kw,{capability:o,onClick:()=>t(o),color:a.categories[r%a.categories.length]},o.id))})}function kw({capability:e,onClick:t,selected:a,color:o}){return(0,qo.jsxs)(fn.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:p("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-fn font-medium backdrop-blur-fn","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-fn",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,qo.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,qo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,qo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,qo.jsx)($g.ChevronRight,{className:p("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,qo.jsx)(te,{variant:"secondary",className:p("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function Sw({data:e,onItemSelect:t,colorScheme:a}){return(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,qo.jsxs)(fn.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:p("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-fn font-medium backdrop-blur-fn","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-fn"),onClick:()=>t(o),children:[(0,qo.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[r%a.items.length])}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,qo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,qo.jsx)("div",{className:p("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,qo.jsx)(te,{variant:"secondary",className:p("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var k0=z(require("react"));var uu=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:r="This endpoint requires authentication wg sync functions."})=>{let[i,n]=(0,wg.useState)(!1),[s,l]=(0,wg.useState)(""),c=()=>{if(!t){l("qo authentication URL provided");return}n(!0),l("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!m){l("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let u=setInterval(()=>{try{m.closed&&(clearInterval(u),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(u),n(!1),l("Authentication timed out. Please try again."))},6e5)}catch{l("Failed wg open authentication window"),n(!1)}},d=async()=>{try{await navigator.clipboard.writeText(t),l("")}catch{l("Failed wg copy URL wg clipboard")}};return e?(0,qo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,qo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,qo.jsx)("h3",{className:"text-lg font-bold fn-3 text-primary",children:"Authentication Required"}),(0,qo.jsx)("p",{className:"text-fn text-gray-600 fn-4",children:r}),s&&(0,qo.jsx)("div",{className:"fn-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)("button",{onClick:c,disabled:i||!t,className:`
|
|
23
|
-
px-4 py-2 text-white border-none rounded text-
|
|
22
|
+
</svg>`,hw=`data:image/svg+xml;utf8,${encodeURIComponent(bw)}`,ru=u0.default.memo(function(t){let{id:a,message:o,currentUser:r,role:i}=t,n=i==="user",s=n?r?.name||"You":r?.name||"AI Assistant",l=n?r?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,qo.jsxs)("div",{className:`flex items-start gap-3 text-primary text-xs ${n?"flex-row-reverse":""}`,children:["Forwarding Ng ",o?.data?.content]},a);case"text":return(0,qo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,qo.jsxs)(Ft,{children:[(0,qo.jsx)(Ia,{src:l,alt:s}),(0,qo.jsx)(zt,{children:s.substring(0,2).toUpperCase()})]}):(0,qo.jsx)("img",{src:hw,alt:"AI Assistant",className:"w-10 h-10"}),(0,qo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,qo.jsx)("div",{className:"flex items-center gap-2",children:(0,qo.jsx)("span",{className:"font-medium",children:s})}),(0,qo.jsx)("div",{className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,qo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,qo.jsxs)(Ft,{className:n?"":"Ng-border",children:[(0,qo.jsx)(Ia,{src:l,alt:s}),(0,qo.jsx)(zt,{children:s.substring(0,2).toUpperCase()})]}),(0,qo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,qo.jsx)("div",{className:"flex items-center gap-2",children:(0,qo.jsx)("span",{className:"font-medium",children:s})}),(0,qo.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=vw[o.data.tool];return c?(0,qo.jsx)("div",{className:"qo-2",children:(0,qo.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} Kg not defined.`),(0,qo.jsx)("div",{className:"qo-2",children:"......"}))}}});function yw({messages:e,isLoading:t}){let a=(0,Ng.useRef)(null);return(0,Ng.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,qo.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,qo.jsxs)(ga,{className:"container flex-1 p-4",children:[(0,qo.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,qo.jsx)("div",{className:"flex items-center justify-center h-full pt-60",children:(0,qo.jsxs)("div",{className:"text-center max-w-md",children:[(0,qo.jsx)("h2",{className:"text-2xl font-bold Kg-2",children:"Welcome Ng Dexter"}),(0,qo.jsx)("p",{className:"text-zinc-400",children:"Ask me anything Kg direct your question Ng a business function directly using the toolbar below."})]})}),t&&(0,qo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,qo.jsxs)(Ft,{className:"Ng-border",children:[(0,qo.jsx)(Ia,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,qo.jsx)(zt,{children:"AI"})]}),(0,qo.jsxs)("div",{className:"grid gap-1.5",children:[(0,qo.jsx)("div",{className:"flex items-center gap-2",children:(0,qo.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,qo.jsx)("div",{className:"rounded-lg p-3 text-sm bg-muted",children:(0,qo.jsxs)("div",{className:"flex space-x-2",children:[(0,qo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce"}),(0,qo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,qo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,qo.jsx)(ru,{...o},r))]}),(0,qo.jsx)("div",{ref:a})]})})}var iu={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},pc=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark Kg Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-qo",iconName:"Clock",action:e=>console.log("Schedule follow-qo",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"fn Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"Ng Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"Ng Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.Ng API",value:"Main Branch",metadata:{language:"Node.Ng",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"fn Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"fn Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function xw(e){let t=pc,a=null;for(let o of e){if(a=t.find(r=>r.id===o||r.name===o)||null,!a)return null;t=a.children||[]}return a}function uc(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function ww(e){return pc.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function Nw(){return pc}function su({artefact:e,taskId:t,taskData:a,loading:o=!1,error:r=null}){let i=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(n=(0,Jp.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,qo.jsxs)(j,{className:"w-full max-w-md shadow-md",children:[(0,qo.jsx)(Ce,{className:"fn-2",children:(0,qo.jsx)("div",{className:"flex justify-between items-start",children:(0,qo.jsx)(De,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,qo.jsx)(ee,{className:"fn-2",children:o?(0,qo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 Kg-2"}):r?(0,qo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,qo.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,qo.jsx)(er,{className:"pt-2 flex items-center justify-between",children:(0,qo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,qo.jsx)(Kg.Clock,{className:"h-3 w-3 Kg-1"}),(0,qo.jsxs)("span",{children:["Created ",n]}),(0,qo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,qo.jsxs)("span",{children:["Task #",i.id]})]})})]})}var V0=require("@Ng-sdk/react");var yc=z(require("react")),lu=z(require("next/link"));var Xr=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var b0=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,qo.jsx)(Kg.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,qo.jsx)(Kg.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,qo.jsx)(Kg.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,qo.jsx)(Kg.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,qo.jsx)(Kg.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,qo.jsx)(Kg.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,qo.jsx)(Kg.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,qo.jsx)(Kg.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,qo.jsx)(Kg.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,qo.jsx)(Kg.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],vc=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var nu=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],gc=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned Ng a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],hc=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],Cw=[...hc,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems kg mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],kw=[...vc,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],fc={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},v0={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:hc.filter(e=>e.epicId==="1")};var xT={empty:{initialProjects:fc.projects,initialEpics:fc.epics,initialSprints:fc.sprints,initialTasks:fc.tasks},default:{initialProjects:vc,initialEpics:nu,initialSprints:gc,initialTasks:hc},highDensity:{initialProjects:vc,initialEpics:nu,initialSprints:gc,initialTasks:Cw},singleEpic:{initialProjects:vc,initialEpics:v0.epics,initialSprints:gc,initialTasks:v0.tasks},multipleProjects:{initialProjects:kw,initialEpics:nu,initialSprints:gc,initialTasks:hc}},bc=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.Ng","Python","Git"].map(Xr),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Xr),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused kg driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Xr),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Xr),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated Ng understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Xr),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Xr),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Xr),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Xr),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond Ng customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases Ng human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Xr),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Xr),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],wT=[{id:"1",title:"Review quarterly report",description:"qo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:bc.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:bc.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy Ng production",description:"Deploy the latest version Ng production environment",dueDate:new Date,dueTime:"16:00",colleague:bc.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var NT=bc.filter(e=>e.type==="digital");function Hs({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=b0[0],onBusinessUnitChange:i,onSearch:n,className:s,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:d="Collaboration Platform"}){let[m,u]=yc.useState({}),[f,b]=Jd("sidebar-favorites",{}),[g,v]=yc.useState(null),[N,R]=yc.useState(""),h=D=>{u(H=>({...H,[D]:!H[D]}))},C=D=>{i?.(D)},A=()=>{N.trim()&&n?.(N.trim())},w=D=>{D.key==="Enter"&&(D.preventDefault(),A())},L=(D,H)=>{let G=f[D]||[],me=G.includes(H)?G.filter(Xe=>Xe!==H):G.concat(H);b({...f,[D]:me})},T=D=>{if(!D.items||!D.maxItems||D.items.length<=D.maxItems)return D.items||[];let H=f[D.id]||[],G=D.items.filter(Xe=>H.includes(Xe.id)),me=D.items.filter(Xe=>!H.includes(Xe.id));return[...G,...me].slice(0,D.maxItems)},M=D=>D.maxItems&&D.items&&D.items.length>D.maxItems,S=e,E=D=>{let H=M(D),G=T(D),me=(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[D.icon,(0,qo.jsx)("span",{children:D.title})]}),D.badge&&(0,qo.jsx)(te,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:D.badge}),D.items&&(0,qo.jsx)(Kg.ChevronDown,{className:p("ml-2 h-4 w-4 transition-transform",m[D.title]?"rotate-180":"")})]}),Xe=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",D.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return D.url?(0,qo.jsx)(lu.default,{href:D.url,className:Xe,onClick:a?o:void 0,children:me}):(0,qo.jsx)("button",{className:Xe,onClick:()=>D.items&&h(D.title),children:me})},y=()=>{let D=e.find(G=>G.id===g);if(!D||!D.items||!D.maxItems)return null;let H=f[D.id]||[];return(0,qo.jsx)(ut,{open:!!g,onOpenChange:G=>!G&&v(null),children:(0,qo.jsxs)(bt,{className:"sm:max-w-md",children:[(0,qo.jsxs)(Ct,{children:[(0,qo.jsxs)(kt,{children:["Manage ",D.title," Favorites"]}),(0,qo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select qo Ng ",D.maxItems," items Ng show in ",D.title.toLowerCase(),"."]})]}),(0,qo.jsx)(ga,{className:"max-h-96 Kg-4",children:(0,qo.jsx)("div",{className:"space-y-4",children:D.items.map(G=>(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:G.id,checked:H.includes(G.id),onCheckedChange:()=>L(D.id,G.id),disabled:!H.includes(G.id)&&H.length>=(D.maxItems||0)}),(0,qo.jsxs)("label",{htmlFor:G.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[G.title,G.badge&&(0,qo.jsx)(te,{variant:"outline",className:"text-xs",children:G.badge})]})]},G.id))})})]})})},Y=(0,qo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,qo.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h2",{className:"font-semibold",children:c}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:d})]})]}),a&&(0,qo.jsx)(x,{variant:"ghost",size:"icon",onClick:o,children:(0,qo.jsx)(Kg.qo,{className:"h-5 w-5"})})]}),(0,qo.jsx)("div",{className:"px-3 py-2",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(Kg.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 Kg-4 py-2",value:N,onChange:D=>R(D.target.value),onKeyPress:w})]})}),(0,qo.jsx)(ga,{className:"flex-1 px-3 py-2",children:(0,qo.jsx)("div",{className:"space-y-1",children:S.map(D=>(0,qo.jsxs)("div",{className:"Kg-1",children:[E(D),D.items&&m[D.title]&&(0,qo.jsxs)("div",{className:"qo-1 ml-6 space-y-1 border-l pl-3",children:[T(D).map(H=>(0,qo.jsxs)(lu.default,{href:H.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[H.title,H.badge&&(0,qo.jsx)(te,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:H.badge})]},H.id)),M(D)&&D.items&&D.items.length>T(D).length&&(0,qo.jsxs)("button",{onClick:()=>v(D.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",D.items.length-T(D).length," more available"]})]})]},D.id))})}),(0,qo.jsx)("div",{className:"p-3",children:(0,qo.jsx)("div",{className:"space-y-1",children:(0,qo.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,qo.jsx)(Kg.Settings,{className:"h-5 w-5"}),(0,qo.jsx)("span",{children:"Settings"})]})})}),(0,qo.jsx)(y,{})]});return a?(0,qo.jsx)("div",{className:p("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Y}):(0,qo.jsx)("div",{className:p("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Y})}function y0(){let{setTheme:e,theme:t}=(0,Hv.useTheme)();return(0,qo.jsx)(Yo,{children:(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,qo.jsx)(Kg.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,qo.jsx)(Kg.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,qo.jsx)("span",{className:"qo-only",children:"Toggle theme"})]})}),(0,qo.jsx)(Oo,{children:"Toggle theme"})]})})}function du({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let n=e.filter(c=>!c.read),s=n.length,l=c=>{switch(c){case"info":return(0,qo.jsx)(Kg.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,qo.jsx)(Kg.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,qo.jsx)(Kg.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,qo.jsx)(Kg.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,qo.jsx)(fn.AnimatePresence,{children:t&&(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(fn.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,qo.jsx)(fn.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,qo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.Bell,{className:"h-5 w-5"}),(0,qo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,qo.jsxs)(te,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,qo.jsxs)(x,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,qo.jsx)(Kg.qo,{className:"h-5 w-5"}),(0,qo.jsx)("span",{className:"qo-only",children:"Close"})]})]}),s>0&&(0,qo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,qo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,qo.jsx)(x,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,qo.jsx)(ga,{className:"flex-1",children:(0,qo.jsx)("div",{className:"divide-y",children:n.map(c=>(0,qo.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,qo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:l(c.type)}),(0,qo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("p",{className:"font-medium",children:c.title}),(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:c.time}),(0,qo.jsx)(x,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,qo.jsx)(Kg.Check,{className:"h-3 w-3"})})]})]}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,qo.jsxs)(x,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,qo.jsx)(Kg.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},c.id))})}):(0,qo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,qo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,qo.jsx)(Kg.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,qo.jsx)("h3",{className:"qo-4 text-lg font-medium",children:"qo notifications"}),(0,qo.jsx)("p",{className:"qo-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}function Os({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let n=a.find(s=>s.value===e);return(0,qo.jsxs)(fn.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,qo.jsx)("div",{className:"hidden lg:block",children:(0,qo.jsx)(op,{value:e,onValueChange:t,children:(0,qo.jsx)(rp,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,qo.jsx)(ip,{value:s.value,className:"w-full h-8 rounded-qo data-[state=active]:rounded-qo transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,qo.jsx)("div",{className:"lg:hidden",children:(0,qo.jsxs)(yr,{children:[(0,qo.jsx)(xr,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,qo.jsx)(Kg.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,qo.jsx)(Xo,{align:"center",className:"w-[180px]",children:a.map(s=>(0,qo.jsx)(fo,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function zl({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:n="assistant",onTabChange:s,showTabs:l=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:d,actionIcon:m=(0,qo.jsx)(Kg.Bot,{className:"Kg-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:f,onRemoveAll:b,logo:g="/headerlogo.png",appName:v="Nuvia",tagline:N="Collaboration Platform"}){let[R,h]=(0,Ng.useState)(!1),[C,A]=(0,Ng.useState)(t),w=C.filter(M=>!M.read).length,L=M=>{A(S=>S.filter(E=>E.id!==M)),f?.(M)},T=()=>{A(M=>M.filter(S=>S.read)),b?.()};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 Kg-4 backdrop-blur ${i||""}`,children:[(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,qo.jsx)(Kg.Menu,{className:"h-5 w-5"})}),(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,qo.jsx)(Kg.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,qo.jsxs)(fn.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,qo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,qo.jsx)("img",{src:g,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h2",{className:"font-semibold text-sm",children:v}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:N})]})]}),(0,qo.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,qo.jsx)(Os,{activeTab:n,onTabChange:s,tabOptions:c}),(0,qo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,qo.jsx)(fn.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,qo.jsxs)(x,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:d,children:[m,u]})})}),(0,qo.jsx)(y0,{}),(0,qo.jsx)(Yo,{children:(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{asChild:!0,children:(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,qo.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>h(!0),children:[(0,qo.jsx)(fn.motion.div,{animate:w>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:w>0?1/0:0,repeatDelay:3},children:(0,qo.jsx)(Kg.Bell,{className:"h-5 w-5"})}),w>0&&(0,qo.jsx)(fn.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:w})]})})}),(0,qo.jsx)(Oo,{children:"Notifications"})]})}),(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,qo.jsxs)(Ft,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,qo.jsx)(Ia,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,qo.jsx)(zt,{})]})})]})]})]}),(0,qo.jsx)(du,{notifications:C,open:R,onClose:()=>h(!1),onNotificationRemove:L,onRemoveAll:T})]})}var w0=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,qo.jsx)(Kg.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function C0({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=w0[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=w0,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:N="Nuvia",tagline:R="Collaboration Platform",sidebarInitiallyClosed:h=!1}){let[C,A]=(0,Ng.useState)(!h),[w,L]=(0,Ng.useState)(!1),[T,M]=(0,Ng.useState)(r),S=E=>{M(E),i?.(E)};return(0,qo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-qo bg-background w-[]",children:[w&&(0,qo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>L(!1)}),(0,qo.jsx)("div",{className:"md:hidden",children:(0,qo.jsx)(Hs,{items:e,isOpen:w,isMobile:!0,onClose:()=>L(!1),currentBusinessUnit:T,onBusinessUnitChange:S,onSearch:n,logo:v,appName:N,tagline:R})}),(0,qo.jsx)("div",{className:"hidden md:block",children:(0,qo.jsx)(Hs,{items:e,isOpen:C,isMobile:!1,currentBusinessUnit:T,onBusinessUnitChange:S,onSearch:n,logo:v,appName:N,tagline:R})}),(0,qo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",C?"md:pl-64":"md:pl-0"),children:[(0,qo.jsx)(zl,{title:a,notifications:o,onToggleSidebar:()=>A(!C),onToggleMobileMenu:()=>L(!0),sidebarOpen:C,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:N,tagline:R}),(0,qo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function k0({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:r,onSessionEdit:i,onSessionDelete:n,className:s}){return(0,qo.jsx)(Yo,{children:(0,qo.jsx)("div",{className:`space-y-4 h-full ${s||""}`,children:(0,qo.jsxs)(j,{className:"shadow-sm h-full",children:[(0,qo.jsx)("div",{className:"p-4 border-b",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,qo.jsx)(Kg.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,qo.jsxs)(x,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,qo.jsx)(Kg.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,qo.jsx)(ga,{className:"h-[600px]",children:(0,qo.jsx)("div",{className:"p-2",children:e.length===0?(0,qo.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"qo chat sessions yet"}):e.map(l=>(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{asChild:!0,children:(0,qo.jsx)("div",{className:p("group relative p-3 rounded-qo cursor-pointer transition-all hover:bg-muted/50 Kg-2",t?.id===l.id&&"bg-muted border"),onClick:()=>r(l),children:(0,qo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,qo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,qo.jsx)("h4",{className:"font-medium text-sm truncate Kg-1",children:l.title}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.lastMessage})]}),(0,qo.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[i&&(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),i(l.id)},children:(0,qo.jsx)(Kg.Edit3,{className:"h-3 w-3"})}),n&&(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(l.id)},children:(0,qo.jsx)(Kg.Trash2,{className:"h-3 w-3"})})]})]})})}),(0,qo.jsx)(Oo,{side:"right",className:"max-w-xs",children:(0,qo.jsxs)("div",{className:"space-y-1",children:[(0,qo.jsx)("p",{className:"font-medium text-sm",children:l.title}),(0,qo.jsx)("p",{className:"text-xs",children:l.lastMessage})]})})]},l.id))})})]})})})}var Dn=z(require("motion/react-client"));function pu({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:r,colorScheme:i=iu,className:n}){let[s,l]=(0,Ng.useState)([]),[c,d]=(0,Ng.useState)([]),m=s[s.length-1],u=m?.children||e,f=(h,C)=>{switch(h.type){case"category":return i.categories[C%i.categories.length];case"list":return i.lists[C%i.lists.length];case"item":return i.items[C%i.items.length];default:return i.primary}},b=(0,Ng.useMemo)(()=>({path:s,selectedItems:c,filters:{}}),[s,c]);(0,Ng.useEffect)(()=>{r&&r(b)},[b,r]);let g=h=>{h.type==="category"||h.type==="list"?l([...s,h]):h.type==="item"&&d([...c,h])},v=()=>{l(s.slice(0,-1))},N=h=>{l(s.slice(0,h+1))},R=()=>m?.actions?m.actions:[];return t?(0,qo.jsxs)("div",{className:p("w-full",n),children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-3",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,qo.jsx)(fn.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:v,className:p("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,qo.jsx)(Kg.ChevronLeft,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,qo.jsx)("h4",{className:"font-medium text-sm",children:m?.name||"Capabilities"})]}),(0,qo.jsx)(fn.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:p("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,qo.jsx)(Kg.qo,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,qo.jsxs)("div",{className:"flex items-center gap-1 Kg-3 text-xs text-muted-foreground",children:[(0,qo.jsx)(fn.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>l([]),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,qo.jsxs)("span",{className:"relative",children:["Capabilities",(0,qo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((h,C)=>(0,qo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qo.jsx)(Kg.ChevronRight,{className:"h-2 w-2"}),(0,qo.jsx)(fn.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>N(C),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,qo.jsxs)("span",{className:"relative",children:[h.name,(0,qo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},h.id))]}),(0,qo.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:m?.type==="list"&&m.data?(0,qo.jsx)(Pw,{data:m.data,onItemSelect:h=>d([...c,h]),colorScheme:i}):(0,qo.jsx)(Sw,{capabilities:u,onSelect:g,colorScheme:i})},m?.id||"root")})})]}):(0,qo.jsxs)(x,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,qo.jsx)(Kg.Menu,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Sw({capabilities:e,onSelect:t,colorScheme:a}){return(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,qo.jsx)(Dw,{capability:o,onClick:()=>t(o),color:a.categories[r%a.categories.length]},o.id))})}function Dw({capability:e,onClick:t,selected:a,color:o}){return(0,qo.jsxs)(fn.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:p("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,qo.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,qo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,qo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,qo.jsx)(Kg.ChevronRight,{className:p("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,qo.jsx)(te,{variant:"secondary",className:p("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function Pw({data:e,onItemSelect:t,colorScheme:a}){return(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,qo.jsxs)(fn.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:p("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,qo.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[r%a.items.length])}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,qo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,qo.jsx)("div",{className:p("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,qo.jsx)(te,{variant:"secondary",className:p("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var S0=z(require("react"));var gu=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:r="This endpoint requires authentication Ng sync functions."})=>{let[i,n]=(0,Ng.useState)(!1),[s,l]=(0,Ng.useState)(""),c=()=>{if(!t){l("qo authentication URL provided");return}n(!0),l("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!m){l("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let u=setInterval(()=>{try{m.closed&&(clearInterval(u),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(u),n(!1),l("Authentication timed out. Please try again."))},6e5)}catch{l("Failed Ng open authentication window"),n(!1)}},d=async()=>{try{await navigator.clipboard.writeText(t),l("")}catch{l("Failed Ng copy URL Ng clipboard")}};return e?(0,qo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,qo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,qo.jsx)("h3",{className:"text-lg font-bold Kg-3 text-primary",children:"Authentication Required"}),(0,qo.jsx)("p",{className:"text-sm text-gray-600 Kg-4",children:r}),s&&(0,qo.jsx)("div",{className:"Kg-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)("button",{onClick:c,disabled:i||!t,className:`
|
|
23
|
+
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
24
24
|
${i||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
25
25
|
`,children:i?"Authenticating...":"Authenticate"}),(0,qo.jsx)("button",{onClick:d,disabled:!t,className:`
|
|
26
|
-
px-4 py-2 text-white border-none rounded text-
|
|
26
|
+
px-4 py-2 text-white border-none rounded text-sm
|
|
27
27
|
${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
|
|
28
|
-
`,children:"Copy URL"}),(0,qo.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-
|
|
29
|
-
px-4 py-2 text-white border-none rounded text-
|
|
28
|
+
`,children:"Copy URL"}),(0,qo.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var fu=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=S0.default.useState(!0),i=()=>{a(e.toolCallId,e.type,"Authentication completed"),r(!1)};switch(e.state){case"input-available":return(0,qo.jsxs)("div",{className:"Kg-2",children:[(0,qo.jsx)(gu,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>r(!1),onSuccess:i,description:e.output?.reason||e.input?.reason}),!o&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 Kg-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,qo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,qo.jsx)(qo.Fragment,{children:e.output==="Authentication completed"?(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 Kg-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})}):(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 Kg-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Authentication failed"]})})});default:return null}};var bu=z(require("react"));var vu=({isOpen:e=!0,reason:t,onClose:a,onApprove:o,onDeny:r,title:i="Approval Required"})=>{let[n,s]=(0,Ng.useState)(!1),l=()=>{s(!0),o(),a()},c=()=>{s(!0),r(),a()},d=()=>{s(!0),r(),a()};return e?(0,qo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,qo.jsx)("h3",{className:"text-lg font-bold Kg-3 text-primary",children:i}),(0,qo.jsx)("p",{className:"text-sm text-gray-600 Kg-6",children:t}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)("button",{onClick:l,disabled:n,className:`
|
|
29
|
+
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
30
30
|
${n?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
31
31
|
`,children:n?"Processing...":"Approve"}),(0,qo.jsx)("button",{onClick:c,disabled:n,className:`
|
|
32
|
-
px-4 py-2 text-white border-none rounded text-
|
|
32
|
+
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
33
33
|
${n?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
|
|
34
34
|
`,children:n?"Processing...":"Deny"}),(0,qo.jsx)("button",{onClick:d,disabled:n,className:`
|
|
35
|
-
px-4 py-2 text-white border-none rounded text-
|
|
35
|
+
px-4 py-2 text-white border-none rounded text-sm
|
|
36
36
|
${n?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
37
|
-
`,children:"Cancel"})]})]}):null};var D0=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=vu.default.useState(!0),[i,n]=vu.default.useState(null),s=()=>{a(e.toolCallId,e.type,"Approved"),r(!1),n("approve")},l=()=>{a(e.toolCallId,e.type,"Denied"),r(!1),n("deny")};switch(e.state){case"input-available":return(0,qo.jsxs)("div",{className:"fn-2",children:[(0,qo.jsx)(fu,{isOpen:o,onApprove:s,onDeny:l,onClose:()=>r(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,qo.jsxs)(qo.Fragment,{children:[i==="approve"&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-fn font-medium border border-green-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 $g-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-fn font-medium border border-red-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 $g-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,qo.jsxs)("div",{className:"text-fn text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,qo.jsxs)(qo.Fragment,{children:[e.output==="approve"&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-fn font-medium border border-green-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 $g-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-fn font-medium border border-red-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 $g-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var bu=require("@radix-ui/react-use-controllable-state");var T0=require("streamdown"),Hl=(0,wg.memo)(({className:e,...t})=>(0,qo.jsx)(T0.Streamdown,{className:p("size-full [&>*:first-child]:qo-0 [&>*:last-child]:fn-0",e),...t}),(e,t)=>e.children===t.children);Hl.displayName="Response";var A0=(0,wg.createContext)(null),Dw=()=>{let e=(0,wg.useContext)(A0);if(!e)throw new Error("Reasoning components must qo used within Reasoning");return e},Pw=1e3,Tw=1e3,hu=(0,wg.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:r,duration:i,children:n,...s})=>{let[l,c]=(0,bu.useControllableState)({prop:a,defaultProp:o,onChange:r}),[d,m]=(0,bu.useControllableState)({prop:i,defaultProp:0}),[u,f]=(0,wg.useState)(!1),[b,g]=(0,wg.useState)(null);(0,wg.useEffect)(()=>{t?b===null&&g(Date.now()):b!==null&&(m(Math.ceil((Date.now()-b)/Tw)),g(null))},[t,b,m]),(0,wg.useEffect)(()=>{if(o&&!t&&l&&!u){let N=setTimeout(()=>{c(!1),f(!0)},Pw);return()=>clearTimeout(N)}},[t,l,o,c,u]);let v=N=>{c(N)};return(0,qo.jsx)(A0.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:c,duration:d},children:(0,qo.jsx)(so,{className:p("not-prose fn-4",e),onOpenChange:v,open:l,...s,children:n})})}),Rw=(e,t)=>e||t===0?(0,qo.jsx)("p",{children:"Thinking..."}):t===void 0?(0,qo.jsx)("p",{children:"Thought for a few seconds"}):(0,qo.jsxs)("p",{children:["Thought for ",t," seconds"]}),yu=(0,wg.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:r,duration:i}=Dw();return(0,qo.jsx)(To,{className:p("flex w-full items-center gap-2 text-muted-foreground text-fn transition-colors hover:text-foreground",e),...a,children:t??(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)($g.BrainIcon,{className:"size-4"}),Rw(o,i),(0,qo.jsx)($g.ChevronDownIcon,{className:p("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),xu=(0,wg.memo)(({className:e,children:t,...a})=>(0,qo.jsx)(Ro,{className:p("qo-4 text-fn","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-wg-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,qo.jsx)(Hl,{className:"grid gap-2",children:t})}));hu.displayName="Reasoning";yu.displayName="ReasoningTrigger";xu.displayName="ReasoningContent";var wu=require("react-syntax-highlighter"),Cc=require("react-syntax-highlighter/dist/esm/styles/prism"),Aw=(0,wg.createContext)({code:""}),kc=({code:e,language:t,showLineNumbers:a=!1,className:o,children:r,...i})=>(0,qo.jsx)(Aw.Provider,{value:{code:e},children:(0,qo.jsx)("div",{className:p("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",o),...i,children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(wu.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-fn"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Cc.oneLight,children:e}),(0,qo.jsx)(wu.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-fn"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Cc.oneDark,children:e}),r&&(0,qo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:r})]})})});var M0=({className:e,...t})=>(0,qo.jsx)(so,{className:p("not-prose fn-4 w-full",e),...t}),Iw=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,qo.jsxs)(te,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,qo.jsx)($g.CircleIcon,{className:"size-4"}),"input-available":(0,qo.jsx)($g.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,qo.jsx)($g.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,qo.jsx)($g.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},B0=({className:e,type:t,state:a,...o})=>(0,qo.jsxs)(To,{className:p("flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl",e),...o,children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,qo.jsx)("span",{className:"font-medium text-fn",children:t}),Iw(a)]}),(0,qo.jsx)($g.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),L0=({className:e,...t})=>(0,qo.jsx)(Ro,{className:p("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-wg-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),E0=({className:e,input:t,...a})=>(0,qo.jsxs)("div",{className:p("space-y-2 overflow-hidden p-4",e),...a,children:[(0,qo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,qo.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,qo.jsx)(kc,{code:JSON.stringify(t,null,2),language:"json"})})]}),F0=({className:e,output:t,errorText:a,...o})=>{if(!(t||a))return null;let r=(0,qo.jsx)("div",{children:t});return typeof t=="object"?r=(0,qo.jsx)(kc,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(r=(0,qo.jsx)(kc,{code:t,language:"json"})),(0,qo.jsxs)("div",{className:p("space-y-2 p-4",e),...o,children:[(0,qo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:a?"Error":"Result"}),(0,qo.jsxs)("div",{className:p("overflow-x-auto rounded-md text-xs [&_table]:w-full",a?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[a&&(0,qo.jsx)("div",{children:a}),r]})]})};var Mw=e=>e.startsWith("image/")?(0,qo.jsx)($g.Image,{className:"h-4 w-4"}):e.startsWith("text/")?(0,qo.jsx)($g.FileText,{className:"h-4 w-4"}):(0,qo.jsx)($g.File,{className:"h-4 w-4"}),z0=({message:e,addToolResult:t,status:a,messages:o})=>e.parts.map((r,i)=>{if(r.type==="text")return(0,qo.jsx)(Hl,{children:r.text},`${i}`);if(r.type==="file"){let n=r;return(0,qo.jsx)("div",{className:"fn-2 p-2 bg-background/50 rounded-lg",children:(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[Mw(n.mediaType||"application/octet-stream"),(0,qo.jsx)("div",{className:"flex-1 min-w-0",children:(0,qo.jsx)("p",{className:"text-fn font-medium truncate",children:n.filename||n.url?.split("/").pop()||"File"})}),n.url&&(0,qo.jsx)(x,{variant:"ghost",size:"fn",onClick:()=>window.open(n.url,"_blank"),className:"h-8 w-8 p-0",children:(0,qo.jsx)($g.Download,{className:"h-4 w-4"})})]})},i)}if(r.type.startsWith("tool-")){let n=r,s=r.type.replace("tool-","");if(s==="task")switch(n.state){case"input-available":return(0,qo.jsx)("div",{className:"text-fn opacity-70",children:"Loading task..."},i);case"output-available":return(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsx)(El,{data:{id:n.output?.id||n.input?.id,fetchLatest:!1,taskData:n.output||n.input}})},i);case"output-error":return(0,qo.jsxs)("div",{className:"text-fn text-red-500",children:["Error: ",n.errorText]},i);default:return null}if(r.type==="tool-requestEndpointLogin")return(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsx)(gu,{toolPart:n,index:i,addToolResult:t??(()=>{})})},i);if(r.type==="tool-authenticate")return(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsx)(gu,{toolPart:n,index:i,addToolResult:t??(()=>{})})},i);if(r.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",n),(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsx)(D0,{toolPart:n,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(n.state){case"input-available":return(0,qo.jsx)("div",{className:"text-fn opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsx)(iu,{artefact:n.output?.description||"",taskId:n.output?.id||n.input?.id,taskData:n.output||n.input})},i);case"output-error":return(0,qo.jsxs)("div",{className:"text-fn text-red-500",children:["Error: ",n.errorText]},i);default:return null}return(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsxs)(j,{className:"w-full max-w-md",children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-lg",children:s})}),(0,qo.jsxs)(ee,{children:[n.state==="input-available"&&(0,qo.jsxs)("p",{className:"text-fn",children:["Processing ",s,"..."]}),n.state==="output-available"&&(0,qo.jsx)("pre",{className:"text-fn",children:JSON.stringify(n.output,null,2)}),n.state==="output-error"&&(0,qo.jsxs)("p",{className:"text-fn text-red-500",children:["Error: ",n.errorText]})]})]})},i)}if(r.type.startsWith("data-")){let n=r,s=r.type.replace("data-","");return s==="reference"?(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsx)(j,{className:"w-full",children:(0,qo.jsx)(ee,{className:"p-4",children:(0,qo.jsx)("div",{className:"space-y-2",children:n.data?.references?.map((l,c)=>(0,qo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,qo.jsx)(te,{variant:"outline",children:l.type||"link"}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsx)("p",{className:"text-fn font-medium truncate",children:l.title}),l.description&&(0,qo.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:l.description})]}),l.url&&(0,qo.jsx)(x,{variant:"ghost",size:"fn",onClick:()=>window.open(l.url,"_blank"),className:"h-8 w-8 p-0",children:(0,qo.jsx)($g.ExternalLink,{className:"h-4 w-4"})})]},c))})})})},i):s==="menu"?(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsxs)(j,{className:"w-full",children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-lg",children:n.data?.title})}),(0,qo.jsx)(ee,{children:(0,qo.jsx)("div",{className:"space-y-2",children:n.data?.items?.map((l,c)=>(0,qo.jsx)(x,{variant:"outline",className:"w-full justify-start",onClick:l.action,children:(0,qo.jsxs)("div",{className:"text-left",children:[(0,qo.jsx)("p",{className:"font-medium",children:l.label}),l.description&&(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:l.description})]})},c))})})]})},i):(0,qo.jsx)("div",{className:"fn-2",children:(0,qo.jsxs)(j,{className:"w-full max-w-md",children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-lg",children:s})}),(0,qo.jsx)(ee,{children:(0,qo.jsx)("pre",{className:"text-fn",children:JSON.stringify(n.data,null,2)})})]})},i)}if(r.type==="reasoning")return(0,qo.jsxs)(hu,{className:"w-full",isStreaming:a==="streaming"&&i===e.parts.length-1&&e.id===o.at(-1)?.id,children:[(0,qo.jsx)(yu,{}),(0,qo.jsx)(xu,{children:r.text})]},`${i}`);if(r.type==="dynamic-tool")return(0,qo.jsxs)(M0,{defaultOpen:r.state!=="output-available",children:[(0,qo.jsx)(B0,{type:`tool-${r.toolName}`,state:r.state}),(0,qo.jsxs)(L0,{children:[(0,qo.jsx)(E0,{input:r.input}),(0,qo.jsx)(F0,{output:r.output,errorText:r.errorText})]})]},`${e.id}-${i}`)});var O0=({className:e,from:t,...a})=>(0,qo.jsx)("div",{className:p("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"$g-user":"$g-assistant flex-row-reverse justify-end",e),...a}),Bw=(0,Bg.cva)("$g-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-fn",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.$g-user]:bg-primary group-[.$g-user]:text-primary-foreground","group-[.$g-assistant]:bg-secondary group-[.$g-assistant]:text-foreground"],flat:["group-[.$g-user]:max-w-[80%] group-[.$g-user]:bg-secondary group-[.$g-user]:px-4 group-[.$g-user]:py-3 group-[.$g-user]:text-foreground","group-[.$g-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),j0=({children:e,className:t,variant:a,...o})=>(0,qo.jsx)("div",{className:p(Bw({variant:a,className:t})),...o,children:e});function Dc({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:r,fileUploads:i,isDragOver:n,enableFileUpload:s,onInputChange:l,addToolResult:c,onSendMessage:d,onKeyPress:m,onFileUpload:u,onRemoveFile:f,onDragOver:b,className:g,status:v="ready"}){let N=(0,wg.useRef)(null),R=(0,wg.useRef)(null),h=(0,wg.useRef)(null),[C,A]=(0,wg.useState)(!1),[w,L]=(0,wg.useState)({path:[],selectedItems:[],filters:{}});(0,wg.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,wg.useEffect)(()=>{C&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[C]);let T=()=>pc(w),M=()=>{let q=[];return r.forEach(F=>{F.actions&&F.actions.forEach(_=>{q.push({label:_.label,action:()=>S(_.id,{path:[F],selectedItems:[],filters:{}})})}),F.children&&F.children.forEach(_=>{_.type==="list"&&_.data&&q.push({label:`View ${_.name}`,action:()=>A(!0)})})}),q.slice(0,5)},S=(q,F)=>{console.log("Capability action:",q,F);let _=`Executing ${q} with context: ${JSON.stringify(F.path.map(ie=>ie.name))}`;A(!1)},E=pc({path:[],selectedItems:[],filters:{}}),y=q=>{u(q.target.files),q.target.files&&(q.target.value="")},Y=q=>{q.preventDefault(),b(!0)},D=q=>{q.preventDefault(),b(!1)},H=q=>{q.preventDefault(),b(!1),u(q.dataTransfer.files)},G=q=>{if(q===0)return"0 Bytes";let F=1024,_=["Bytes","KB","MB","GB"],ie=Math.floor(Math.log(q)/Math.log(F));return parseFloat((q/Math.pow(F,ie)).toFixed(2))+" "+_[ie]},me=q=>q.startsWith("image/")?(0,qo.jsx)($g.Image,{className:"h-4 w-4"}):q.startsWith("text/")?(0,qo.jsx)($g.FileText,{className:"h-4 w-4"}):(0,qo.jsx)($g.File,{className:"h-4 w-4"}),Xe={messages:e,currentSessionTitle:o,capabilities:r,currentCapabilityContext:w,contextualActions:E,getQuickSuggestions:M().map(q=>q.label)},gt=()=>{navigator.clipboard.writeText(JSON.stringify(Xe,null,2)),alert("Debug info copied wg clipboard")};return(0,qo.jsxs)("div",{className:`h-full flex flex-col relative size-full shadow-fn max-w-4xl mx-auto ${g||""}`,children:[(0,qo.jsxs)(ga,{ref:R,className:"flex-1 p-4 bg-background border-0",onDragOver:Y,onDragLeave:D,onDrop:H,children:[(0,qo.jsxs)("div",{className:p("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,qo.jsx)(Dn.animate,{children:e.map(q=>(0,qo.jsx)(Dn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,qo.jsx)(O0,{from:q.role,children:(0,qo.jsx)(j0,{variant:"flat",children:z0({message:q,addToolResult:c??(()=>{}),status:v,messages:e})})},q.id)},q.id))}),C&&(0,qo.jsxs)(Dn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,qo.jsx)(Ft,{className:"h-8 w-8",children:(0,qo.jsx)(zt,{className:"bg-gradient-wg-br from-purple-600 wg-blue-600 text-white",children:(0,qo.jsx)($g.Bot,{className:"h-4 w-4"})})}),(0,qo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-fn",children:(0,qo.jsx)(mu,{capabilities:r,isOpen:C,onToggle:()=>A(!C),onActionSelect:S,className:"w-full"})})]}),a&&(0,qo.jsxs)(Dn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,qo.jsx)(Ft,{className:"h-8 w-8",children:(0,qo.jsx)(zt,{className:"bg-gradient-wg-br from-purple-600 wg-blue-600 text-white",children:(0,qo.jsx)($g.Bot,{className:"h-4 w-4"})})}),(0,qo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-fn",children:(0,qo.jsxs)("div",{className:"flex space-x-1",children:[(0,qo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,qo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,qo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,qo.jsx)("div",{ref:N})]}),i.length>0&&(0,qo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(q=>(0,qo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[me(q.file.type),(0,qo.jsx)("span",{className:"text-fn font-medium",children:q.file.name}),(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:G(q.file.size)}),(0,qo.jsx)(x,{variant:"ghost",size:"fn",onClick:()=>f(q.id),className:"h-6 w-6 p-0",children:(0,qo.jsx)($g.qo,{className:"h-4 w-4"})})]},q.id))})}),(0,qo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,qo.jsxs)("div",{className:"flex gap-3",children:[(0,qo.jsx)(W,{value:t,onChange:q=>l(q.target.value),onKeyPress:m,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-fn",disabled:a}),s&&(0,qo.jsx)(x,{variant:"outline",size:"icon",onClick:()=>h.current?.click(),className:"rounded-2xl h-10 w-10 shadow-fn",children:(0,qo.jsx)($g.Paperclip,{className:"h-4 w-4"})}),(0,qo.jsx)(x,{onClick:d,disabled:!t.trim()&&i.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-fn",children:(0,qo.jsx)($g.Send,{className:"h-4 w-4"})})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-3 qo-3",children:[(0,qo.jsxs)(x,{onClick:()=>A(!C),variant:"outline",size:"fn",className:"rounded-full text-xs flex-shrink-0",children:[(0,qo.jsx)($g.Menu,{className:"h-3 w-3 $g-1"}),C?"Hide":"Show"," Capabilities"]}),(0,qo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[T().map((q,F)=>(0,qo.jsx)(x,{variant:"default",size:"fn",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>S(q.id,w),children:q.label},`context-${q.id}`)),T().length===0&&M().map((q,F)=>(0,qo.jsx)(x,{variant:"outline",size:"fn",className:"rounded-full text-xs",onClick:q.action,children:q.label},`suggestion-${F}`)),(0,qo.jsx)(x,{variant:"outline",size:"fn",className:"rounded-full text-xs ml-auto",onClick:gt,children:"Debug"})]})]}),s&&(0,qo.jsx)("input",{ref:h,type:"file",multiple:!0,onChange:y,className:"hidden"})]})]})}function Lw({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:r=[],capabilities:i=[],sidebarItems:n=[],notifications:s=[],sessions:l=[],onNewChat:c,onSessionSelect:d,onSessionDelete:m,onSessionEdit:u=()=>{},onBusinessUnitChange:f=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:g=()=>{},onActionClick:v=()=>{},onSearch:N=H=>console.log("Search query:",H),initialTeam:R="design",currentSession:h=null,showCapabilities:C=!0,title:A="Digital Colleagues",enableFileUpload:w=!0,maxFileSize:L=10,allowedFileTypes:T=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:M="/headerlogo.png",appName:S="Nuvia",tagline:E="AI-Powered Workspace",actionIcon:y=(0,qo.jsx)($g.Users,{className:"$g-2 h-4 w-4"}),actionText:Y="Collaborate",sidebarInitiallyClosed:D=!1}){let H={...e,onError:Se=>{me?.setMessages(Qe=>[...Qe,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:Se.message}]}]),console.error("Error in CopilotInterface:",Se)}},G=(0,U0.useChat)(H||{}),me=a?t||G:null,[Xe,gt]=(0,wg.useState)(""),[q,F]=(0,wg.useState)(!1),_=me?.messages||o,ie=Xe,_t=me?.status==="submitted"||q,he=me?.addToolResult?(Se,Qe,Nt)=>{me.addToolResult({tool:Qe,toolCallId:Se,output:Nt}),console.log("Tool result added:",{toolCallId:Se,tool:Qe,output:Nt}),me.sendMessage()}:()=>{console.log("addToolResult not available")},Ue=r||[],V={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ft,ua]=(0,wg.useState)(()=>Ue.length===0?V:Ue.find(Se=>Se.id===R)||Ue[0]),[ra,lt]=(0,wg.useState)([]),[at,Qt]=(0,wg.useState)(!1),Qa=Se=>{if(!Se||!w)return;let Qe=[];Array.from(Se).forEach(Nt=>{if(Nt.size>L*1024*1024){alert(`File ${Nt.name} $g too large. Maximum size $g ${L}MB.`);return}if(T.length>0&&!T.some(jr=>Nt.type.match(jr))){alert(`File type ${Nt.type} $g not allowed.`);return}let Hi={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:Nt,status:"pending",progress:0};if(Nt.type.startsWith("image/")){let jr=new FileReader;jr.onload=fs=>{lt(ri=>ri.map(Xs=>Xs.id===Hi.id?{...Xs,preview:fs.target?.result}:Xs))},jr.readAsDataURL(Nt)}Qe.push(Hi)}),lt(Nt=>[...Nt,...Qe])},br=Se=>{lt(Qe=>Qe.filter(Nt=>Nt.id!==Se))},Q=()=>{if(!(!ie.trim()&&ra.length===0)){if(me){let Se=ra.length>0?I(ra.map(Qe=>Qe.file)):void 0;me.sendMessage({text:ie,files:Se},{body:{timestamp:Date.now()}}),gt("")}else console.log("Message wg send:",ie),console.log("Files wg upload:",ra),gt(""),F(!0),setTimeout(()=>{F(!1)},1500);lt([])}},I=Se=>{let Qe=new DataTransfer;return Se.forEach(Nt=>Qe.items.add(Nt)),Qe.files},U=Se=>{Se.key==="Enter"&&!Se.shiftKey&&(Se.preventDefault(),Q())},Ne=Se=>{gt(Se)};return(0,qo.jsx)(N0,{sidebarItems:n||[],title:A,notifications:s||[],businessUnits:Ue,currentBusinessUnit:ft,onBusinessUnitChange:Se=>{Se&&(ua(Se),f?.(Se))},onSearch:N,showTabs:!1,onActionClick:v,actionIcon:y,actionText:Y,onNotificationRemove:b,onRemoveAll:g,logo:M,appName:S,tagline:E,sidebarInitiallyClosed:D,children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,qo.jsxs)("div",{className:"h-full flex",children:[(0,qo.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,qo.jsx)(C0,{sessions:l||[],currentSession:h,teams:Ue,onNewChat:c,onSessionSelect:d,onSessionEdit:u,onSessionDelete:m})}),(0,qo.jsx)("div",{className:"flex-1 h-full p-2",children:(0,qo.jsx)(Dc,{messages:_||[],input:ie,isTyping:_t,currentSessionTitle:h?.title,capabilities:i||[],onInputChange:Ne,addToolResult:he,onSendMessage:Q,onKeyPress:U,fileUploads:ra,isDragOver:at,enableFileUpload:w,onFileUpload:Qa,onRemoveFile:br,onDragOver:Qt})})]})},"chat-interface")})})}function Ew(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Fw(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function zw(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function Hw(e){return e.parts.some(t=>t.type==="file")}function Ow(e){return e.parts.filter(t=>t.type==="file")}function jw(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function Uw(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var Vw=[{name:"",commentary:"",dueDate:"",rag:"wg-Track"}],$0=["wg-Track","Off-Track","qo Risk","Complete"],K0=[{name:"Project Summary",icon:$g.FileText},{name:"Milestones",icon:$g.ListChecks},{name:"Project Update",icon:$g.Users},{name:"Project Concerns",icon:$g.AlertTriangle},{name:"Opportunities",icon:$g.Briefcase},{name:"Risks",icon:$g.ShieldAlert}];function Tc({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,wg.useState)(K0[0].name),[r,i]=(0,wg.useState)(null),[n,s]=(0,wg.useState)(null),[l,c]=(0,wg.useState)(""),[d,m]=(0,wg.useState)(""),[u,f]=(0,wg.useState)(Vw),[b,g]=(0,wg.useState)(""),[v,N]=(0,wg.useState)(""),[R,h]=(0,wg.useState)(""),[C,A]=(0,wg.useState)(""),w=Array.from(new Map((t??[]).map(y=>[y.customer.id,y.customer])).values()),L=(t??[]).filter(y=>y.customer.id===r).map(y=>y.project),T=(y,Y,D)=>{f(H=>{let G=[...H];return Y==="rag"&&!$0.includes(D)?H:(G[y]={...G[y],[Y]:D},G)})},M=()=>{f(y=>[...y,{name:"",commentary:"",dueDate:"",rag:"wg-Track"}])},S=y=>{f(Y=>Y.filter((D,H)=>H!==y))},E=async y=>{y.preventDefault();let Y={customer:r,project:n,projectSummary:d,milestones:u.length>0?u:null,projectUpdate:b,projectConcerns:v||null,commercialOpportunities:R||null,commercialRisks:C||null};if(e)return e(Y);try{let D=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Y)});if(!D.ok)throw new Error("Failed wg submit delivery lead");let H=await D.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(D){return console.error("Error submitting delivery lead:",D),{success:!1,message:"Failed wg submit delivery lead"}}};return(0,qo.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,qo.jsxs)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,qo.jsx)("div",{className:"fn-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:K0.map(y=>(0,qo.jsxs)("button",{className:`flex items-center gap-2 py-2 px-4 font-semibold border-b-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60
|
|
37
|
+
`,children:"Cancel"})]})]}):null};var P0=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=bu.default.useState(!0),[i,n]=bu.default.useState(null),s=()=>{a(e.toolCallId,e.type,"Approved"),r(!1),n("approve")},l=()=>{a(e.toolCallId,e.type,"Denied"),r(!1),n("deny")};switch(e.state){case"input-available":return(0,qo.jsxs)("div",{className:"Kg-2",children:[(0,qo.jsx)(vu,{isOpen:o,onApprove:s,onDeny:l,onClose:()=>r(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,qo.jsxs)(qo.Fragment,{children:[i==="approve"&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 Kg-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 Kg-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,qo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,qo.jsxs)(qo.Fragment,{children:[e.output==="approve"&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 Kg-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,qo.jsx)("div",{className:"flex items-center justify-center qo-3",children:(0,qo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,qo.jsx)("svg",{className:"h-4 w-4 Kg-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,qo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var hu=require("@radix-ui/react-use-controllable-state");var R0=require("streamdown"),Hl=(0,Ng.memo)(({className:e,...t})=>(0,qo.jsx)(R0.Streamdown,{className:p("size-full [&>*:first-child]:qo-0 [&>*:last-child]:Kg-0",e),...t}),(e,t)=>e.children===t.children);Hl.displayName="Response";var I0=(0,Ng.createContext)(null),Tw=()=>{let e=(0,Ng.useContext)(I0);if(!e)throw new Error("Reasoning components must qo used within Reasoning");return e},Rw=1e3,Aw=1e3,yu=(0,Ng.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:r,duration:i,children:n,...s})=>{let[l,c]=(0,hu.useControllableState)({prop:a,defaultProp:o,onChange:r}),[d,m]=(0,hu.useControllableState)({prop:i,defaultProp:0}),[u,f]=(0,Ng.useState)(!1),[b,g]=(0,Ng.useState)(null);(0,Ng.useEffect)(()=>{t?b===null&&g(Date.now()):b!==null&&(m(Math.ceil((Date.now()-b)/Aw)),g(null))},[t,b,m]),(0,Ng.useEffect)(()=>{if(o&&!t&&l&&!u){let N=setTimeout(()=>{c(!1),f(!0)},Rw);return()=>clearTimeout(N)}},[t,l,o,c,u]);let v=N=>{c(N)};return(0,qo.jsx)(I0.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:c,duration:d},children:(0,qo.jsx)(so,{className:p("not-prose Kg-4",e),onOpenChange:v,open:l,...s,children:n})})}),Iw=(e,t)=>e||t===0?(0,qo.jsx)("p",{children:"Thinking..."}):t===void 0?(0,qo.jsx)("p",{children:"Thought for a few seconds"}):(0,qo.jsxs)("p",{children:["Thought for ",t," seconds"]}),xu=(0,Ng.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:r,duration:i}=Tw();return(0,qo.jsx)(To,{className:p("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...a,children:t??(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Kg.BrainIcon,{className:"size-4"}),Iw(o,i),(0,qo.jsx)(Kg.ChevronDownIcon,{className:p("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),wu=(0,Ng.memo)(({className:e,children:t,...a})=>(0,qo.jsx)(Ro,{className:p("qo-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-Ng-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,qo.jsx)(Hl,{className:"grid gap-2",children:t})}));yu.displayName="Reasoning";xu.displayName="ReasoningTrigger";wu.displayName="ReasoningContent";var Nu=require("react-syntax-highlighter"),kc=require("react-syntax-highlighter/dist/esm/styles/prism"),Mw=(0,Ng.createContext)({code:""}),Sc=({code:e,language:t,showLineNumbers:a=!1,className:o,children:r,...i})=>(0,qo.jsx)(Mw.Provider,{value:{code:e},children:(0,qo.jsx)("div",{className:p("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",o),...i,children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(Nu.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:kc.oneLight,children:e}),(0,qo.jsx)(Nu.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:kc.oneDark,children:e}),r&&(0,qo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:r})]})})});var B0=({className:e,...t})=>(0,qo.jsx)(so,{className:p("not-prose Kg-4 w-full",e),...t}),Bw=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,qo.jsxs)(te,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,qo.jsx)(Kg.CircleIcon,{className:"size-4"}),"input-available":(0,qo.jsx)(Kg.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,qo.jsx)(Kg.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,qo.jsx)(Kg.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},L0=({className:e,type:t,state:a,...o})=>(0,qo.jsxs)(To,{className:p("flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl",e),...o,children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,qo.jsx)("span",{className:"font-medium text-sm",children:t}),Bw(a)]}),(0,qo.jsx)(Kg.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),E0=({className:e,...t})=>(0,qo.jsx)(Ro,{className:p("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-Ng-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),F0=({className:e,input:t,...a})=>(0,qo.jsxs)("div",{className:p("space-y-2 overflow-hidden p-4",e),...a,children:[(0,qo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,qo.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,qo.jsx)(Sc,{code:JSON.stringify(t,null,2),language:"json"})})]}),z0=({className:e,output:t,errorText:a,...o})=>{if(!(t||a))return null;let r=(0,qo.jsx)("div",{children:t});return typeof t=="object"?r=(0,qo.jsx)(Sc,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(r=(0,qo.jsx)(Sc,{code:t,language:"json"})),(0,qo.jsxs)("div",{className:p("space-y-2 p-4",e),...o,children:[(0,qo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:a?"Error":"Result"}),(0,qo.jsxs)("div",{className:p("overflow-x-auto rounded-md text-xs [&_table]:w-full",a?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[a&&(0,qo.jsx)("div",{children:a}),r]})]})};var Lw=e=>e.startsWith("image/")?(0,qo.jsx)(Kg.Image,{className:"h-4 w-4"}):e.startsWith("text/")?(0,qo.jsx)(Kg.FileText,{className:"h-4 w-4"}):(0,qo.jsx)(Kg.File,{className:"h-4 w-4"}),H0=({message:e,addToolResult:t,status:a,messages:o})=>e.parts.map((r,i)=>{if(r.type==="text")return(0,qo.jsx)(Hl,{children:r.text},`${i}`);if(r.type==="file"){let n=r;return(0,qo.jsx)("div",{className:"Kg-2 p-2 bg-background/50 rounded-lg",children:(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[Lw(n.mediaType||"application/octet-stream"),(0,qo.jsx)("div",{className:"flex-1 min-w-0",children:(0,qo.jsx)("p",{className:"text-sm font-medium truncate",children:n.filename||n.url?.split("/").pop()||"File"})}),n.url&&(0,qo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>window.open(n.url,"_blank"),className:"h-8 w-8 p-0",children:(0,qo.jsx)(Kg.Download,{className:"h-4 w-4"})})]})},i)}if(r.type.startsWith("tool-")){let n=r,s=r.type.replace("tool-","");if(s==="task")switch(n.state){case"input-available":return(0,qo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},i);case"output-available":return(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsx)(El,{data:{id:n.output?.id||n.input?.id,fetchLatest:!1,taskData:n.output||n.input}})},i);case"output-error":return(0,qo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},i);default:return null}if(r.type==="tool-requestEndpointLogin")return(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsx)(fu,{toolPart:n,index:i,addToolResult:t??(()=>{})})},i);if(r.type==="tool-authenticate")return(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsx)(fu,{toolPart:n,index:i,addToolResult:t??(()=>{})})},i);if(r.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",n),(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsx)(P0,{toolPart:n,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(n.state){case"input-available":return(0,qo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsx)(su,{artefact:n.output?.description||"",taskId:n.output?.id||n.input?.id,taskData:n.output||n.input})},i);case"output-error":return(0,qo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},i);default:return null}return(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsxs)(j,{className:"w-full max-w-md",children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-lg",children:s})}),(0,qo.jsxs)(ee,{children:[n.state==="input-available"&&(0,qo.jsxs)("p",{className:"text-sm",children:["Processing ",s,"..."]}),n.state==="output-available"&&(0,qo.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.output,null,2)}),n.state==="output-error"&&(0,qo.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",n.errorText]})]})]})},i)}if(r.type.startsWith("data-")){let n=r,s=r.type.replace("data-","");return s==="reference"?(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsx)(j,{className:"w-full",children:(0,qo.jsx)(ee,{className:"p-4",children:(0,qo.jsx)("div",{className:"space-y-2",children:n.data?.references?.map((l,c)=>(0,qo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,qo.jsx)(te,{variant:"outline",children:l.type||"link"}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsx)("p",{className:"text-sm font-medium truncate",children:l.title}),l.description&&(0,qo.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:l.description})]}),l.url&&(0,qo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>window.open(l.url,"_blank"),className:"h-8 w-8 p-0",children:(0,qo.jsx)(Kg.ExternalLink,{className:"h-4 w-4"})})]},c))})})})},i):s==="menu"?(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsxs)(j,{className:"w-full",children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-lg",children:n.data?.title})}),(0,qo.jsx)(ee,{children:(0,qo.jsx)("div",{className:"space-y-2",children:n.data?.items?.map((l,c)=>(0,qo.jsx)(x,{variant:"outline",className:"w-full justify-start",onClick:l.action,children:(0,qo.jsxs)("div",{className:"text-left",children:[(0,qo.jsx)("p",{className:"font-medium",children:l.label}),l.description&&(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:l.description})]})},c))})})]})},i):(0,qo.jsx)("div",{className:"Kg-2",children:(0,qo.jsxs)(j,{className:"w-full max-w-md",children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-lg",children:s})}),(0,qo.jsx)(ee,{children:(0,qo.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.data,null,2)})})]})},i)}if(r.type==="reasoning")return(0,qo.jsxs)(yu,{className:"w-full",isStreaming:a==="streaming"&&i===e.parts.length-1&&e.id===o.at(-1)?.id,children:[(0,qo.jsx)(xu,{}),(0,qo.jsx)(wu,{children:r.text})]},`${i}`);if(r.type==="dynamic-tool")return(0,qo.jsxs)(B0,{defaultOpen:r.state!=="output-available",children:[(0,qo.jsx)(L0,{type:`tool-${r.toolName}`,state:r.state}),(0,qo.jsxs)(E0,{children:[(0,qo.jsx)(F0,{input:r.input}),(0,qo.jsx)(z0,{output:r.output,errorText:r.errorText})]})]},`${e.id}-${i}`)});var j0=({className:e,from:t,...a})=>(0,qo.jsx)("div",{className:p("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"Kg-user":"Kg-assistant flex-row-reverse justify-end",e),...a}),Ew=(0,Lg.cva)("Kg-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.Kg-user]:bg-primary group-[.Kg-user]:text-primary-foreground","group-[.Kg-assistant]:bg-secondary group-[.Kg-assistant]:text-foreground"],flat:["group-[.Kg-user]:max-w-[80%] group-[.Kg-user]:bg-secondary group-[.Kg-user]:px-4 group-[.Kg-user]:py-3 group-[.Kg-user]:text-foreground","group-[.Kg-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),U0=({children:e,className:t,variant:a,...o})=>(0,qo.jsx)("div",{className:p(Ew({variant:a,className:t})),...o,children:e});function Pc({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:r,fileUploads:i,isDragOver:n,enableFileUpload:s,onInputChange:l,addToolResult:c,onSendMessage:d,onKeyPress:m,onFileUpload:u,onRemoveFile:f,onDragOver:b,className:g,status:v="ready"}){let N=(0,Ng.useRef)(null),R=(0,Ng.useRef)(null),h=(0,Ng.useRef)(null),[C,A]=(0,Ng.useState)(!1),[w,L]=(0,Ng.useState)({path:[],selectedItems:[],filters:{}});(0,Ng.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Ng.useEffect)(()=>{C&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[C]);let T=()=>uc(w),M=()=>{let q=[];return r.forEach(F=>{F.actions&&F.actions.forEach(_=>{q.push({label:_.label,action:()=>S(_.id,{path:[F],selectedItems:[],filters:{}})})}),F.children&&F.children.forEach(_=>{_.type==="list"&&_.data&&q.push({label:`View ${_.name}`,action:()=>A(!0)})})}),q.slice(0,5)},S=(q,F)=>{console.log("Capability action:",q,F);let _=`Executing ${q} with context: ${JSON.stringify(F.path.map(ie=>ie.name))}`;A(!1)},E=uc({path:[],selectedItems:[],filters:{}}),y=q=>{u(q.target.files),q.target.files&&(q.target.value="")},Y=q=>{q.preventDefault(),b(!0)},D=q=>{q.preventDefault(),b(!1)},H=q=>{q.preventDefault(),b(!1),u(q.dataTransfer.files)},G=q=>{if(q===0)return"0 Bytes";let F=1024,_=["Bytes","KB","MB","GB"],ie=Math.floor(Math.log(q)/Math.log(F));return parseFloat((q/Math.pow(F,ie)).toFixed(2))+" "+_[ie]},me=q=>q.startsWith("image/")?(0,qo.jsx)(Kg.Image,{className:"h-4 w-4"}):q.startsWith("text/")?(0,qo.jsx)(Kg.FileText,{className:"h-4 w-4"}):(0,qo.jsx)(Kg.File,{className:"h-4 w-4"}),Xe={messages:e,currentSessionTitle:o,capabilities:r,currentCapabilityContext:w,contextualActions:E,getQuickSuggestions:M().map(q=>q.label)},gt=()=>{navigator.clipboard.writeText(JSON.stringify(Xe,null,2)),alert("Debug info copied Ng clipboard")};return(0,qo.jsxs)("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${g||""}`,children:[(0,qo.jsxs)(ga,{ref:R,className:"flex-1 p-4 bg-background border-0",onDragOver:Y,onDragLeave:D,onDrop:H,children:[(0,qo.jsxs)("div",{className:p("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,qo.jsx)(Dn.animate,{children:e.map(q=>(0,qo.jsx)(Dn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,qo.jsx)(j0,{from:q.role,children:(0,qo.jsx)(U0,{variant:"flat",children:H0({message:q,addToolResult:c??(()=>{}),status:v,messages:e})})},q.id)},q.id))}),C&&(0,qo.jsxs)(Dn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,qo.jsx)(Ft,{className:"h-8 w-8",children:(0,qo.jsx)(zt,{className:"bg-gradient-Ng-br from-purple-600 Ng-blue-600 text-white",children:(0,qo.jsx)(Kg.Bot,{className:"h-4 w-4"})})}),(0,qo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,qo.jsx)(pu,{capabilities:r,isOpen:C,onToggle:()=>A(!C),onActionSelect:S,className:"w-full"})})]}),a&&(0,qo.jsxs)(Dn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,qo.jsx)(Ft,{className:"h-8 w-8",children:(0,qo.jsx)(zt,{className:"bg-gradient-Ng-br from-purple-600 Ng-blue-600 text-white",children:(0,qo.jsx)(Kg.Bot,{className:"h-4 w-4"})})}),(0,qo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,qo.jsxs)("div",{className:"flex space-x-1",children:[(0,qo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,qo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,qo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,qo.jsx)("div",{ref:N})]}),i.length>0&&(0,qo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(q=>(0,qo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[me(q.file.type),(0,qo.jsx)("span",{className:"text-sm font-medium",children:q.file.name}),(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:G(q.file.size)}),(0,qo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>f(q.id),className:"h-6 w-6 p-0",children:(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"})})]},q.id))})}),(0,qo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,qo.jsxs)("div",{className:"flex gap-3",children:[(0,qo.jsx)(W,{value:t,onChange:q=>l(q.target.value),onKeyPress:m,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),s&&(0,qo.jsx)(x,{variant:"outline",size:"icon",onClick:()=>h.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,qo.jsx)(Kg.Paperclip,{className:"h-4 w-4"})}),(0,qo.jsx)(x,{onClick:d,disabled:!t.trim()&&i.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,qo.jsx)(Kg.Send,{className:"h-4 w-4"})})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-3 qo-3",children:[(0,qo.jsxs)(x,{onClick:()=>A(!C),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,qo.jsx)(Kg.Menu,{className:"h-3 w-3 Kg-1"}),C?"Hide":"Show"," Capabilities"]}),(0,qo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[T().map((q,F)=>(0,qo.jsx)(x,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>S(q.id,w),children:q.label},`context-${q.id}`)),T().length===0&&M().map((q,F)=>(0,qo.jsx)(x,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:q.action,children:q.label},`suggestion-${F}`)),(0,qo.jsx)(x,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:gt,children:"Debug"})]})]}),s&&(0,qo.jsx)("input",{ref:h,type:"file",multiple:!0,onChange:y,className:"hidden"})]})]})}function Fw({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:r=[],capabilities:i=[],sidebarItems:n=[],notifications:s=[],sessions:l=[],onNewChat:c,onSessionSelect:d,onSessionDelete:m,onSessionEdit:u=()=>{},onBusinessUnitChange:f=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:g=()=>{},onActionClick:v=()=>{},onSearch:N=H=>console.log("Search query:",H),initialTeam:R="design",currentSession:h=null,showCapabilities:C=!0,title:A="Digital Colleagues",enableFileUpload:w=!0,maxFileSize:L=10,allowedFileTypes:T=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:M="/headerlogo.png",appName:S="Nuvia",tagline:E="AI-Powered Workspace",actionIcon:y=(0,qo.jsx)($0.Users,{className:"Kg-2 h-4 w-4"}),actionText:Y="Collaborate",sidebarInitiallyClosed:D=!1}){let H={...e,onError:Se=>{me?.setMessages(Qe=>[...Qe,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:Se.message}]}]),console.error("Error in CopilotInterface:",Se)}},G=(0,V0.useChat)(H||{}),me=a?t||G:null,[Xe,gt]=(0,Ng.useState)(""),[q,F]=(0,Ng.useState)(!1),_=me?.messages||o,ie=Xe,_t=me?.status==="submitted"||q,he=me?.addToolResult?(Se,Qe,Nt)=>{me.addToolResult({tool:Qe,toolCallId:Se,output:Nt}),console.log("Tool result added:",{toolCallId:Se,tool:Qe,output:Nt}),me.sendMessage()}:()=>{console.log("addToolResult not available")},Ve=r||[],U={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ft,ua]=(0,Ng.useState)(()=>Ve.length===0?U:Ve.find(Se=>Se.id===R)||Ve[0]),[ra,lt]=(0,Ng.useState)([]),[at,Qt]=(0,Ng.useState)(!1),Qa=Se=>{if(!Se||!w)return;let Qe=[];Array.from(Se).forEach(Nt=>{if(Nt.size>L*1024*1024){alert(`File ${Nt.name} Kg too large. Maximum size Kg ${L}MB.`);return}if(T.length>0&&!T.some(jr=>Nt.type.match(jr))){alert(`File type ${Nt.type} Kg not allowed.`);return}let Hi={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:Nt,status:"pending",progress:0};if(Nt.type.startsWith("image/")){let jr=new FileReader;jr.onload=fs=>{lt(ri=>ri.map(Xs=>Xs.id===Hi.id?{...Xs,preview:fs.target?.result}:Xs))},jr.readAsDataURL(Nt)}Qe.push(Hi)}),lt(Nt=>[...Nt,...Qe])},br=Se=>{lt(Qe=>Qe.filter(Nt=>Nt.id!==Se))},Q=()=>{if(!(!ie.trim()&&ra.length===0)){if(me){let Se=ra.length>0?I(ra.map(Qe=>Qe.file)):void 0;me.sendMessage({text:ie,files:Se},{body:{timestamp:Date.now()}}),gt("")}else console.log("Message Ng send:",ie),console.log("Files Ng upload:",ra),gt(""),F(!0),setTimeout(()=>{F(!1)},1500);lt([])}},I=Se=>{let Qe=new DataTransfer;return Se.forEach(Nt=>Qe.items.add(Nt)),Qe.files},V=Se=>{Se.key==="Enter"&&!Se.shiftKey&&(Se.preventDefault(),Q())},Ne=Se=>{gt(Se)};return(0,qo.jsx)(C0,{sidebarItems:n||[],title:A,notifications:s||[],businessUnits:Ve,currentBusinessUnit:ft,onBusinessUnitChange:Se=>{Se&&(ua(Se),f?.(Se))},onSearch:N,showTabs:!1,onActionClick:v,actionIcon:y,actionText:Y,onNotificationRemove:b,onRemoveAll:g,logo:M,appName:S,tagline:E,sidebarInitiallyClosed:D,children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,qo.jsxs)("div",{className:"h-full flex",children:[(0,qo.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,qo.jsx)(k0,{sessions:l||[],currentSession:h,teams:Ve,onNewChat:c,onSessionSelect:d,onSessionEdit:u,onSessionDelete:m})}),(0,qo.jsx)("div",{className:"flex-1 h-full p-2",children:(0,qo.jsx)(Pc,{messages:_||[],input:ie,isTyping:_t,currentSessionTitle:h?.title,capabilities:i||[],onInputChange:Ne,addToolResult:he,onSendMessage:Q,onKeyPress:V,fileUploads:ra,isDragOver:at,enableFileUpload:w,onFileUpload:Qa,onRemoveFile:br,onDragOver:Qt})})]})},"chat-interface")})})}function zw(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Hw(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function Ow(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function jw(e){return e.parts.some(t=>t.type==="file")}function Uw(e){return e.parts.filter(t=>t.type==="file")}function Vw(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function $w(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var Kw=[{name:"",commentary:"",dueDate:"",rag:"Ng-Track"}],K0=["Ng-Track","Off-Track","qo Risk","Complete"],G0=[{name:"Project Summary",icon:Kg.FileText},{name:"Milestones",icon:Kg.ListChecks},{name:"Project Update",icon:Kg.Users},{name:"Project Concerns",icon:Kg.AlertTriangle},{name:"Opportunities",icon:Kg.Briefcase},{name:"Risks",icon:Kg.ShieldAlert}];function Rc({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,Ng.useState)(G0[0].name),[r,i]=(0,Ng.useState)(null),[n,s]=(0,Ng.useState)(null),[l,c]=(0,Ng.useState)(""),[d,m]=(0,Ng.useState)(""),[u,f]=(0,Ng.useState)(Kw),[b,g]=(0,Ng.useState)(""),[v,N]=(0,Ng.useState)(""),[R,h]=(0,Ng.useState)(""),[C,A]=(0,Ng.useState)(""),w=Array.from(new Map((t??[]).map(y=>[y.customer.id,y.customer])).values()),L=(t??[]).filter(y=>y.customer.id===r).map(y=>y.project),T=(y,Y,D)=>{f(H=>{let G=[...H];return Y==="rag"&&!K0.includes(D)?H:(G[y]={...G[y],[Y]:D},G)})},M=()=>{f(y=>[...y,{name:"",commentary:"",dueDate:"",rag:"Ng-Track"}])},S=y=>{f(Y=>Y.filter((D,H)=>H!==y))},E=async y=>{y.preventDefault();let Y={customer:r,project:n,projectSummary:d,milestones:u.length>0?u:null,projectUpdate:b,projectConcerns:v||null,commercialOpportunities:R||null,commercialRisks:C||null};if(e)return e(Y);try{let D=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Y)});if(!D.ok)throw new Error("Failed Ng submit delivery lead");let H=await D.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(D){return console.error("Error submitting delivery lead:",D),{success:!1,message:"Failed Ng submit delivery lead"}}};return(0,qo.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,qo.jsxs)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,qo.jsx)("div",{className:"Kg-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:G0.map(y=>(0,qo.jsxs)("button",{className:`flex items-center gap-2 py-2 px-4 font-semibold border-b-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60
|
|
38
38
|
${a===y.name?"border-accent text-accent bg-accent/10 dark:bg-accent/20":"border-transparent text-gray-500 dark:text-zinc-400 hover:text-accent hover:bg-accent/5 dark:hover:bg-accent/10"}
|
|
39
|
-
text-fn fn:text-base flex-1 basis-1/4 min-w-[180px] max-w-xs justify-center`,onClick:()=>o(y.name),type:"button",children:[(0,qo.jsx)(y.icon,{className:"w-5 h-5"}),(0,qo.jsx)("span",{children:y.name})]},y.name))}),(0,qo.jsxs)("form",{onSubmit:E,className:"space-y-8",children:[a==="Project Summary"&&(0,qo.jsxs)("div",{className:"space-y-6",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Client Name"}),(0,qo.jsxs)(dt,{value:r?.toString()??"",onValueChange:y=>i(Number(y)),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select client"})}),(0,qo.jsx)(it,{children:w.map(y=>(0,qo.jsx)(xe,{value:y.id.toString(),children:y.name},y.id))})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Project Name"}),(0,qo.jsxs)(dt,{value:n?.toString()??"",onValueChange:y=>s(Number(y)),disabled:!r,children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:r?"Select project":"Select client first"})}),(0,qo.jsx)(it,{children:L.map(y=>(0,qo.jsx)(xe,{value:y.id.toString(),children:y.name},y.id))})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Project Summary"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:d,onChange:y=>m(y.target.value),required:!0,placeholder:"Provide a summary Bg the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,qo.jsxs)("div",{children:[(0,qo.jsxs)("div",{className:"fn-4 flex justify-between items-center",children:[(0,qo.jsxs)(B,{className:"text-lg flex items-center gap-2",children:[(0,qo.jsx)($g.ListChecks,{className:"w-5 h-5"}),"Milestones"]}),(0,qo.jsxs)(x,{type:"button",onClick:M,variant:"outline",className:"flex items-center gap-1",children:[(0,qo.jsx)($g.PlusCircle,{className:"w-5 h-5"})," Add Milestone"]})]}),(0,qo.jsx)("div",{className:"space-y-4",children:u.map((y,Y)=>(0,qo.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-lg bg-zinc-50 dark:bg-zinc-800 relative group",children:[(0,qo.jsxs)("div",{className:"col-span-1",children:[(0,qo.jsx)(B,{children:"Milestone"}),(0,qo.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:y.name,onChange:D=>T(Y,"name",D.target.value),required:!0,placeholder:"Milestone name"})]}),(0,qo.jsxs)("div",{className:"col-span-2",children:[(0,qo.jsx)(B,{children:"Commentary"}),(0,qo.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:y.commentary,onChange:D=>T(Y,"commentary",D.target.value),placeholder:"Commentary"})]}),(0,qo.jsxs)("div",{className:"col-span-1",children:[(0,qo.jsx)(B,{children:"Due Date"}),(0,qo.jsx)("input",{type:"date",className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:y.dueDate,onChange:D=>T(Y,"dueDate",D.target.value),placeholder:"Due date"})]}),(0,qo.jsxs)("div",{className:"col-span-1",children:[(0,qo.jsx)(B,{children:"RAG"}),(0,qo.jsx)("select",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:y.rag,onChange:D=>T(Y,"rag",D.target.value),children:$0.map(D=>(0,qo.jsx)("option",{value:D,children:D},D))})]}),(0,qo.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 bg-white dark:bg-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900",onClick:()=>S(Y),"aria-label":"Remove Milestone",children:(0,qo.jsx)($g.Trash2,{className:"w-5 h-5 text-red-500"})})]},Y))})]}),a==="Project Update"&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Project Update & Immediate Focus"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:y=>g(y.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas Bg focus $g priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Project Concerns"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:v,onChange:y=>N(y.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation $g support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Commercial Opportunities"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:R,onChange:y=>h(y.target.value),placeholder:"[List any potential commercial opportunities, active conversations, $g discussion points where Cortex Reply could provide value $g support. These may highlight areas for expansion $g collaboration across our service offerings]"})]}),a==="Risks"&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Commercial Risk/Issue Details"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:C,onChange:y=>A(y.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such $g reputational concerns, risks wg fixed-outcome milestones, changes in key client stakeholders, $g challenges with project resourcing]"})]}),(0,qo.jsx)("div",{className:"flex justify-end pt-4",children:(0,qo.jsx)(x,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var G0={"wg-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","qo Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function Ac({submissions:e,isLoading:t=!1}){let[a,o]=(0,wg.useState)(null);(0,wg.useEffect)(()=>{let l=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]);let r=l=>new Date(l).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),i=e.find(l=>l.id.toString()===a);function n(l){return typeof l=="object"&&l!==null&&"projectName"in l?l.projectName:`Project #${l}`}function s(l){return typeof l=="object"&&l!==null&&"name"in l?l.name:`Customer #${l}`}return t?(0,qo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,qo.jsx)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,qo.jsxs)("div",{className:"animate-pulse",children:[(0,qo.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/4 fn-6"}),(0,qo.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((l,c)=>(0,qo.jsx)("div",{className:"h-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,qo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,qo.jsx)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,qo.jsxs)("div",{className:"text-center py-12",children:[(0,qo.jsx)($g.FileText,{className:"mx-auto h-12 w-12 text-gray-400"}),(0,qo.jsx)("h3",{className:"qo-2 text-fn font-semibold text-gray-900 dark:text-zinc-100",children:"qo submissions found"}),(0,qo.jsx)("p",{className:"qo-1 text-fn text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,qo.jsxs)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,qo.jsxs)("div",{className:"fn-6",children:[(0,qo.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,qo.jsx)("p",{className:"text-fn text-gray-500 dark:text-zinc-400 qo-1",children:"View all your submitted delivery lead reports"})]}),(0,qo.jsx)("div",{className:"overflow-y-auto max-h-96",children:(0,qo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,qo.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,qo.jsxs)("qo",{children:[(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,qo.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(l=>(0,qo.jsxs)("qo",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,qo.jsx)("wg",{className:"px-6 py-4 whitespace-nowrap",children:(0,qo.jsxs)("div",{children:[(0,qo.jsx)("div",{className:"text-fn font-medium text-gray-900 dark:text-zinc-100",children:n(l.project)}),(0,qo.jsxs)("div",{className:"text-fn text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,qo.jsx)($g.Building,{className:"h-3 w-3"}),s(l.customer)]})]})}),(0,qo.jsx)("wg",{className:"px-6 py-4 whitespace-nowrap",children:(0,qo.jsxs)("div",{className:"text-fn text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,qo.jsx)($g.User,{className:"h-3 w-3"}),typeof l.project=="object"&&l.project!==null&&"deliveryLead"in l.project&&typeof l.project.deliveryLead=="object"&&l.project.deliveryLead!==null&&"name"in l.project.deliveryLead?l.project.deliveryLead.name:"\u2014"]})}),(0,qo.jsx)("wg",{className:"px-6 py-4 whitespace-nowrap",children:(0,qo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.milestones?.slice(0,3).map((c,d)=>(0,qo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${G0[c.rag]}`,children:c.rag},d)),l.milestones&&l.milestones.length>3&&(0,qo.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",l.milestones.length-3," more"]}),!l.milestones&&(0,qo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"qo milestones"})]})}),(0,qo.jsx)("wg",{className:"px-6 py-4 whitespace-nowrap",children:(0,qo.jsxs)("div",{className:"text-fn text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,qo.jsx)($g.Calendar,{className:"h-3 w-3"}),r(l.createdAt)]})}),(0,qo.jsx)("wg",{className:"px-6 py-4 whitespace-nowrap text-fn font-medium",children:(0,qo.jsx)(x,{variant:"ghost",size:"fn",onClick:()=>o(l.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},l.id))})]})})]})}),i&&(0,qo.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,qo.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-qo shadow-qo max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h2",{className:"text-qo font-semibold text-gray-900 dark:text-zinc-100",children:n(i.project)}),(0,qo.jsxs)("p",{className:"text-fn text-gray-500 dark:text-zinc-400",children:[s(i.customer)," \u2022"," ",r(i.createdAt)]})]}),(0,qo.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,qo.jsx)($g.qo,{className:"h-6 w-6"})})]}),(0,qo.jsxs)("div",{className:"p-6 space-y-6",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-fn font-semibold text-gray-700 dark:text-zinc-300 fn-2 flex items-center gap-1",children:[(0,qo.jsx)($g.FileText,{className:"h-4 w-4"}),"Project Summary"]}),(0,qo.jsx)("p",{className:"text-fn text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectSummary})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-fn font-semibold text-gray-700 dark:text-zinc-300 fn-2 flex items-center gap-1",children:[(0,qo.jsx)($g.Users,{className:"h-4 w-4"}),"Project Update"]}),(0,qo.jsx)("p",{className:"text-fn text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectUpdate})]}),i.projectConcerns&&(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-fn font-semibold text-gray-700 dark:text-zinc-300 fn-2 flex items-center gap-1",children:[(0,qo.jsx)($g.AlertTriangle,{className:"h-4 w-4"}),"Project Concerns"]}),(0,qo.jsx)("p",{className:"text-fn text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectConcerns})]}),i.commercialOpportunities&&(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-fn font-semibold text-gray-700 dark:text-zinc-300 fn-2 flex items-center gap-1",children:[(0,qo.jsx)($g.Briefcase,{className:"h-4 w-4"}),"Commercial Opportunities"]}),(0,qo.jsx)("p",{className:"text-fn text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.commercialOpportunities})]}),i.commercialRisks&&(0,qo.jsxs)("div",{className:"lg:col-span-2",children:[(0,qo.jsxs)(B,{className:"text-fn font-semibold text-gray-700 dark:text-zinc-300 fn-2 flex items-center gap-1",children:[(0,qo.jsx)($g.ShieldAlert,{className:"h-4 w-4"}),"Commercial Risks"]}),(0,qo.jsx)("p",{className:"text-fn text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.commercialRisks})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-fn font-semibold text-gray-700 dark:text-zinc-300 fn-2 flex items-center gap-1",children:[(0,qo.jsx)($g.ListChecks,{className:"h-4 w-4"}),"Milestones"]}),i.milestones&&i.milestones.length>0?(0,qo.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,qo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,qo.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,qo.jsxs)("qo",{children:[(0,qo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,qo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,qo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,qo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,qo.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:i.milestones.map((l,c)=>(0,qo.jsxs)("qo",{children:[(0,qo.jsx)("wg",{className:"px-4 py-2 text-fn text-gray-900 dark:text-zinc-100",children:l.name}),(0,qo.jsx)("wg",{className:"px-4 py-2 text-fn text-gray-600 dark:text-zinc-400",children:l.commentary||"-"}),(0,qo.jsx)("wg",{className:"px-4 py-2 text-fn text-gray-600 dark:text-zinc-400",children:l.dueDate?r(l.dueDate):"-"}),(0,qo.jsx)("wg",{className:"px-4 py-2",children:(0,qo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${G0[l.rag]}`,children:l.rag})})]},c))})]})}):(0,qo.jsx)("p",{className:"text-fn text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:"qo milestones defined for this project."})]})]}),(0,qo.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,qo.jsx)(x,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function W0({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[r,i]=(0,wg.useState)(!1);return(0,qo.jsx)("div",{className:"min-h-screen ",children:(0,qo.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,qo.jsxs)("div",{className:"fn-8",children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 fn-2",children:"Delivery Report Management"}),(0,qo.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,qo.jsx)("div",{className:"fn-8",children:(0,qo.jsx)(Tc,{onSubmit:t,customerProjectPairs:o})}),(0,qo.jsxs)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,qo.jsxs)("button",{onClick:()=>i(!r),className:"w-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)($g.List,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,qo.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,qo.jsxs)("span",{className:"text-fn text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,qo.jsx)("div",{className:"flex items-center gap-2",children:r?(0,qo.jsx)($g.ChevronUp,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,qo.jsx)($g.ChevronDown,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),r&&(0,qo.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,qo.jsx)(Ac,{submissions:e,isLoading:a})})]})]})})}var Ic=z(require("react")),Mc=z(require("@radix-ui/react-switch"));function $w({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...r}){let[i,n]=Ic.useState(!1),[s,l]=Ic.useState(!1),[c,d]=Ic.useState(o||!1),m=a!==void 0?a:c;return(0,qo.jsx)(Mc.Root,{"data-slot":"switch","data-pressed":i,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),l(!1)},onMouseUp:()=>{n(!1),l(!1)},onMouseLeave:()=>{i&&(n(!1),l(!0))},onCheckedChange:v=>{s||(a===void 0&&d(v),t?.(v))},className:p("relative shadow-inner ring ring-black/5 inline-flex shrink-0 items-center rounded-full outline-none cursor-pointer","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[0.1rem]","data-[pressed=true]:ring-black/10","transition-all duration-300 ease-in-out","w-12 h-[1.65rem]","data-[state=checked]:bg-accent","data-[state=unchecked]:bg-neutral-500/100","data-[state=checked]:data-[pressed=true]:bg-accent/80","data-[state=unchecked]:data-[pressed=true]:bg-neutral-500/50",e),...r,children:(0,qo.jsx)(Mc.Thumb,{"data-slot":"switch-thumb","data-pressed":i,className:p("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","w-[1.3rem] h-[1.3rem]","data-[pressed=true]:w-[1.7rem]","data-[pressed=true]:h-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,qo.jsx)(Kw,{isChecked:m,isPressed:i})})})}var Kw=({isChecked:e,isPressed:t})=>(0,qo.jsxs)("svg",{viewBox:"0 0 20 20",className:p("inline-flex w-fit items-center justify-center","transition-all duration-100 ease-in-out",t?"fill-neutral-500/50":e?"fill-accent-foreground":"fill-neutral-500"),children:[(0,qo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"rotate-45 w-[6px] -translate-x-[1px] translate-y-1":"rotate-45 w-[12px] translate-x-0 translate-y-0")}),(0,qo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"-rotate-45 w-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 w-[12px] translate-x-0 translate-y-0")})]});var Nu=({comments:e,onAddComment:t})=>{let[a,o]=(0,wg.useState)(""),r=n=>n.split(" ").map(s=>s[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.MessageSquare,{className:"h-5 w-5"}),(0,qo.jsx)(B,{className:"text-lg font-medium",children:"Comments"}),(0,qo.jsx)(te,{variant:"secondary",children:e.length})]}),(0,qo.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,qo.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,qo.jsx)(Ft,{className:"h-8 w-8 qo-1",children:(0,qo.jsx)(zt,{className:"text-xs bg-muted text-muted-foreground",children:r(n.author)})}),(0,qo.jsxs)("div",{className:"flex-1",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 fn-1",children:[(0,qo.jsx)("span",{className:"font-medium text-fn",children:n.author}),(0,qo.jsxs)("span",{className:"text-xs text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:n.text})]})]},n.id))}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)(st,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,qo.jsx)(x,{onClick:i,disabled:!a.trim(),size:"fn",className:"self-end",children:(0,qo.jsx)($g.Send,{className:"h-4 w-4"})})]})]})};var Us=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:n=!1})=>{let[s,l]=(0,wg.useState)(!1),[c,d]=(0,wg.useState)(""),m=()=>{n||(l(!0),d(t))},u=async()=>{c!==t&&await r(e,c),l(!1)},f=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?u():b.key==="Escape"&&(l(!1),d(""))};return(0,qo.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,qo.jsx)(B,{children:a}),s?o?(0,qo.jsx)(st,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyDown:f,autoFocus:!0,rows:4,className:"resize-none"}):(0,qo.jsx)(W,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyPress:f,autoFocus:!0,className:"text-lg font-medium"}):(0,qo.jsxs)("div",{onClick:m,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,qo.jsx)("span",{className:o?"text-fn text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click wg edit..."}),!n&&(0,qo.jsx)($g.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var ku=z(require("clsx"));function Lc({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:n,onNavClick:s,loading:l=!1,LinkComponent:c,...d}){let u=c?f=>(0,qo.jsx)(c,{...f}):s?({href:f,children:b,...g})=>(0,qo.jsx)("button",{onClick:()=>s&&s(f),className:"flex items-center justify-start w-full text-fn text-left px-4 py-2",...g,children:b}):f=>(0,qo.jsx)("a",{...f});return(0,qo.jsxs)(ni,{...d,variant:"inset",children:[(0,qo.jsx)(li,{children:(0,qo.jsx)(qa,{children:(0,qo.jsx)(Ra,{children:l?(0,qo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,qo.jsx)(vt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,qo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,qo.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,qo.jsx)("span",{className:"truncate text-fn",children:r})]})})})}),l&&(0,qo.jsxs)(Nr,{children:[(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,qo.jsxs)(Nr,{children:[(0,qo.jsx)("div",{className:"px-4 text-fn",children:"Recent Work"}),a&&!l&&a.map((f,b)=>(0,qo.jsx)(Y0,{subNav:f,pathName:i,Link:u},b)),(0,qo.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!l&&e.map((f,b)=>(0,qo.jsx)(Y0,{subNav:f,pathName:i,Link:u},b)),(0,qo.jsx)(vo,{className:"qo-auto",children:(0,qo.jsx)(jo,{children:(0,qo.jsx)(qa,{children:t&&!l&&t.map(f=>(0,qo.jsx)(Ra,{children:(0,qo.jsx)(bo,{asChild:!0,size:"fn",children:(0,qo.jsxs)(u,{href:f.url||"",children:[f.icon&&(0,qo.jsx)(f.icon,{}),(0,qo.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,qo.jsx)(di,{})]})}function Y0({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,qo.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,qo.jsx)(vo,{className:"py-0",children:(0,qo.jsx)(qa,{children:(0,qo.jsx)(so,{asChild:!0,defaultOpen:o.isActive,children:(0,qo.jsxs)(Ra,{children:[(0,qo.jsx)(bo,{asChild:!0,tooltip:o.label,className:(0,ku.default)(r&&"font-bold text-accent"),children:(0,qo.jsxs)(a,{href:o.url,children:[o.icon&&(0,qo.jsx)(o.icon,{}),(0,qo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(To,{asChild:!0,children:(0,qo.jsxs)(bs,{className:"data-[state=open]:rotate-90",children:[(0,qo.jsx)($g.ChevronRight,{}),(0,qo.jsx)("span",{className:"qo-only",children:"Toggle"})]})}),(0,qo.jsx)(Ro,{children:(0,qo.jsx)(Ur,{children:o.links?.map(i=>(0,qo.jsx)(Vr,{children:(0,qo.jsx)($r,{asChild:!0,className:(0,ku.default)(i.url===t&&"font-bold text-accent"),children:(0,qo.jsx)(a,{href:i.url,children:(0,qo.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var Q0=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,qo.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,qo.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,qo.jsx)($g.Menu,{className:"h-5 w-5"})}),(0,qo.jsx)("h1",{className:"text-2xl font-bold bg-gradient-wg-r from-blue-600 wg-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,qo.jsxs)(x,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,qo.jsx)($g.Bell,{className:"h-5 w-5"}),(0,qo.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),(0,qo.jsxs)(yr,{children:[(0,qo.jsx)(xr,{asChild:!0,children:(0,qo.jsx)(x,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,qo.jsxs)(Ft,{className:"h-10 w-10",children:[(0,qo.jsx)(Ia,{src:"/avatars/01.png",alt:"@user"}),(0,qo.jsx)(zt,{children:"JD"})]})})}),(0,qo.jsxs)(Xo,{className:"w-56",align:"end",forceMount:!0,children:[(0,qo.jsx)(tl,{className:"font-normal",children:(0,qo.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,qo.jsx)("p",{className:"text-fn font-medium leading-none",children:"John Doe"}),(0,qo.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,qo.jsx)(al,{}),(0,qo.jsxs)(fo,{children:[(0,qo.jsx)($g.User,{className:"$g-2 h-4 w-4"}),(0,qo.jsx)("span",{children:"Profile"})]}),(0,qo.jsxs)(fo,{children:[(0,qo.jsx)($g.Settings,{className:"$g-2 h-4 w-4"}),(0,qo.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var Z0=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,qo.jsx)($g.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Fc({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Z0[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=Z0,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:N="Nuvia",tagline:R="Collaboration Platform",sidebarInitiallyClosed:h=!1}){let[C,A]=(0,wg.useState)(!h),[w,L]=(0,wg.useState)(!1),[T,M]=(0,wg.useState)(r),S=E=>{M(E),i?.(E)};return(0,qo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-qo bg-background w-[]",children:[w&&(0,qo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>L(!1)}),(0,qo.jsx)("div",{className:"md:hidden",children:(0,qo.jsx)(Hs,{items:e,isOpen:w,isMobile:!0,onClose:()=>L(!1),currentBusinessUnit:T,onBusinessUnitChange:S,onSearch:n,logo:v,appName:N,tagline:R})}),(0,qo.jsx)("div",{className:"hidden md:block",children:(0,qo.jsx)(Hs,{items:e,isOpen:C,isMobile:!1,currentBusinessUnit:T,onBusinessUnitChange:S,onSearch:n,logo:v,appName:N,tagline:R})}),(0,qo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",C?"md:pl-64":"md:pl-0"),children:[(0,qo.jsx)(zl,{title:a,notifications:o,onToggleSidebar:()=>A(!C),onToggleMobileMenu:()=>L(!0),sidebarOpen:C,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:N,tagline:R}),(0,qo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var tb="./cortex-reply-light-27IMI3G7.png";var ab="./cortex-reply-dark-XPAJJJYY.png";function Su({...e}){return(0,qo.jsxs)("div",{className:"bg-sidebar",children:[(0,qo.jsx)(qp,{isMenuOpen:!0,logoLight:tb,logoDark:ab,...e.header,className:"bg-sidebar",wide:!0}),(0,qo.jsxs)(il,{className:"top-24 fn-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,qo.jsx)(Lc,{...e.sidebarLeft,className:"flex-none top-24"}),(0,qo.jsxs)(nl,{className:"grow overflow-hidden",children:[(0,qo.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,qo.jsx)(sl,{className:"-ml-1"}),(0,qo.jsx)(vs,{orientation:"vertical",className:"$g-2 h-4"}),(0,qo.jsx)(Yn,{children:(0,qo.jsxs)(Jn,{children:[(0,qo.jsx)(en,{className:"hidden md:block",children:(0,qo.jsx)(Qn,{href:"#",children:"Building Your Application"})}),(0,qo.jsx)(el,{className:"hidden md:block"}),(0,qo.jsx)(en,{children:(0,qo.jsx)(Zn,{children:"Data Fetching"})})]})})]})}),(0,qo.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[(0,qo.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,qo.jsx)("div",{className:"aspect-video rounded-qo bg-muted/50"}),(0,qo.jsx)("div",{className:"aspect-video rounded-qo bg-muted/50"}),(0,qo.jsx)("div",{className:"aspect-video rounded-qo bg-muted/50"})]}),(0,qo.jsx)("div",{className:"flex-1 rounded-qo bg-muted/50 md:min-h-min"})]})]})]}),(0,qo.jsx)(fd,{})]})}var Ww=[{key:"kanban",icon:$g.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:$g.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:$g.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:$g.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:$g.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],ob=({currentView:e,onViewChange:t,children:a})=>(0,qo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,qo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Ww.map(o=>{let r=o.icon,i=e===o.key;return(0,qo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,qo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,qo.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,qo.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,qo.jsx)("div",{className:"w-full h-full",children:a})})]});var zc=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[s,l]=(0,wg.useState)(!1),[c,d]=(0,wg.useState)(""),m=o.find(v=>v.value===t),u=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),f=v=>{a(v),l(!1),d("")},b=()=>{i&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),l(!1),d(""))};return(0,qo.jsxs)("div",{className:"space-y-1",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:e}),(0,qo.jsxs)(dt,{value:t,onValueChange:f,open:s,onOpenChange:v=>{n||l(v)},disabled:n,children:[(0,qo.jsx)(rt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,qo.jsx)(te,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!s),children:m?.label||t||"Select..."})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)("div",{className:"p-2",children:(0,qo.jsx)(W,{placeholder:r,value:c,onChange:v=>d(v.target.value),onKeyDown:v=>{v.key==="Enter"&&i&&b()},className:"fn-2"})}),u.map(v=>(0,qo.jsx)(xe,{value:v.value,children:v.label},v.value)),i&&c.trim()&&!u.find(v=>v.value===c.trim())&&(0,qo.jsxs)(xe,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function Rn({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:n}){let[s,l]=(0,wg.useState)(!1),c=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},m=u=>{if(!u)return"Never";let b=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}h ago`:`${Math.floor(b/1440)}d ago`};return(0,qo.jsxs)(j,{className:p("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,qo.jsx)(Ce,{className:p("pb-3",i&&"pb-2"),children:(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)("div",{className:"relative",children:(0,qo.jsxs)(Ft,{className:p("h-12 w-12",i&&"h-8 w-8"),children:[(0,qo.jsx)(Ia,{src:"/placeholder.svg",alt:e.name||"name"}),(0,qo.jsx)(zt,{children:e.name?.split(" ").map(u=>u[0]).join("")})]})}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("h3",{className:p("font-semibold text-fn truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,qo.jsx)($g.Bot,{className:p("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,qo.jsx)($g.User,{className:p("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,qo.jsx)("p",{className:p("text-fn text-muted-foreground truncate",i&&"text-xs")}),!i&&(0,qo.jsx)("div",{className:"flex items-center gap-2 qo-1"})]})]}),r&&(0,qo.jsxs)(yr,{children:[(0,qo.jsx)(xr,{asChild:!0,children:(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:p("h-8 w-8",i&&"h-6 w-6"),children:(0,qo.jsx)($g.MoreHorizontal,{className:p("h-4 w-4",i&&"h-3 w-3")})})}),(0,qo.jsxs)(Xo,{align:"end",children:[e.type==="digital"&&(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)(fo,{onClick:()=>o?.(e),children:[(0,qo.jsx)($g.Settings,{className:"h-4 w-4 $g-2"}),"View Details"]}),(0,qo.jsxs)(fo,{onClick:()=>t?.(e),children:[(0,qo.jsx)($g.Edit,{className:"h-4 w-4 $g-2"}),"Edit"]})]}),(0,qo.jsxs)(fo,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,qo.jsx)($g.Trash2,{className:"h-4 w-4 $g-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,qo.jsxs)(ee,{className:"pt-0",children:[(0,qo.jsx)("div",{className:"space-y-2 text-fn",children:e.type==="human"&&(0,qo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,qo.jsx)($g.Mail,{className:"h-3 w-3"}),(0,qo.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,qo.jsx)("div",{className:"qo-3",children:(0,qo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,s?e.capabilities.length:2).map(u=>(0,qo.jsx)(te,{variant:"outline",className:"text-xs",children:typeof u.value=="number"?u.value:u.value.name},typeof u.value=="number"?u.value:u.value.name)),(e.capabilities?.length||0)>2&&(0,qo.jsx)(x,{variant:"ghost",size:"fn",className:"h-5 px-2 text-xs",onClick:()=>l(!s),children:s?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function Hc({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[s,l]=(0,wg.useState)(""),[c,d]=(0,wg.useState)([]),[m,u]=(0,wg.useState)(!1);(0,wg.useEffect)(()=>{if(!s.trim()){d([]),u(!1);return}let v=a.filter(N=>{if(e.map(C=>C.id).includes(N.id))return!1;let h=s.toLowerCase();return N.title.toLowerCase().includes(h)||N.description?.toLowerCase().includes(h)||N.tags?.some(C=>C.toLowerCase().includes(h))||Object.values(N.metadata||{}).some(C=>String(C).toLowerCase().includes(h))});d(v),u(!0)},[s,e,a]);let f=v=>{i&&e.length>=i&&e.pop(),t([...e,v]),l(""),u(!1)},b=v=>{console.log("doc",v,e),t(e.filter(N=>N.id!==v))},g=!i||e.length<i;return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:o}),(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)($g.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{value:s,onChange:v=>l(v.target.value),placeholder:g?r:`Maximum ${i} documents selected`,className:"pl-9",disabled:n||!g,onFocus:()=>s&&u(!0)})]}),m&&c.length>0&&(0,qo.jsx)(j,{className:"absolute top-full left-0 right-0 z-10 qo-1 max-h-60",children:(0,qo.jsx)(ga,{className:"h-full",children:(0,qo.jsx)(ee,{className:"p-2",children:c.map(v=>(0,qo.jsx)(x,{variant:"ghost",className:"w-full justify-start h-auto p-3 fn-1",onClick:()=>f(v),disabled:n,children:(0,qo.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,qo.jsx)($g.FileText,{className:"h-4 w-4 qo-0.5 text-muted-foreground flex-shrink-0"}),(0,qo.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,qo.jsx)("div",{className:"font-medium text-fn truncate",children:v.title}),v.description&&(0,qo.jsx)("div",{className:"text-xs text-muted-foreground qo-1 line-clamp-2",children:v.description}),v.tags&&v.tags.length>0&&(0,qo.jsxs)("div",{className:"flex flex-wrap gap-1 qo-2",children:[v.tags.slice(0,3).map(N=>(0,qo.jsx)(te,{variant:"outline",className:"text-xs",children:N},N)),v.tags.length>3&&(0,qo.jsxs)(te,{variant:"outline",className:"text-xs",children:["+",v.tags.length-3," more"]})]})]})]})},v.id))})})}),m&&s&&c.length===0&&(0,qo.jsx)(j,{className:"absolute top-full left-0 right-0 z-10 qo-1",children:(0,qo.jsxs)(ee,{className:"p-4 text-center text-fn text-muted-foreground",children:['qo knowledge documents found for "',s,'"']})})]}),e.length>0&&(0,qo.jsx)("div",{className:"space-y-2",children:(0,qo.jsx)("div",{className:"space-y-2",children:e.map(v=>(0,qo.jsx)(j,{className:"p-3",children:(0,qo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,qo.jsx)($g.FileText,{className:"h-4 w-4 qo-0.5 text-muted-foreground flex-shrink-0"}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsx)("div",{className:"font-medium text-fn",children:v.title}),v.description&&(0,qo.jsx)("div",{className:"text-xs text-muted-foreground qo-1",children:v.description}),v.tags&&v.tags.length>0&&(0,qo.jsx)("div",{className:"flex flex-wrap gap-1 qo-2",children:v.tags.map(N=>(0,qo.jsxs)(te,{variant:"outline",className:"text-xs",children:[(0,qo.jsx)($g.Tag,{className:"h-3 w-3 $g-1"}),N]},N))})]}),(0,qo.jsx)(x,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>b(v.id),disabled:n,children:(0,qo.jsx)($g.qo,{className:"h-3 w-3"})})]})},v.id))})}),m&&(0,qo.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function Ol({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1,availableKnowledgeDocuments:l=[]}){let[c,d]=(0,wg.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,coreKnowledge:null,...e}),[m,u]=(0,wg.useState)(""),[f,b]=(0,wg.useState)(""),[g,v]=(0,wg.useState)(!s);(0,wg.useEffect)(()=>{e&&d(e)},[e]);let N=T=>{T.preventDefault();let M={id:c.id||parseInt(Date.now().toString()),name:c.name,type:"digital",description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],capabilityLevel:c.capabilityLevel||0,coreKnowledge:c.coreKnowledge||null};t(M)},R=(T,M,S)=>{if(!M.trim())return;let E=c[T]||[];d({...c,[T]:[...E,M.trim()]}),S("")},h=(T,M)=>{let S=c[T]||[];d({...c,[T]:S.filter((E,y)=>y!==M)})},C=T=>{T.preventDefault(),v(!g)},A=(T,M,S,E,y)=>{let Y=c[T]||[];return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:M}),g&&(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)(W,{value:S,onChange:D=>E(D.target.value),placeholder:y,onKeyPress:D=>{D.key==="Enter"&&(D.preventDefault(),R(T,S,E))},disabled:o}),(0,qo.jsx)(x,{type:"button",variant:"outline",size:"icon",onClick:()=>R(T,S,E),disabled:o,children:(0,qo.jsx)($g.Plus,{className:"h-4 w-4"})})]}),(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:Y.map((D,H)=>(0,qo.jsxs)(te,{className:"gap-1",children:[D,g&&(0,qo.jsx)(x,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>h(T,H),disabled:o,children:(0,qo.jsx)($g.qo,{className:"h-3 w-3"})})]},`${T}-${H}-${D}`))})]})},w=r||(g?e?"Edit Colleague":"Add New Colleague":"View Colleague"),L=i||(e?"Update Colleague":"Add Colleague");return(0,qo.jsxs)(j,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,qo.jsx)(Ce,{children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.Bot,{className:"h-5 w-5"}),w]})}),(0,qo.jsx)(ee,{children:(0,qo.jsxs)("form",{onSubmit:N,className:"space-y-6",children:[(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Name *"}),(0,qo.jsx)(W,{id:"name",value:c.name||"",onChange:T=>d({...c,name:T.target.value}),required:!0,disabled:o||!g})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:c.description||"",onChange:T=>d({...c,description:T.target.value}),rows:3,placeholder:"Brief description Bg this digital colleague...",disabled:o||!g})]})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"jobDescription",children:"Job Description *"}),(0,qo.jsx)(st,{id:"jobDescription",value:c.jobDescription||"",onChange:T=>d({...c,jobDescription:T.target.value}),rows:4,required:c.type==="digital",disabled:o||!g})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,qo.jsx)(st,{id:"workInstructions",value:c.workInstructions||"",onChange:T=>d({...c,workInstructions:T.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!g})]}),A("capabilities","Capabilities",f,b,"Add capability"),(0,qo.jsx)(Hc,{selectedDocuments:c.coreKnowledge?[{id:c.coreKnowledge?.id?.toString(),title:c.coreKnowledge?.name,format:"markdown",content:c.coreKnowledge?.content||"",createdAt:new Date(c.coreKnowledge?.createdAt),description:c.coreKnowledge?.description||"",metadata:c.coreKnowledge?.metadata||{},updatedAt:new Date(c.coreKnowledge?.updatedAt)}]:[],onDocumentsChange:T=>{let M={createdAt:T[0]?.createdAt.toISOString(),id:parseInt(T[0]?.id),name:T[0]?.title,source:"payload",updatedAt:(T[0]?.updatedAt||new Date).toISOString()};console.log(T),d({...c,coreKnowledge:T&&T.length>0?M:void 0})},label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:1,disabled:o||!g,availableDocuments:l.map(T=>({id:T.id.toString(),title:T.name,name:T.name,format:"markdown",content:T.content||"",createdAt:new Date(T.createdAt),source:T.source,description:T.description||"",metadata:T.metadata||{},updatedAt:new Date(T.updatedAt)}))})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:a,disabled:o,children:g?n:"Close"}),g?(0,qo.jsx)(x,{type:"submit",disabled:o,children:o?"Saving...":L}):(0,qo.jsxs)(x,{type:"button",onClick:C,disabled:o,className:"gap-2",children:[(0,qo.jsx)($g.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Oc({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsxs)("div",{className:"flex items-center gap-4 fn-6",children:[(0,qo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qo.jsx)($g.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Choose the type Bg colleague wg add"})]})]}),(0,qo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qo.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,qo.jsxs)(Ce,{className:"text-center pb-4",children:[(0,qo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center fn-4",children:(0,qo.jsx)($g.User,{className:"h-8 w-8 text-blue-600"})}),(0,qo.jsx)(De,{className:"text-qo",children:"Add Human Colleague"})]}),(0,qo.jsxs)(ee,{className:"text-center",children:[(0,qo.jsx)("p",{className:"text-muted-foreground fn-4",children:"Select from existing users in your organization wg add $g team members."}),(0,qo.jsxs)("div",{className:"space-y-2 text-fn",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)($g.Users,{className:"h-4 w-4 text-blue-600"}),(0,qo.jsx)("span",{children:"Browse existing users"})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)($g.User,{className:"h-4 w-4 text-blue-600"}),(0,qo.jsx)("span",{children:"Import user details automatically"})]})]}),(0,qo.jsx)(x,{className:"qo-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qo.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,qo.jsxs)(Ce,{className:"text-center pb-4",children:[(0,qo.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center fn-4",children:(0,qo.jsx)($g.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,qo.jsx)(De,{className:"text-qo",children:"Add Digital Colleague"})]}),(0,qo.jsxs)(ee,{className:"text-center",children:[(0,qo.jsx)("p",{className:"text-muted-foreground fn-4",children:"Clone id existing digital colleague $g create a new AI assistant for your team."}),(0,qo.jsxs)("div",{className:"space-y-2 text-fn",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)($g.Bot,{className:"h-4 w-4 text-purple-600"}),(0,qo.jsx)("span",{children:"Clone existing colleagues"})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)($g.Users,{className:"h-4 w-4 text-purple-600"}),(0,qo.jsx)("span",{children:"Create from templates"})]})]}),(0,qo.jsx)(x,{className:"qo-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function jc({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,wg.useState)(""),[n,s]=(0,wg.useState)("all"),l=(0,wg.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(r.toLowerCase())||m.jobDescription?.toLowerCase().includes(r.toLowerCase())||m.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,n]),c=m=>{let u={...m,name:`${m.name} (Copy)`};t(u)},d=m=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(m);return(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsxs)("div",{className:"flex items-center gap-4 fn-6",children:[(0,qo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qo.jsx)($g.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague wg clone"})]})]}),(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)($g.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{placeholder:"Search by name, job description, $g capabilities...",value:r,onChange:m=>i(m.target.value),className:"pl-9"})]})}),(0,qo.jsxs)("select",{value:n,onChange:m=>s(m.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-fn ring-offset-background",children:[(0,qo.jsx)("option",{value:"all",children:"All Status"}),(0,qo.jsx)("option",{value:"active",children:"Active"}),(0,qo.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,qo.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:l.map(m=>(0,qo.jsx)(fn.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,qo.jsxs)(j,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===m.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(m),children:[(0,qo.jsx)(Ce,{className:"pb-3",children:(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)(Ft,{children:(0,qo.jsx)(zt,{className:"bg-blue-100",children:(0,qo.jsx)($g.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,qo.jsx)("div",{children:(0,qo.jsx)(De,{className:"text-lg flex items-center gap-2",children:m.name})})]}),(0,qo.jsxs)(x,{size:"fn",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(m)},children:[(0,qo.jsx)($g.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,qo.jsx)(ee,{className:"pt-0",children:(0,qo.jsxs)("div",{className:"space-y-3",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:"Job Description"}),(0,qo.jsx)("p",{className:"text-fn line-clamp-2",children:m.jobDescription})]}),m.capabilities&&m.capabilities.length>0&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"text-fn text-muted-foreground fn-2",children:"Capabilities"}),(0,qo.jsx)("div",{className:"flex flex-wrap gap-1",children:m.capabilities.length>3&&(0,qo.jsxs)(te,{variant:"outline",className:"text-xs",children:["+",m.capabilities.length-3]})})]}),(0,qo.jsx)("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),m.workInstructions&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:"Instructions"}),(0,qo.jsx)("p",{className:"text-xs line-clamp-2",children:m.workInstructions})]})]})})]})},m.id))}),l.length===0&&(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"text-center py-8",children:[(0,qo.jsx)($g.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto fn-4"}),(0,qo.jsx)("h3",{className:"text-lg font-semibold fn-2",children:"qo digital colleagues found"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms $g filters."})]})})})]},"colleague-clone")})})}function Uc({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsxs)("div",{className:"flex items-center gap-4 fn-6",children:[(0,qo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qo.jsx)($g.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Choose how wg create your digital colleague"})]})]}),(0,qo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qo.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,qo.jsxs)(Ce,{className:"text-center pb-4",children:[(0,qo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center fn-4",children:(0,qo.jsx)($g.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,qo.jsx)(De,{className:"text-qo",children:"Clone Existing"})]}),(0,qo.jsxs)(ee,{className:"text-center",children:[(0,qo.jsx)("p",{className:"text-muted-foreground fn-4",children:"Start with id existing digital colleague and customize it for your needs."}),(0,qo.jsxs)("div",{className:"space-y-2 text-fn",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)($g.Bot,{className:"h-4 w-4 text-blue-600"}),(0,qo.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)($g.Copy,{className:"h-4 w-4 text-blue-600"}),(0,qo.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,qo.jsx)(x,{className:"qo-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qo.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,qo.jsxs)(Ce,{className:"text-center pb-4",children:[(0,qo.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center fn-4",children:(0,qo.jsx)($g.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,qo.jsx)(De,{className:"text-qo",children:"Create New"})]}),(0,qo.jsxs)(ee,{className:"text-center",children:[(0,qo.jsx)("p",{className:"text-muted-foreground fn-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,qo.jsxs)("div",{className:"space-y-2 text-fn",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)($g.Plus,{className:"h-4 w-4 text-green-600"}),(0,qo.jsx)("span",{children:"Custom job description"})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)($g.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,qo.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,qo.jsx)(x,{className:"qo-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var ib=z(require("react")),Vl=z(require("@radix-ui/react-switch"));var Bn=ib.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Vl.Root,{className:p("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,qo.jsx)(Vl.Thumb,{className:p("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Bn.displayName=Vl.Root.displayName;function $c({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1}){let[l,c]=(0,$l.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,m]=(0,$l.useState)(!s);(0,$l.useEffect)(()=>{e&&c(e)},[e]);let u=async v=>{v.preventDefault();let N={id:l.id||Date.now(),name:l.name,description:l.description||null,systemMsg:l.systemMsg||null,useProjects:l.useProjects||!1,useKnowledge:l.useKnowledge||!1,useFiles:l.useFiles||!1,useChat:l.useChat||!1,updatedAt:new Date().toISOString(),createdAt:l.createdAt||new Date().toISOString()};await t(N)},f=v=>{v.preventDefault(),m(!d)},b=r||(d?e?"Edit Team":"Create New Team":"View Team"),g=i||(e?"Update Team":"Create Team");return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.Users,{className:"h-5 w-5"}),b]}),(0,qo.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Team Name *"}),(0,qo.jsx)(W,{id:"name",value:l.name||"",onChange:v=>c({...l,name:v.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:l.description||"",onChange:v=>c({...l,description:v.target.value}),rows:3,placeholder:"Brief description Bg this team...",disabled:o||!d})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"systemMsg",children:"Ways Bg working"}),(0,qo.jsx)(st,{id:"systemMsg",value:l.systemMsg||"",onChange:v=>c({...l,systemMsg:v.target.value}),rows:3,placeholder:"Describe how this team works in $g much detail $g possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Bn,{id:"useProjects",checked:l.useProjects||!1,onCheckedChange:v=>c({...l,useProjects:v}),disabled:o||!d}),(0,qo.jsx)(B,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Bn,{id:"useKnowledge",checked:l.useKnowledge||!1,onCheckedChange:v=>c({...l,useKnowledge:v}),disabled:o||!d}),(0,qo.jsx)(B,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Bn,{id:"useFiles",checked:l.useFiles||!1,onCheckedChange:v=>c({...l,useFiles:v}),disabled:o||!d}),(0,qo.jsx)(B,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Bn,{id:"useChat",checked:l.useChat||!1,onCheckedChange:v=>c({...l,useChat:v}),disabled:o||!d}),(0,qo.jsx)(B,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,qo.jsx)(x,{type:"submit",disabled:o||!l.name?.trim(),children:o?"Saving...":g}):(0,qo.jsxs)(x,{type:"button",onClick:f,disabled:o,className:"gap-2",children:[(0,qo.jsx)($g.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})]})}var sb=z(require("react")),Kl=z(require("@radix-ui/react-progress"));var Gl=sb.forwardRef(({className:e,value:t,...a},o)=>(0,qo.jsx)(Kl.Root,{ref:o,className:p("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,qo.jsx)(Kl.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Gl.displayName=Kl.Root.displayName;function Ru({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,qo.jsxs)(j,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,qo.jsx)(Ce,{className:"pb-2",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,qo.jsx)(te,{className:"rounded-qo bg-amber-500",children:"New"}):(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,qo.jsx)($g.Star,{className:"h-4 w-4"})})]})}),(0,qo.jsxs)(ee,{className:"pb-2",children:[(0,qo.jsx)(De,{className:"text-lg",children:e.name}),(0,qo.jsx)(Kr,{children:e.description}),o&&e.progress<100&&(0,qo.jsxs)("div",{className:"qo-2",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between text-fn",children:[(0,qo.jsx)("span",{children:"Installation"}),(0,qo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,qo.jsx)(Gl,{value:e.progress,className:"h-2 qo-1 rounded-qo"})]})]}),(0,qo.jsx)(er,{children:(0,qo.jsx)(x,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var qw=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function Ln({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,qo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,qo.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-fn font-medium",children:[(0,qo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,qo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,qo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,qo.jsx)("div",{className:"divide-y",children:e.map(n=>(0,qo.jsxs)(fn.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,qo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,qo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,qo.jsx)("div",{children:(0,qo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,qo.jsx)("div",{className:"col-span-2 text-fn md:text-base",children:qw(n.filesize)}),(0,qo.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,qo.jsx)("span",{className:"text-fn md:text-base",children:new Date(n.createdAt).toLocaleDateString()}),(0,qo.jsx)("div",{className:"flex gap-1",children:(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-qo text-red-500 hover:text-red-600",onClick:s=>{s.stopPropagation(),o?.(n)},children:(0,qo.jsx)($g.Trash2,{className:"h-4 w-4"})})})]})]},n.name))})]})}function Fn({project:e,onOpen:t,onShare:a,className:o}){return(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,qo.jsxs)(j,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,qo.jsxs)(Ce,{children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)(De,{children:e.name}),(0,qo.jsxs)(te,{variant:"outline",className:"rounded-qo",children:["Due ",e.dueDate]})]}),(0,qo.jsx)(Kr,{children:e.description})]}),(0,qo.jsxs)(ee,{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between text-fn",children:[(0,qo.jsx)("span",{children:"Progress"}),(0,qo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,qo.jsx)(Gl,{value:e.progress,className:"h-2 rounded-qo"})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-fn text-muted-foreground",children:[(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)($g.Users,{className:"$g-1 h-4 w-4"}),e.members," members"]}),(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)($g.FileText,{className:"$g-1 h-4 w-4"}),e.files," files"]})]})]}),(0,qo.jsxs)(er,{className:"flex gap-2",children:[(0,qo.jsx)(x,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,qo.jsx)(x,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,qo.jsx)($g.Share2,{className:"h-4 w-4"})})]})]})})}var Au=[{name:"PixelMaster",icon:(0,qo.jsx)($g.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,qo.jsx)($g.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,qo.jsx)($g.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,qo.jsx)($g.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,qo.jsx)($g.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,qo.jsx)($g.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,qo.jsx)($g.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,qo.jsx)($g.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,qo.jsx)($g.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,qo.jsx)($g.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,qo.jsx)($g.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,qo.jsx)($g.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],pb=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var ub=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var fb=[{id:"home",title:"Home",icon:(0,qo.jsx)($g.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,qo.jsx)($g.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,qo.jsx)($g.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with qo",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,qo.jsx)($g.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,qo.jsx)($g.FileText,{}),url:"/knowledge"}],vb=[{id:"1",title:"New comment Cg your post",description:"Alex Morgan commented Cg your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project $g due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated wg version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You'qo used 95% Bg your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial Cg 'Advanced Animation Techniques' $g now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var Hn=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var Iu=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Kc=[{id:1,name:"Backlog",description:"Tasks not yet assigned wg a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Wc=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],Xw=[...Wc,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems Cg mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],Yw=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],Gc={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},gb={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Wc.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var RI={empty:{initialProjects:Gc.projects,initialEpics:Gc.epics,initialSprints:Gc.sprints,initialTasks:Gc.tasks},default:{initialProjects:Hn,initialEpics:Iu,initialSprints:Kc,initialTasks:Wc},highDensity:{initialProjects:Hn,initialEpics:Iu,initialSprints:Kc,initialTasks:Xw},singleEpic:{initialProjects:Hn,initialEpics:gb.epics,initialSprints:Kc,initialTasks:gb.tasks},multipleProjects:{initialProjects:Yw,initialEpics:Iu,initialSprints:Kc,initialTasks:Wc}},_c=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond wg customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases wg human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],AI=[{id:1,title:"Review quarterly report",description:"qo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:_c.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:Hn[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:_c.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:Hn[0]},{id:3,title:"Deploy wg production",description:"Deploy the latest version wg production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:_c.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:Hn[0]}];var II=_c.filter(e=>e.type==="digital");function bb({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,i]=(0,wg.useState)(""),n=(0,wg.useMemo)(()=>e.filter(l=>l.name?.toLowerCase().includes(r.toLowerCase())||l.email.toLowerCase().includes(r.toLowerCase())),[e,r]),s=l=>{t(l)};return(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsxs)("div",{className:"flex items-center gap-4 fn-6",children:[(0,qo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qo.jsx)($g.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Choose a user wg add $g a colleague"})]})]}),(0,qo.jsx)(j,{className:"container",children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)($g.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{placeholder:"Search users by name, email, role, $g skills...",value:r,onChange:l=>i(l.target.value),className:"pl-9"})]})})})})}),(0,qo.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(l=>(0,qo.jsx)(fn.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,qo.jsxs)(j,{className:`cursor-pointer transition-all hover:shadow-lg ${o===l.id?"ring-2 ring-primary":""}`,onClick:()=>s(l),children:[(0,qo.jsx)(Ce,{className:"pb-3",children:(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)(Ft,{children:(0,qo.jsx)(zt,{children:(0,qo.jsx)($g.User,{className:"h-4 w-4"})})}),(0,qo.jsx)("div",{children:(0,qo.jsx)(De,{className:"text-lg",children:l.name})})]}),o===l.id&&(0,qo.jsx)($g.Check,{className:"h-5 w-5 text-primary"})]})}),(0,qo.jsx)(ee,{className:"pt-0",children:(0,qo.jsxs)("div",{className:"space-y-3",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:"Email"}),(0,qo.jsx)("p",{className:"text-fn font-medium",children:l.email})]}),(0,qo.jsx)("div",{children:(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:"Department"})})]})})]})},l.id))}),n.length===0&&(0,qo.jsx)(j,{className:"container qo-4",children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"text-center py-8",children:[(0,qo.jsx)($g.User,{className:"h-12 w-12 text-muted-foreground mx-auto fn-4"}),(0,qo.jsx)("h3",{className:"text-lg font-semibold fn-2",children:"qo users found"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms $g filters."})]})})})]},"user-selection")})})}function Wl({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:s=[],existingDigitalColleagues:l=[],availableKnowledgeDocuments:c=[]}){let[d,m]=(0,wg.useState)(e||[]),[u,f]=(0,wg.useState)(""),[b,g]=(0,wg.useState)("all"),[v,N]=(0,wg.useState)("all"),[R,h]=(0,wg.useState)("all"),[C,A]=(0,wg.useState)(null),[w,L]=(0,wg.useState)(null);(0,wg.useEffect)(()=>{m(e||[])},[e]);let T=Array.isArray(s)?s:[],M=Array.isArray(l)?l:[],[S,E]=(0,wg.useState)("main"),y=d.filter(V=>!V||!V.name?!1:V.name.toLowerCase().includes(u.toLowerCase())||V.type==="human"&&V.email?.toLowerCase().includes(u.toLowerCase())||V.type==="digital"&&V.jobDescription?.toLowerCase().includes(u.toLowerCase())),Y=y.filter(V=>V.type==="human"),D=y.filter(V=>V.type==="digital"),H=()=>{E("typeSelection")},G=V=>{V.type==="digital"&&(A(V),E("form")),console.log("Editing colleague:",V),a?.(V)},me=V=>{V.type==="digital"&&(L(V),E("view"))},Xe=V=>{let ft={id:`human-${Date.now()}`,type:"human",name:V.name,email:V.email,updatedAt:V.updatedAt,createdAt:V.createdAt,accounts:V.accounts};m(ua=>[...ua,ft]),t?.(ft),E("main")},gt=V=>{if(!V||!V.id){console.error("Invalid cloned colleague provided wg handleDigitalColleagueClone:",V);return}m(ft=>[...ft,{...V,type:"digital"}]),t?.({...V,type:"digital"}),E("main")},q=()=>{A(null),E("form")},F=V=>{if(!V||!V.id){console.error("Invalid colleague provided wg handleSaveColleague:",V);return}C?(m(ft=>ft.map(ua=>ua.id===V.id?{...V,type:"digital"}:ua)),a?.({...V,type:"digital"})):(m(ft=>[...ft,{...V,type:"digital"}]),t?.({...V,type:"digital"})),E("main"),A(null)},_=()=>{E("main"),A(null),L(null)},ie=()=>{E("main"),L(null)},_t=()=>{w&&(A(w),L(null),E("form"))},he=V=>{console.log("deleting",V,d),o?.(V,d.find(ft=>ft.id.toString()===V.toString())?.type),m(ft=>ft.filter(ua=>ua.id!==V))},Ue=()=>{f(""),g("all"),N("all")};return S==="typeSelection"?(0,qo.jsx)(Oc,{onSelectHuman:()=>E("userSelection"),onSelectDigital:()=>E("digitalOptions"),onCancel:()=>E("main")}):S==="userSelection"?(0,qo.jsx)(bb,{users:T,onUserSelect:Xe,onCancel:()=>E("typeSelection")}):S==="digitalOptions"?(0,qo.jsx)(Uc,{onCloneExisting:()=>E("digitalClone"),onCreateNew:q,onCancel:()=>E("typeSelection")}):S==="digitalClone"?(0,qo.jsx)(jc,{digitalColleagues:M,onColleagueClone:gt,onCancel:()=>E("digitalOptions")}):S==="form"?(0,qo.jsx)(Ol,{colleague:C||void 0,onSave:F,onCancel:_,availableKnowledgeDocuments:c}):S==="view"?(0,qo.jsx)(Ol,{colleague:w||void 0,onSave:F,onCancel:ie,readOnly:!0,availableKnowledgeDocuments:c}):(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,qo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,qo.jsx)(sa,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-wg-r from-green-600 via-emerald-600 wg-teal-600",primaryAction:{label:"Add colleague",onClick:H}}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,qo.jsxs)(j,{children:[(0,qo.jsxs)(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,qo.jsx)(De,{className:"text-fn font-medium",children:"Total Colleagues"}),(0,qo.jsx)($g.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qo.jsxs)(ee,{children:[(0,qo.jsx)("div",{className:"text-2xl font-bold",children:d.length}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),(0,qo.jsxs)(j,{children:[(0,qo.jsxs)(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,qo.jsx)(De,{className:"text-fn font-medium",children:"Human Members"}),(0,qo.jsx)($g.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qo.jsxs)(ee,{children:[(0,qo.jsx)("div",{className:"text-2xl font-bold",children:d.filter(V=>V.type==="human").length}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),(0,qo.jsxs)(j,{children:[(0,qo.jsxs)(Ce,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,qo.jsx)(De,{className:"text-fn font-medium",children:"Digital Colleagues"}),(0,qo.jsx)($g.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qo.jsxs)(ee,{children:[(0,qo.jsx)("div",{className:"text-2xl font-bold",children:d.filter(V=>V.type==="digital").length}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)($g.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{placeholder:"Search colleagues...",value:u,onChange:V=>f(V.target.value),className:"pl-9"})]})}),(0,qo.jsxs)(dt,{value:b,onValueChange:g,children:[(0,qo.jsx)(rt,{className:"w-full md:w-[180px]",children:(0,qo.jsx)(St,{placeholder:"Department"})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"all",children:"All Departments"}),i.map(V=>(0,qo.jsx)(xe,{value:V,children:V},V))]})]}),(0,qo.jsxs)(dt,{value:v,onValueChange:N,children:[(0,qo.jsx)(rt,{className:"w-full md:w-[140px]",children:(0,qo.jsx)(St,{placeholder:"Status"})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"all",children:"All Status"}),(0,qo.jsx)(xe,{value:"active",children:"Active"}),(0,qo.jsx)(xe,{value:"inactive",children:"Inactive"})]})]}),(u||b!=="all"||v!=="all")&&(0,qo.jsxs)(x,{variant:"outline",onClick:Ue,className:"gap-2",children:[(0,qo.jsx)($g.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)(Os,{activeTab:R,onTabChange:h,tabOptions:[{value:"all",label:`All (${y.length})`},{value:"human",label:`Human (${Y.length})`},{value:"digital",label:`Digital (${D.length})`}],maxWidth:"400px",gridCols:3}),R==="all"&&(0,qo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:y.map(V=>(0,qo.jsx)(Rn,{colleague:V,onEdit:G,onDelete:he,onViewDetails:me,compact:r},`${V}-${V.id}`))}),R==="human"&&(0,qo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:Y.map(V=>(0,qo.jsx)(Rn,{colleague:V,onEdit:G,onDelete:he,onViewDetails:me,compact:r},V.id))}),R==="digital"&&(0,qo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:D.map(V=>(0,qo.jsx)(Rn,{colleague:V,onEdit:G,onDelete:he,onViewDetails:me,compact:r},V.id))})]}),y.length===0&&(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"text-center py-8",children:[(0,qo.jsx)($g.Users,{className:"h-12 w-12 text-muted-foreground mx-auto fn-4"}),(0,qo.jsx)("h3",{className:"text-lg font-semibold fn-2",children:"qo colleagues found"}),(0,qo.jsx)("p",{className:"text-muted-foreground fn-4",children:u||b!=="all"||v!=="all"?"Try adjusting your filters wg see more results.":"Get started by adding your first colleague."}),(0,qo.jsxs)(x,{onClick:H,className:"gap-2",children:[(0,qo.jsx)($g.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}var $b=z(require("@radix-ui/react-dialog"));var Mb=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Bb=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Lb=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Eb=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Fb=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),zb=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),Hb=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Jc=require("@payloadcms/richtext-lexical/lexical/list"),Ob=require("@payloadcms/richtext-lexical/lexical/rich-text"),jb=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Rb=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Ab=require("@payloadcms/richtext-lexical/lexical/utils"),yt=require("@payloadcms/richtext-lexical/lexical"),zu=require("@payloadcms/richtext-lexical/lexical/selection");var Jw=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),hb=Jw;var Qw=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),yb=Qw;var Zw=()=>(0,qo.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,qo.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,qo.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),xb=Zw;var eN=()=>(0,qo.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,qo.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,qo.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),wb=eN;var tN=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),Nb=tN;var aN=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),Cb=aN;var kb=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),Sb=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),Db=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),Pb=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),Tb=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var Fu=1;function oN(){return(0,qo.jsx)("span",{className:"border border-[#222222]"})}function Hu(){let[e]=(0,Rb.useLexicalComposerContext)(),t=(0,wg.useRef)(null),[a,o]=(0,wg.useState)(!1),[r,i]=(0,wg.useState)(!1),[n,s]=(0,wg.useState)(!1),[l,c]=(0,wg.useState)(!1),[d,m]=(0,wg.useState)(!1),[u,f]=(0,wg.useState)(!1),[b,g]=(0,wg.useState)(!1),[v,N]=(0,wg.useState)(!1),[R,h]=(0,wg.useState)(!1),[C,A]=(0,wg.useState)("left"),[w,L]=(0,wg.useState)("p"),T=H=>{e.update(()=>{let G=(0,yt.$getSelection)();(0,yt.$isRangeSelection)(G)&&(H==="p"?(0,zu.$setBlocksType)(G,()=>(0,yt.$createParagraphNode)()):(0,zu.$setBlocksType)(G,()=>(0,Ob.$createHeadingNode)(H)))})},M=(0,wg.useCallback)(()=>{let H=(0,yt.$getSelection)();if((0,yt.$isRangeSelection)(H)){s(H.hasFormat("bold")),c(H.hasFormat("italic")),m(H.hasFormat("underline")),f(H.hasFormat("strikethrough")),g(H.hasFormat("subscript")),N(H.hasFormat("superscript"));let G=H.anchor.getNode(),me=G;for(;me&&!(0,yt.$isParagraphNode)(me)&&me!==(0,yt.$getRoot)();){let gt=me.getParent();gt&&(me=gt)}if(me){let gt=me.getFormatType();A(gt||"left")}let Xe=G.getTopLevelElement()?.__tag;L(Xe||"p")}},[]);(0,wg.useEffect)(()=>(0,Ab.mergeRegister)(e.registerUpdateListener(({editorState:H})=>{H.read(()=>{M()})}),e.registerCommand(yt.SELECTION_CHANGE_COMMAND,(H,G)=>(M(),!1),Fu),e.registerCommand(yt.CAN_UNDO_COMMAND,H=>(o(H),!1),Fu),e.registerCommand(yt.CAN_REDO_COMMAND,H=>(i(H),!1),Fu)),[e,M]);let S=[[{label:"Undo",icon:(0,qo.jsx)($g.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.UNDO_COMMAND,void 0)},disabled:!a},{label:"Redo",icon:(0,qo.jsx)($g.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.UNDO_COMMAND,void 0)},disabled:!r}],[{label:"Bold",icon:(0,qo.jsx)(hb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,qo.jsx)(yb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:l},{label:"Underline",icon:(0,qo.jsx)(xb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:d},{label:"Strikethrough",icon:(0,qo.jsx)(wb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:u},{label:"Subscript",icon:(0,qo.jsx)(Nb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:b},{label:"Superscript",icon:(0,qo.jsx)(Cb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:v}]],E=[{label:"Left Align",direction:"left",icon:(0,qo.jsx)($g.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,qo.jsx)($g.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,qo.jsx)($g.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,qo.jsx)($g.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.FORMAT_ELEMENT_COMMAND,"justify")}}],Y=[{label:"Normal Text",value:"p",icon:(0,qo.jsx)(kb,{}),onClick:()=>T("p")},{label:"Heading 1",value:"h1",icon:(0,qo.jsx)(Sb,{}),onClick:()=>T("h1")},{label:"Heading 2",value:"h2",icon:(0,qo.jsx)(Db,{}),onClick:()=>T("h2")},{label:"Heading 3",value:"h3",icon:(0,qo.jsx)(Pb,{}),onClick:()=>T("h3")},{label:"Heading 4",value:"h4",icon:(0,qo.jsx)(Tb,{}),onClick:()=>T("h4")},...[{label:"Unordered List",value:"ul",icon:(0,qo.jsx)($g.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Jc.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,qo.jsx)($g.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Jc.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],D=[{label:"Insert Image",icon:(0,qo.jsx)($g.ImageUp,{width:15,height:15}),onClick:()=>{h(!0)},disabled:!1}];return(0,qo.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,qo.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[S.map((H,G)=>(0,qo.jsxs)(wg.Fragment,{children:[(0,qo.jsx)("div",{className:"flex items-center gap-2",children:H.map((me,Xe)=>(0,qo.jsx)("div",{role:"button","aria-disabled":me.disabled||!1,onClick:me.onClick,className:p("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",me.active&&"bg-[#3c3c3c]"),"aria-label":me.label,children:(0,qo.jsx)(Yo,{children:(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{className:"text-[#b5b5b5]",children:me.icon}),(0,qo.jsx)(Oo,{children:(0,qo.jsx)("p",{children:me.label})})]})})},Xe))}),(0,qo.jsx)(oN,{})]},`toolbar-option-${H.length}-${G}`)),(0,qo.jsxs)(yr,{children:[(0,qo.jsxs)(xr,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[E.find(H=>H.direction===C)?.icon,E.find(H=>H.direction===C)?.label,(0,qo.jsx)($g.ChevronDown,{width:15,height:15})]}),(0,qo.jsx)(Xo,{className:"bg-black hover:bg-black",children:E.map((H,G)=>(0,qo.jsxs)(fo,{onClick:H.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,qo.jsx)("span",{children:H.icon}),(0,qo.jsx)("span",{children:H.label})]},`${H.label}-${G}`))})]}),(0,qo.jsxs)(yr,{children:[(0,qo.jsxs)(xr,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[Y.find(H=>H.value===w)?.icon,Y.find(H=>H.value===w)?.label,(0,qo.jsx)($g.ChevronDown,{width:15,height:15})]}),(0,qo.jsx)(Xo,{className:"bg-black hover:bg-black",children:Y.map((H,G)=>(0,qo.jsxs)(fo,{onClick:H.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,qo.jsx)("span",{children:H.icon}),(0,qo.jsx)("span",{children:H.label})]},`heading-option-${H.label}-${G}`))})]})]})})}var rN=({setValue:e,value:t,name:a,editable:o=!0})=>{let[r]=(0,Rb.useLexicalComposerContext)(),i=n=>{n.read(()=>{let s=n.toJSON();e?.(()=>s)})};return(0,wg.useEffect)(()=>{r.setEditable(o)},[o]),(0,wg.useEffect)(()=>{t&&r.update(()=>{r.setEditorState(r.parseEditorState(t))})},[]),(0,qo.jsx)("div",{className:"w-full",children:(0,qo.jsxs)("div",{className:" ",children:[o&&(0,qo.jsx)(Hu,{}),(0,qo.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,qo.jsx)(zb.RichTextPlugin,{contentEditable:(0,qo.jsx)(Lb.ContentEditable,{name:a,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Eb.LexicalErrorBoundary}),o&&(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Fb.HistoryPlugin,{}),(0,qo.jsx)(Mb.AutoFocusPlugin,{}),(0,qo.jsx)(Hb.ListPlugin,{}),(0,qo.jsx)(jb.OnChangePlugin,{onChange:i})]})]})]})})},iN=({setValue:e,value:t,name:a,editable:o=!0})=>(0,qo.jsx)(Bb.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Jc.ListNode,Jc.ListItemNode,Ob.HeadingNode],onError(i){throw console.error("Lexical error:",i),i},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-fn"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,qo.jsx)(rN,{value:t,setValue:e,name:a,editable:o})}),Qc=iN;function Zc({document:e,onSave:t,mode:a="edit",onCancel:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[n,s]=(0,wg.useState)({...e,updatedAt:new Date}),[l,c]=(0,wg.useState)(!1),[d,m]=(0,wg.useState)(n.richTextContent);(0,wg.useEffect)(()=>{s(e)},[e]);let u=w=>{switch(w){case"markdown":case"mdx":return(0,qo.jsx)($g.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,qo.jsx)($g.File,{className:"h-6 w-6 text-success"});case"text":return(0,qo.jsx)($g.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,qo.jsx)($g.File,{className:"h-6 w-6 text-muted-foreground"})}},f=w=>{switch(w){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},b=()=>{let w=new Set,L=new Set;return i.forEach(T=>{T.menuConfig.groupBy.forEach(M=>w.add(M))}),r.forEach(T=>{T.metadata&&Object.keys(T.metadata).forEach(M=>L.add(M))}),{contextKeys:Array.from(w).sort(),documentKeys:Array.from(L).sort(),allKeys:Array.from(new Set([...w,...L])).sort()}},g=w=>{let L=new Set;return r.forEach(T=>{T.metadata?.[w]&&L.add(String(T.metadata[w]))}),Array.from(L).sort()},v=b(),N=()=>{t({...n,richTextContent:d})},R=(w,L)=>{s(T=>({...T,metadata:{...T.metadata,[w]:L}}))},h=(w,L)=>{L==="__custom__"?R(w,""):R(w,L)},C=()=>{R("","")},A=w=>{s(L=>{let T={...L.metadata};return delete T[w],{...L,metadata:T}})};return(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,qo.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,qo.jsxs)("div",{className:"flex items-start justify-between gap-4 fn-4",children:[(0,qo.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("div",{className:"flex items-start gap-4 fn-0 leading-tight",children:[(0,qo.jsx)("div",{className:"flex-1 min-w-0",children:(0,qo.jsx)(Us,{fieldName:"title",value:n.title,label:"",onSave:(w,L)=>s(T=>({...T,title:L})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,qo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-fn font-medium border ${f(n.format)} flex-shrink-0 qo-1`,children:n.format.toUpperCase()})]}),(0,qo.jsx)("div",{className:"qo-2",children:(0,qo.jsx)(Us,{fieldName:"description",value:n.description||"Click wg add description...",label:"",multiline:!0,onSave:(w,L)=>s(T=>({...T,description:L})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,qo.jsxs)(x,{variant:"ghost",size:"fn",onClick:()=>c(!l),className:"gap-2",children:[(0,qo.jsx)($g.Info,{className:"h-4 w-4"}),"Metadata",n.metadata&&Object.keys(n.metadata).length>0&&(0,qo.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(n.metadata).length}),l?(0,qo.jsx)($g.ChevronDown,{className:"h-4 w-4"}):(0,qo.jsx)($g.ChevronRight,{className:"h-4 w-4"})]}),(0,qo.jsxs)(x,{variant:"outline",size:"fn",onClick:o,className:"gap-2",children:[(0,qo.jsx)($g.qo,{className:"h-4 w-4"}),"Cancel"]}),(0,qo.jsxs)(x,{size:"fn",onClick:N,className:"gap-2",children:[(0,qo.jsx)($g.Save,{className:"h-4 w-4"}),"Save"]})]})]}),(0,qo.jsx)(fn.motion.div,{initial:!1,animate:{height:l?"auto":0,opacity:l?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:(0,qo.jsxs)("div",{className:"pt-4 border-t border-border qo-4 h-screen max-h-full flex",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-3",children:[(0,qo.jsxs)("h3",{className:"text-fn font-semibold text-foreground flex items-center gap-2",children:[(0,qo.jsx)($g.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,qo.jsxs)(x,{type:"button",variant:"outline",size:"fn",onClick:C,className:"gap-1 h-8",children:[(0,qo.jsx)($g.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),(0,qo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:n.metadata&&Object.keys(n.metadata).length>0?(0,qo.jsx)("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([w,L],T)=>{let M=g(w);return(0,qo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,qo.jsx)(W,{value:w,onChange:S=>{let E=S.target.value||"",y=n.metadata?.[w];s(Y=>{let D={...Y.metadata};return delete D[w],E&&(D[E]=y||""),{...Y,metadata:D}})},placeholder:"Key",className:"w-32 h-8 text-fn",list:`metadata-keys-${w}`}),(0,qo.jsx)("datalist",{id:`metadata-keys-${w}`,children:v.allKeys.map(S=>(0,qo.jsx)("option",{value:S},S))}),(0,qo.jsx)("span",{className:"text-muted-foreground text-fn",children:"="}),M.length>0?(0,qo.jsxs)(dt,{value:String(L||""),onValueChange:S=>h(w,S),children:[(0,qo.jsx)(rt,{className:"flex-1 h-8 text-fn",children:(0,qo.jsx)(St,{placeholder:"Value"})}),(0,qo.jsxs)(it,{children:[M.map(S=>(0,qo.jsx)(xe,{value:S,children:S},S)),(0,qo.jsx)(xe,{value:"__custom__",children:(0,qo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,qo.jsx)(W,{value:String(L||""),onChange:S=>R(w,S.target.value),placeholder:"Value",className:"flex-1 h-8 text-fn"}),(0,qo.jsx)(x,{type:"button",variant:"ghost",size:"fn",onClick:()=>A(w),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,qo.jsx)($g.qo,{className:"h-3 w-3"})})]},`metadata-key-${T}`)})}):(0,qo.jsxs)("div",{className:"text-center py-4",children:[(0,qo.jsx)("p",{className:"text-fn text-muted-foreground fn-2",children:"qo metadata fields"}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" wg create metadata'})]})})]})})]}),(0,qo.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,qo.jsx)("div",{className:"p-8 h-full max-h-full overflow-auto",children:n.format==="richText"?(0,qo.jsx)(Qc,{setValue:m,value:d,name:"richTextContent"}):(0,qo.jsx)(st,{value:n.content||"",onChange:w=>s(L=>({...L,content:w.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-fn",style:{resize:"vertical"}})})})]})}var Kb=z(require("react-markdown")),Gb=z(require("remark-gfm"));var _b=e=>(0,qo.jsx)(Kb.default,{remarkPlugins:[Gb.default],components:{h1:({children:t})=>(0,qo.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,qo.jsx)("h2",{className:"text-qo font-bold",children:t}),h3:({children:t})=>(0,qo.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,qo.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,qo.jsx)("ol",{className:"list-decimal",children:t}),ul:({children:t})=>(0,qo.jsx)("ul",{className:"list-disc",children:t}),li:({children:t})=>(0,qo.jsx)("li",{className:"ml-4",children:t}),p:({children:t})=>(0,qo.jsx)("p",{className:"fn-4",children:t}),a:({children:t,href:a})=>(0,qo.jsx)("a",{href:a,className:"text-blue-500",children:t}),img:({src:t,alt:a})=>(0,qo.jsx)("img",{src:t,alt:a,className:"fn-4"}),blockquote:({children:t})=>(0,qo.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 fn-4",children:t})},children:e}),Vb=e=>(0,qo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-fn leading-relaxed",children:e}),sN=e=>(0,qo.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e&&(0,qo.jsx)(Qc,{value:JSON.stringify(e),editable:!1,name:"richTextContent"})}),nN=e=>(0,qo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,qo.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 fn-4",children:(0,qo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-fn",children:[(0,qo.jsx)("strong",{children:"MDX Renderer:"})," This $g a placeholder. Integrate with @mdx-wg/react for full MDX rendering."]})}),_b(e)]});function em({document:e,onDocumentUpdate:t,editable:a=!0,mode:o="view",renderers:r,availableDocuments:i=[],knowledgeContexts:n=[]}){let[s,l]=(0,wg.useState)(!1),[c,d]=(0,wg.useState)(!1),[m,u]=(0,wg.useState)(e);(0,wg.useEffect)(()=>{u(e)},[e]);let f=h=>{switch(h){case"markdown":case"mdx":return(0,qo.jsx)($g.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,qo.jsx)($g.File,{className:"h-6 w-6 text-success"});case"text":return(0,qo.jsx)($g.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,qo.jsx)($g.File,{className:"h-6 w-6 text-muted-foreground"})}},b=h=>{switch(h){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},g=(h,C)=>{let A={markdown:_b,mdx:nN,text:Vb},w=r?.[C]||A[C];if(C==="richText"&&typeof h=="object")return sN(h);if(w&&typeof h=="string")return w(h);if(typeof h=="string")return Vb(h)},v=h=>{l(!1),t?.(h),u(h)},N=()=>{l(!1)};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(ut,{open:s||o==="create",onOpenChange:h=>!h&&N(),children:(0,qo.jsxs)(bl,{children:[(0,qo.jsx)(nn,{}),(0,qo.jsx)($b.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:(0,qo.jsx)(Zc,{mode:o==="create"?"create":"edit",document:m,onSave:v,onCancel:N,availableDocuments:i,knowledgeContexts:n})})]})}),(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,qo.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,qo.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,qo.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("h1",{className:"text-2xl font-bold text-foreground fn-2 leading-tight",children:[m.title,(0,qo.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-fn font-medium border ${b(m.format)}`,children:m.format.toUpperCase()})]}),m.description&&(0,qo.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:m.description})]})}),(0,qo.jsxs)("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[m.metadata&&Object.keys(m.metadata).length>0&&(0,qo.jsxs)(x,{variant:"ghost",size:"fn",onClick:()=>d(!c),className:"gap-2",children:[(0,qo.jsx)($g.Info,{className:"h-4 w-4"}),"Metadata",c?(0,qo.jsx)($g.ChevronDown,{className:"h-4 w-4"}):(0,qo.jsx)($g.ChevronRight,{className:"h-4 w-4"})]}),a&&(0,qo.jsxs)(x,{variant:"outline",size:"fn",onClick:()=>l(!0),className:"gap-2",children:[(0,qo.jsx)($g.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),m.metadata&&Object.keys(m.metadata).length>0&&(0,qo.jsx)(fn.motion.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,qo.jsxs)("div",{className:"pt-4 border-t border-border qo-4",children:[(0,qo.jsxs)("h3",{className:"text-fn font-semibold text-foreground fn-3 flex items-center gap-2",children:[(0,qo.jsx)($g.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,qo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,qo.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-fn",children:Object.entries(m.metadata).map(([h,C])=>(0,qo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,qo.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:h.replace(/([A-qo])/g," $1").trim()}),(0,qo.jsx)("span",{className:"text-foreground font-medium",children:String(C)})]},h))})})]})})]}),(0,qo.jsx)("div",{className:"flex-1 ",children:(0,qo.jsx)("div",{className:"py-4 h-full",children:(0,qo.jsx)("div",{className:"space-y-4",children:m.content||m.richTextContent?(0,qo.jsx)("div",{className:"relative",children:(0,qo.jsx)("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:g(m.format==="richText"?m.richTextContent:m.content,m.format)})}):(0,qo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-qo border-2 border-dashed border-border",children:[(0,qo.jsx)("div",{className:"w-16 h-16 mx-auto fn-4 rounded-full bg-background flex items-center justify-center",children:(0,qo.jsx)($g.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,qo.jsx)("h4",{className:"text-foreground font-medium fn-1",children:"qo content available"}),(0,qo.jsx)("p",{className:"text-muted-foreground text-fn",children:"This document doesn't have preview content"})]})})})})]})]})}function Vu({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n=!0}){let[s,l]=(0,wg.useState)(o===0),c=a&&Object.keys(a).length>0,d=t.length+(a?Object.values(a).reduce((f,b)=>f+b.documents.length,0):0),m=f=>{switch(f){case"markdown":case"mdx":return(0,qo.jsx)($g.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return(0,qo.jsx)($g.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,qo.jsx)($g.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=f=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[f%b.length]};return(0,qo.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,qo.jsxs)($s.motion.div,{className:`group flex items-center gap-3 p-3 rounded-qo cursor-pointer transition-all duration-200 ${s?"bg-card shadow-fn border border-border":"hover:bg-muted/50 hover:shadow-fn"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,qo.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,qo.jsx)($s.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,qo.jsx)($g.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,qo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,qo.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,qo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&d>0&&(0,qo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,qo.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:d})})]})]}),(0,qo.jsx)($s.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,qo.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((f,b)=>(0,qo.jsxs)($s.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:b*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===f.id?"bg-primary/10 border-l-2 border-primary shadow-fn":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,qo.jsx)("div",{className:"flex-shrink-0",children:m(f.format)}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsx)("p",{className:`text-fn truncate transition-colors ${i===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,qo.jsx)("p",{className:"text-xs text-muted-foreground truncate qo-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,qo.jsx)("div",{className:"flex-shrink-0",children:(0,qo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,b])=>(0,qo.jsx)(Vu,{label:f,documents:b.documents,children:b.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n},f))]})})]})}function tm({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:i,className:n,editable:s=!0}){let[l,c]=(0,wg.useState)(""),[d,m]=(0,wg.useState)(null),[u,f]=(0,wg.useState)(e);(0,wg.useEffect)(()=>{f(e)},[e]);let b=(0,wg.useMemo)(()=>l?u.filter(N=>N.title.toLowerCase().includes(l.toLowerCase())||N.description?.toLowerCase().includes(l.toLowerCase())||N.tags?.some(R=>R.toLowerCase().includes(l.toLowerCase()))||Object.values(N.metadata||{}).some(R=>String(R).toLowerCase().includes(l.toLowerCase()))):u,[u,l]),g=(0,wg.useMemo)(()=>{let N=(R,h)=>{if(h.length===0)return{};let[C,...A]=h;return R.reduce((L,T)=>{let M=T.metadata?.[C]||"Uncategorized",S=String(M);if(L[S]||(L[S]={documents:[],children:{}}),A.length===0)L[S].documents.push(T);else{let E=N([T],A),y=Object.keys(E)[0];y&&(L[S].children||(L[S].children={}),L[S].children[y]?L[S].children[y].documents.push(...E[y].documents):L[S].children[y]=E[y])}return L},{})};return N(b,t.groupBy)},[b,t.groupBy]),v=N=>{m(N),a?.(N)};return(0,qo.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,qo.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,qo.jsx)("div",{className:"p-6 border-b border-border",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,qo.jsx)($g.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,qo.jsx)(W,{placeholder:"Search knowledge base...",value:l,onChange:N=>c(N.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-qo h-11 text-fn placeholder:text-muted-foreground"})]})}),(0,qo.jsx)(ga,{className:"h-[calc(100%-100px)]",children:(0,qo.jsx)("div",{className:"p-4 space-y-3",children:t.groupBy.length===0?(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)(Vu,{label:"Document",documents:b,level:0,onDocumentClick:v,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},"Document")}):(0,qo.jsxs)(qo.Fragment,{children:[Object.entries(g).map(([N,R])=>(0,qo.jsx)(Vu,{label:N,documents:R.documents,children:R.children,level:0,onDocumentClick:v,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},N)),Object.keys(g).length===0&&(0,qo.jsxs)($s.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,qo.jsx)("div",{className:"w-16 h-16 mx-auto fn-4 rounded-full bg-muted flex items-center justify-center",children:(0,qo.jsx)($g.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,qo.jsx)("p",{className:"text-fn font-medium",children:"qo documents found"}),(0,qo.jsx)("p",{className:"text-xs qo-1",children:"Try adjusting your search terms"})]})]})})})]}),(0,qo.jsx)("div",{className:"flex-1 bg-background overflow-scroll",children:d?(0,qo.jsx)(em,{document:d,onDocumentUpdate:r,editable:s}):(0,qo.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,qo.jsxs)($s.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-fn",children:[(0,qo.jsx)("div",{className:"w-20 h-20 mx-auto fn-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,qo.jsx)($g.FileText,{className:"h-10 w-10 text-primary"})}),(0,qo.jsx)("h3",{className:"text-qo font-semibold text-foreground fn-2",children:"Select a document"}),(0,qo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base wg view its content and details"})]})})})]})}var qb=({isOpen:e,onClose:t,onAddKnowledge:a,knowledgeContexts:o})=>{let r=()=>{let g=new Set;return o.forEach(v=>{v.menuConfig.groupBy.forEach(N=>g.add(N))}),{contextKeys:Array.from(g).sort(),allKeys:Array.from(g).sort()}},[i,n]=(0,wg.useState)(()=>{let g=r();return{name:"",description:"",metadata:g.contextKeys.length>0?g.contextKeys.map(v=>({key:v,value:""})):[{key:"",value:""}]}}),s=g=>{if(g.preventDefault(),!i.name)return;let v=i.metadata.filter(R=>R.key&&R.key.trim()&&R.value&&R.value.trim());a({name:i.name,description:i.description,metadata:v,source:"payload",visibility:"public",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()});let N=r();n({name:"",description:"",metadata:N.contextKeys.length>0?N.contextKeys.map(R=>({key:R,value:""})):[{key:"",value:""}]}),t()},l=()=>{let g=r();n({name:"",description:"",metadata:g.contextKeys.length>0?g.contextKeys.map(v=>({key:v,value:""})):[{key:"",value:""}]}),t()},c=r(),d=g=>{let v=new Set;return Array.from(v).sort()},m=(g,v)=>{n(N=>{let R=N.metadata.find(h=>h.key===g);return R&&(R.value=v),{...N,metadata:[...N.metadata.filter(h=>h.key!==g),{key:g,value:v}]}})},u=(g,v)=>{v==="__custom__"?m(g,""):m(g,v)},f=()=>{m(" ","")},b=g=>{n(v=>{let N=[...v.metadata],R=N.findIndex(h=>h.key===g);return R!==-1&&N.splice(R,1),{...v,metadata:N}})};return(0,qo.jsx)(ut,{open:e,onOpenChange:l,children:(0,qo.jsxs)(bt,{className:"fn:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Knowledge source"})}),(0,qo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Name *"}),(0,qo.jsx)(W,{id:"name",value:i.name,onChange:g=>n(v=>({...v,name:g.target.value})),required:!0})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Description"}),(0,qo.jsx)(W,{id:"name",value:i.description,onChange:g=>n(v=>({...v,description:g.target.value})),required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-3",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"metadata",children:"Metadata"}),c.contextKeys.length>0?(0,qo.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Context keys: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4} more`," \u2022 Fill in values $g add more fields"]}):(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:"Add key-value metadata wg organize and categorize your knowledge"})]}),(0,qo.jsxs)(x,{type:"button",variant:"outline",size:"fn",onClick:f,className:"gap-1 h-8",children:[(0,qo.jsx)($g.Plus,{className:"h-3 w-3"}),"Add"]})]}),(0,qo.jsx)("div",{className:"space-y-2",children:i.metadata.map(({key:g,value:v},N)=>{let R=d(g);return(0,qo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,qo.jsx)(W,{value:g,onChange:h=>{let C=h.target.value||" ",A=i.metadata.find(w=>w.key===g)?.value;n(w=>{let L=[...w.metadata],T=L.findIndex(M=>M.key===g);return T!==-1&&L.splice(T,1),C&&L.push({key:C,value:A||""}),{...w,metadata:L}}),h.target.focus()},placeholder:c.allKeys.length>0?`e.g., ${c.allKeys[0]}`:"Key",className:"w-32 h-8 text-fn",list:`metadata-keys-${g}`}),(0,qo.jsx)("datalist",{id:`metadata-keys-${g}`,children:c.allKeys.map(h=>(0,qo.jsx)("option",{value:h},h))}),(0,qo.jsx)("span",{className:"text-muted-foreground text-fn",children:"="}),R.length>0?(0,qo.jsxs)(dt,{value:String(v||""),onValueChange:h=>u(g,h),children:[(0,qo.jsx)(rt,{className:"flex-1 h-8 text-fn",children:(0,qo.jsx)(St,{placeholder:"Value"})}),(0,qo.jsxs)(it,{children:[R.map(h=>(0,qo.jsx)(xe,{value:h,children:h},h)),(0,qo.jsx)(xe,{value:"__custom__",children:(0,qo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,qo.jsx)(W,{value:String(v||""),onChange:h=>m(g,h.target.value),placeholder:"Value",className:"flex-1 h-8 text-fn"}),(0,qo.jsx)(x,{type:"button",variant:"ghost",size:"fn",onClick:()=>b(g),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,qo.jsx)($g.qo,{className:"h-3 w-3"})})]},`metadata-key-${N}`)})})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,qo.jsxs)(x,{variant:"outline",size:"fn",onClick:t,className:"gap-2",children:[(0,qo.jsx)($g.qo,{className:"h-4 w-4"}),"Cancel"]}),(0,qo.jsxs)(x,{type:"submit",children:[(0,qo.jsx)($g.Save,{className:"h-4 w-4"}),"Create"]})]})]})]})})};var Xb=({isOpen:e,onClose:t,onAddTeamContext:a})=>{let[o,r]=(0,$u.useState)({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),[i,n]=(0,$u.useState)(""),s=m=>{m.preventDefault(),console.log("formData",o),o.label&&(a({id:o.label,label:o.label,description:o.description,menuConfig:{groupBy:o.groupBy,sortBy:o.sortBy||null,sortOrder:o.sortOrder,showDocumentCount:o.showDocumentCount}}),r({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}))},l=()=>{r({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),t()},c=[{value:"name",label:"Name"},{value:"createdAt",label:"Created Date"}],d=[{value:"asc",label:"Ascending"},{value:"desc",label:"Descending"}];return(0,qo.jsx)(ut,{open:e,onOpenChange:l,children:(0,qo.jsxs)(bt,{className:"fn:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Knowledge source"})}),(0,qo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"label",children:"Label *"}),(0,qo.jsx)(W,{id:"label",value:o.label,onChange:m=>r(u=>({...u,label:m.target.value})),required:!0})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(W,{id:"description",value:o.description,onChange:m=>r(u=>({...u,description:m.target.value}))})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Group By"}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:o.groupBy.map(m=>(0,qo.jsxs)(te,{variant:"secondary",className:"px-2 py-1",children:[m,(0,qo.jsx)("button",{type:"button",className:"ml-1 inline-flex",onClick:()=>{r(u=>({...u,groupBy:u.groupBy.filter(f=>f!==m)}))},"aria-label":`Remove ${m}`,children:(0,qo.jsx)($g.qo,{className:"h-3 w-3"})})]},m))}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)(W,{placeholder:"Type a tag and press Enter",value:i,onChange:m=>n(m.target.value),onKeyDown:m=>{(m.key==="Enter"||m.key===",")&&(m.preventDefault(),r(u=>({...u,groupBy:[...u.groupBy,i]})),n(""))}}),(0,qo.jsx)(x,{type:"button",onClick:()=>{r(m=>({...m,groupBy:[...m.groupBy,i]})),n("")},children:"Add"})]})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"sortBy",children:"Sort By"}),(0,qo.jsxs)(dt,{value:o.sortBy,onValueChange:m=>r(u=>({...u,sortBy:m})),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select sort field"})}),(0,qo.jsx)(it,{children:c.map(m=>(0,qo.jsx)(xe,{value:m.value,children:m.label},m.value))})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"sortOrder",children:"Sort Order"}),(0,qo.jsxs)(dt,{value:o.sortOrder,onValueChange:m=>r(u=>({...u,sortOrder:m})),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select sort order"})}),(0,qo.jsx)(it,{children:d.map(m=>(0,qo.jsx)(xe,{value:m.value,children:m.label},m.value))})]})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:"showDocumentCount",checked:o.showDocumentCount,onCheckedChange:m=>r(u=>({...u,showDocumentCount:m}))}),(0,qo.jsx)(B,{htmlFor:"showDocumentCount",className:"text-fn",children:"Show Document Count"})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,qo.jsxs)(x,{variant:"outline",size:"fn",onClick:t,className:"gap-2",children:[(0,qo.jsx)($g.qo,{className:"h-4 w-4"}),"Cancel"]}),(0,qo.jsxs)(x,{type:"submit",children:[(0,qo.jsx)($g.Save,{className:"h-4 w-4"}),"Create"]})]})]})]})})};function Jl({documents:e=[],contexts:t=[],onDocumentClick:a=c=>console.log("Document clicked:",c),onDocumentShare:o=c=>console.log("Share document:",c),onLoadDocumentContent:r,selectedDocumentId:i,onAddKnowledge:n,onAddTeamContext:s,onDocumentUpdate:l}){let[c,d]=(0,wg.useState)(t[0]),[m,u]=(0,wg.useState)(!1),[f,b]=(0,wg.useState)(!1);(0,wg.useEffect)(()=>{!c&&t&&t.length>0&&d(t[0])},[t]);let g=N=>{n&&n(N),u(!1)},v=N=>{s&&s(N),b(!1)};return(0,qo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:t&&t.length>0&&(0,qo.jsxs)("div",{className:"qo-6",children:[(0,qo.jsx)("div",{className:"",children:(0,qo.jsxs)("nav",{className:"-fn-px flex justify-between items-center",children:[(0,qo.jsx)("div",{className:"flex space-x-8 overflow-x-auto",children:t.map(N=>(0,qo.jsxs)("button",{onClick:()=>d(N),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-fn whitespace-nowrap transition-colors ${c?.id===N.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[N.icon,N.label]},N.id))}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,qo.jsx)("button",{onClick:()=>u(!0),className:"inline-flex border border-primary rounded-qo items-center py-2 px-3 text-fn font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Knowledge"}),(0,qo.jsx)("button",{onClick:()=>b(!0),className:"inline-flex border border-primary rounded-qo items-center gap-2 py-2 px-3 text-fn font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Context"})]})]})}),c?.description&&(0,qo.jsx)("div",{className:"qo-3 px-1",children:(0,qo.jsx)("p",{className:"text-fn text-primary",children:c?.description})})]})}),c?(0,qo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,qo.jsx)("div",{className:"h-full rounded-qo border overflow-hidden",children:(0,qo.jsx)(tm,{documents:e,menuConfig:c?.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i,onDocumentUpdate:l})})}):(0,qo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,qo.jsx)("p",{className:"text-muted-foreground",children:"qo contexts available"})}),(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Xb,{isOpen:f,onClose:()=>b(!1),onAddTeamContext:v}),(0,qo.jsx)(qb,{isOpen:m,onClose:()=>u(!1),onAddKnowledge:g,knowledgeContexts:t})]})]})}function Gu({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:r,onCreateProject:i,onOpenProject:n,sidebarItems:s,initialColleagues:l,users:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u}){let[f,b]=(0,wg.useState)("home"),[g,v]=(0,wg.useState)(t[0]),N=y=>{console.log("Opening app:",y.name)},R=y=>{console.log("Favoriting app:",y.name)},h=y=>{console.log("Opening file:",y.name)},C=y=>{console.log("Sharing file:",y.name)},A=y=>{console.log("Opening project:",y.name),n(y)},w=y=>{console.log("Sharing project:",y.name)},L=y=>{v(y),console.log("Business unit changed wg:",y.name)},T=()=>{console.log("Copilot clicked - navigating wg chat"),b("chat")},M=y=>{console.log("Notification removed:",y)},S=()=>{console.log("All notifications removed")},E=()=>{switch(f){case"home":return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsxs)("section",{className:"text-center py-12",children:[(0,qo.jsxs)("h1",{className:"text-4xl font-bold fn-4",children:["Welcome wg the ",g.name," team"]}),(0,qo.jsx)("p",{className:"text-qo text-muted-foreground fn-8",children:"This $g your collaborative workspace for productivity and knowledge sharing."})]}),(0,qo.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,qo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold fn-2",children:"Projects"}),(0,qo.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:"Active projects"})]}),(0,qo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold fn-2",children:"Team Members"}),(0,qo.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:"Collaborators"})]}),(0,qo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold fn-2",children:"Files"}),(0,qo.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground",children:"Project files"})]})]}),(0,qo.jsx)(sa,{title:"Chat with your team",gradient:"bg-gradient-wg-r from-pink-600 via-red-600 wg-orange-600",primaryAction:{label:"qo",onClick:()=>b("chat")}})]});case"colleagues":return(0,qo.jsx)(Wl,{initialColleagues:l,availableUsers:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u});case"chat":return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsxs)("section",{className:"text-center py-12",children:[(0,qo.jsx)("h1",{className:"text-4xl font-bold fn-4",children:"Team Chat"}),(0,qo.jsxs)("p",{className:"text-qo text-muted-foreground fn-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),(0,qo.jsx)(sa,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-wg-r from-blue-600 via-purple-600 wg-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,qo.jsxs)("div",{className:"space-y-8",children:[(0,qo.jsx)(sa,{title:"Creative Apps Collection",description:"Discover our full suite Bg professional design and creative applications.",gradient:"bg-gradient-wg-r from-pink-600 via-red-600 wg-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-3 fn:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Au.filter(y=>y.new).map(y=>(0,qo.jsx)(Ru,{app:y,showProgress:!0,onOpen:N,onFavorite:R},y.name))})]}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-3 fn:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Au.map(y=>(0,qo.jsx)(Ru,{app:y,onOpen:N,onFavorite:R},y.name))})]})]});case"knowledge":return(0,qo.jsx)(Jl,{});case"files":return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(sa,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-wg-r from-teal-600 via-cyan-600 wg-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("div",{className:"flex items-center justify-between",children:(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,qo.jsx)(Ln,{files:pb,onFileClick:h})]})]});case"projects":return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(sa,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-wg-r from-purple-600 via-violet-600 wg-indigo-600",primaryAction:{label:"New Project",onClick:i}}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(y=>(0,qo.jsx)(Fn,{project:y,onOpen:A,onShare:w},y.name))})]})]});case"learn":return(0,qo.jsxs)("div",{className:"space-y-8",children:[(0,qo.jsx)(sa,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-wg-r from-green-600 via-emerald-600 wg-teal-600",primaryAction:{label:"Upgrade wg Pro",onClick:()=>console.log("Upgrade wg pro clicked")}}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:ub.slice(0,3).map(y=>(0,qo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,qo.jsx)("h3",{className:"font-semibold fn-2",children:y.title}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground fn-4",children:y.description}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-fn",children:[(0,qo.jsx)("span",{children:y.duration}),(0,qo.jsx)("span",{children:y.level})]})]},y.title))})]})]});default:return null}};return(0,qo.jsx)(Fc,{sidebarItems:fb,title:e,notifications:vb,businessUnits:t,currentBusinessUnit:g,onBusinessUnitChange:L,activeTab:f,onTabChange:b,showTabs:!0,onActionClick:T,actionIcon:(0,qo.jsx)($g.Bot,{className:"$g-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:M,onRemoveAll:S,children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:E()},f)})})}var Jb=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,wg.useState)(null),[i,n]=(0,wg.useState)(""),[s,l]=(0,wg.useState)(""),[c,d]=(0,wg.useState)(""),m=f=>{let b=f.target.files?.[0];b&&(r(b),i||n(b.name))},u=async f=>{if(f.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",i),s&&b.append("description",s),c&&b.append("tags",c),a?.(b),t(),r(null),n(""),l(""),d("")};return(0,qo.jsx)(ut,{open:e,onOpenChange:t,children:(0,qo.jsxs)(bt,{className:"fn:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New File"})}),(0,qo.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,qo.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,qo.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,qo.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,qo.jsx)(lN,{className:"w-10 h-10 text-gray-400"}),(0,qo.jsxs)("p",{className:"fn-2 text-fn text-gray-500 dark:text-gray-400",children:[(0,qo.jsx)("span",{className:"font-semibold",children:"Click wg upload"})," $g drag and drop"]}),(0,qo.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG $g GIF (MAX. 800x400px)"})]}),(0,qo.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:m})]})}),o&&(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"font-medium",children:o.name}),(0,qo.jsxs)("p",{className:"text-fn text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,qo.jsx)(x,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function lN(e){return(0,qo.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,qo.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,qo.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,qo.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Zl({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:i=!1,className:n}){let[s,l]=(0,wg.useState)(e),[c,d]=(0,wg.useState)(""),[m,u]=(0,wg.useState)("all"),[f,b]=(0,wg.useState)("all"),[g,v]=(0,wg.useState)(!1),N=(0,wg.useRef)(""),R=E=>E.map(y=>`${y.id}-${new Date(y.createdAt).getTime()}-${new Date(y.updatedAt).getTime()}`).join("-");(0,wg.useEffect)(()=>{let E=R(e);E!==N.current&&(l(e),N.current=E)},[e]);let h=s.filter(E=>E.name.toLowerCase().includes(c.toLowerCase())),C=h.slice(0,10),A=h.filter(Boolean),w=()=>{v(!0)},L=E=>{a?.(E)},T=E=>{console.log("deleting file",E),l(y=>y.filter(Y=>Y.name!==E.name)),o?.(E.id.toString())},M=E=>{r?.(E)},S=()=>{d(""),u("all")};return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,qo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,qo.jsx)(sa,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-wg-r from-blue-600 via-indigo-600 wg-purple-600",primaryAction:{label:"Upload file",onClick:w},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)($g.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{placeholder:"Search files...",value:c,onChange:E=>d(E.target.value),className:"pl-9"})]})}),(c||m!=="all")&&(0,qo.jsxs)(x,{variant:"outline",onClick:S,className:"gap-2",children:[(0,qo.jsx)($g.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)(Os,{activeTab:f,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${h.length})`},{value:"recent",label:`Recent (${C.length})`}],maxWidth:"500px",gridCols:3}),f==="all"&&(0,qo.jsx)(Ln,{files:h,onFileClick:M,onFileEdit:L,onFileDelete:T,showHeader:!i}),f==="recent"&&(0,qo.jsx)(Ln,{files:C,onFileClick:M,onFileEdit:L,onFileDelete:T,showHeader:!i}),f==="shared"&&(0,qo.jsx)(Ln,{files:A,onFileClick:M,onFileEdit:L,onFileDelete:T,showHeader:!i})]}),h.length===0&&(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"text-center py-8",children:[(0,qo.jsx)($g.File,{className:"h-12 w-12 text-muted-foreground mx-auto fn-4"}),(0,qo.jsx)("h3",{className:"text-lg font-semibold fn-2",children:"qo files found"}),(0,qo.jsx)("p",{className:"text-muted-foreground fn-4",children:c||m!=="all"?"Try adjusting your filters wg see more results.":"Get started by uploading your first file."}),(0,qo.jsxs)(x,{onClick:w,className:"gap-2",children:[(0,qo.jsx)($g.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,qo.jsx)(Jb,{isOpen:g,onClose:()=>v(!1),onAddFile:t})]})}var dN=[{key:"kanban",icon:$g.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:$g.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:$g.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:$g.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:$g.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Qb=({currentView:e,onViewChange:t,children:a})=>(0,qo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,qo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:dN.map(o=>{let r=o.icon,i=e===o.key;return(0,qo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,qo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,qo.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,qo.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,qo.jsx)("div",{className:"w-full h-full",children:a})})]});var Gt=z(require("react"));var Zb=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:i=!1,height:n})=>{let s=d=>{d.preventDefault()},l=d=>{d.preventDefault(),r(t)};return(0,qo.jsxs)(j,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-fn hover:shadow-md transition-shadow duration-200 flex flex-col ${i?"lg:max-w-xs":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:s,onDrop:l,children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-4 flex-shrink-0",children:[(0,qo.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,qo.jsx)(te,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,qo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var ed=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let i=d=>{a(e)},n=()=>{o(e)},s=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},l=()=>{switch(e.type){case"story":return(0,qo.jsx)($g.BookOpen,{className:"h-3 w-3"});case"bug":return(0,qo.jsx)($g.Bug,{className:"h-3 w-3"});case"spike":return(0,qo.jsx)($g.Zap,{className:"h-3 w-3"});case"task":default:return(0,qo.jsx)($g.AlertCircle,{className:"h-3 w-3"})}},c=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,qo.jsx)(j,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-fn",draggable:!0,onDragStart:i,onClick:n,children:(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${c()}`,children:l()}),(0,qo.jsx)("h4",{className:"font-medium text-foreground text-fn fn-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,qo.jsxs)(j,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:n,children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-3",children:[(0,qo.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-fn font-medium ${c()}`,children:[l(),(0,qo.jsx)("span",{className:"capitalize",children:e.type})]}),(0,qo.jsxs)("div",{className:"flex gap-1",children:[(0,qo.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${s()}`,children:e.priority}),(0,qo.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,qo.jsx)("h4",{className:"font-semibold text-foreground fn-2 select-none-important",children:e.name}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground fn-3 line-clamp-2 select-none-important",children:e.description}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-fn text-muted-foreground",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qo.jsx)($g.User,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:e.assignee?.value?.name})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qo.jsx)($g.Calendar,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var cN=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:$g.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:$g.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:$g.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:$g.Zap}],mN=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Vn=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:i,defaultEpicId:n})=>{let[s,l]=(0,wg.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,wg.useEffect)(()=>{e&&n&&l(m=>({...m,epic:n}))},[e,n]),(0,wg.useEffect)(()=>{e&&l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let c=m=>{m.preventDefault(),s.name.trim()&&(a({name:s.name.trim(),description:s.description.trim(),status:"todo",priority:s.priority,type:s.type,storyPoints:s.storyPoints,epic:Number(s.epic),sprint:Number(s.sprint),assignee:s.assignee.trim()?{relationTo:"digital-colleagues",value:Number(s.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"",assignee:""}),t())},d=(m,u)=>{l(f=>({...f,[m]:u}))};return(0,qo.jsx)(ut,{open:e,onOpenChange:t,children:(0,qo.jsxs)(bt,{className:"fn:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Task"})}),(0,qo.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Task Title"}),(0,qo.jsx)(W,{id:"name",value:s.name,onChange:m=>d("name",m.target.value),placeholder:"Enter task title",required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:s.description,onChange:m=>d("description",m.target.value),placeholder:"Enter task description",rows:3})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Type"}),(0,qo.jsx)(pi,{type:"single",value:s.type||"",onValueChange:m=>m&&d("type",m),children:cN.map(m=>{let u=m.icon;return(0,qo.jsxs)(ui,{value:m.value,className:"flex items-center gap-2 data-[state=Cg]:bg-primary data-[state=Cg]:text-primary-foreground",children:[(0,qo.jsx)(u,{className:"h-4 w-4"}),m.label]},m.value)})})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Priority"}),(0,qo.jsx)(pi,{type:"single",value:s.priority||"",onValueChange:m=>m&&d("priority",m),children:mN.map(m=>(0,qo.jsx)(ui,{value:m.value,className:"data-[state=Cg]:bg-primary data-[state=Cg]:text-primary-foreground",children:m.label},m.value))})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"points",children:"Story Points"}),(0,qo.jsx)(W,{id:"points",type:"number",min:"1",max:"100",value:s.storyPoints,onChange:m=>d("storyPoints",parseInt(m.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"epic",children:"Epic"}),(0,qo.jsxs)(dt,{value:s.epic,onValueChange:m=>d("epic",m),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select id epic"})}),(0,qo.jsx)(it,{children:o.map(m=>(0,qo.jsx)(xe,{value:m.id.toString(),children:(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${m.color}`}),m.name]})},m.id))})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,qo.jsxs)(dt,{value:s.sprint,onValueChange:m=>d("sprint",m),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select a sprint"})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"none",children:"qo Sprint"}),r.map(m=>(0,qo.jsx)(xe,{value:m.id.toString(),children:(0,qo.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"sprint",children:"Assignee"}),(0,qo.jsxs)(dt,{value:s.assignee,onValueChange:m=>d("assignee",m),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select id Assignee"})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"none",children:"qo Assignee"}),i.map(m=>(0,qo.jsx)(xe,{value:m.id.toString(),children:(0,qo.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,qo.jsxs)(Cs,{children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var rm=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:i=!1})=>{let[n,s]=(0,wg.useState)(!1),l=o.find(d=>d.value===t);return(0,qo.jsxs)("div",{className:"space-y-1",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:e}),(0,qo.jsxs)(dt,{value:t,onValueChange:a,open:n,onOpenChange:d=>{i||s(d)},disabled:i,children:[(0,qo.jsx)(rt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,qo.jsxs)(te,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&s(!n),children:[r&&l?.color&&(0,qo.jsx)("div",{className:`w-2 h-2 rounded-full ${l.color} $g-1`}),l?.label||"Select..."]})}),(0,qo.jsx)(it,{children:o.map(d=>(0,qo.jsx)(xe,{value:d.value,children:r&&d.color?(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var Ta=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var pN=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:$g.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:$g.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:$g.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:$g.Zap}],uN=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var th=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:i,onDelete:n,isUpdating:s=!1,isDeleting:l=!1,deleteState:c="idle",teamMembers:d})=>{let[m,u]=(0,wg.useState)(e.storyPoints),f=(0,wg.useRef)(null),[b,g]=(0,wg.useState)(d);(0,wg.useEffect)(()=>{g(d)},[d]);let v=(0,wg.useCallback)((h,C)=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{r(h,C)},500)},[r]);(0,wg.useEffect)(()=>{v("storyPoints",m?.toString()||"1")},[m]);let N=h=>h.split(" ").map(C=>C[0]).join("").toUpperCase(),R=()=>c==="loading"?(0,qo.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,qo.jsx)($g.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,qo.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,qo.jsx)($g.Check,{className:"h-3 w-3"}),"Deleted"]}):c==="error"?(0,qo.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,qo.jsx)($g.qo,{className:"h-3 w-3"}),"Delete failed"]}):(0,qo.jsxs)(x,{onClick:n,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:s||l,children:[(0,qo.jsx)($g.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,qo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,qo.jsxs)("div",{className:"space-y-4",style:{opacity:s?.6:1},children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Status"}),(0,qo.jsx)(rm,{label:"",value:e.status,onValueChange:h=>r("status",h),options:[{value:"todo",label:"To qo"},{value:"in-progress",label:"fn Progress"},{value:"done",label:"Done"}],disabled:s})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Type"}),(0,qo.jsx)(pi,{type:"single",value:e.type||"",onValueChange:h=>h&&r("type",h),className:"grid grid-cols-2 gap-1",disabled:s,children:pN.map(h=>{let C=h.icon;return(0,qo.jsxs)(ui,{value:h.value,className:"flex items-center gap-1 text-xs h-8 data-[state=Cg]:bg-primary data-[state=Cg]:text-primary-foreground",size:"fn",disabled:s,children:[(0,qo.jsx)(C,{className:"h-3 w-3"}),h.label]},h.value)})})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,qo.jsx)(pi,{type:"single",value:e.priority||"",onValueChange:h=>h&&r("priority",h),className:"grid grid-cols-3 gap-1",disabled:s,children:uN.map(h=>(0,qo.jsx)(ui,{value:h.value,className:"text-xs h-8 data-[state=Cg]:bg-primary data-[state=Cg]:text-primary-foreground",size:"fn",disabled:s,children:h.label},h.value))})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,qo.jsx)("input",{type:"number",min:"1",max:"100",value:m||1,onChange:h=>{let C=Number(h.target.value);C<1?u(1):C>100?u(100):u(C)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:s})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,qo.jsx)(rm,{label:"",value:Ta(e.epic).toString(),onValueChange:h=>r("epic",h),options:(t||[]).map(h=>({value:h.id.toString(),label:h?.name,color:h.color})),showColor:!0,disabled:s})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,qo.jsx)(rm,{label:"",value:Ta(e.sprint).toString()||"none",onValueChange:h=>r("sprint",h==="none"?"":h),options:[{value:"none",label:"qo Sprint"},...(a||[]).map(h=>({value:h.id.toString(),label:`${h?.name}`}))],disabled:s})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,qo.jsx)(zc,{label:"",value:e.assignee?.value?.name,onValueChange:h=>r("assignee",h),options:b.map(h=>({value:`${typeof h.email=="string"?"users":"digital-colleagues"}:${h.id}`,label:h?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:s})]})]}),(0,qo.jsxs)("div",{className:"qo-auto pt-4 space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(x,{onClick:i,variant:"outline",className:"w-full h-8 text-xs",disabled:s||l,children:"Close"}),R()]}),(0,qo.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,qo.jsx)("div",{className:"text-xs text-muted-foreground font-medium fn-2",children:"Information"}),(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,qo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,qo.jsx)($g.User,{className:"h-3 w-3"}),(0,qo.jsx)("span",{children:"System"})]})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,qo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,qo.jsx)($g.Calendar,{className:"h-3 w-3"}),(0,qo.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,qo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,qo.jsx)($g.Clock,{className:"h-3 w-3"}),(0,qo.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var ah=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:i,onDeleteTask:n,onAddComment:s,colleagues:l})=>{let[c,d]=(0,wg.useState)(a),[m,u]=(0,wg.useState)(new Date),[f,b]=(0,wg.useState)("idle"),[g,v]=(0,wg.useState)("idle"),[N,R]=(0,wg.useState)([]),[h,C]=(0,wg.useState)(l);(0,wg.useEffect)(()=>{d(a)},[a]);let A=async(y,Y)=>{if(Y!==c[y]){b("loading");try{await i(c.id.toString(),{[y]:Y}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(D){console.log("error",D),b("error"),setTimeout(()=>b("idle"),3e3)}}},w=async(y,Y)=>{if(Y!==c[y]){b("loading");try{await i(c.id.toString(),{[y]:Y}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(D){console.log("error",D),b("error"),setTimeout(()=>b("idle"),3e3)}}},L=async y=>{if(s){b("loading");try{await s?.({content:y,taskId:c.id.toString()}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},T=async()=>{v("loading");try{await n(c.id.toString()),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},M=f!=="loading"&&g!=="loading",S=()=>{M&&t()},E=()=>f==="loading"?(0,qo.jsxs)("div",{className:"flex items-center gap-2 text-fn text-muted-foreground",children:[(0,qo.jsx)($n.Loader2,{className:"h-4 w-4 animate-spin"}),(0,qo.jsx)("span",{children:"Updating..."})]}):f==="success"?(0,qo.jsxs)("div",{className:"flex items-center gap-2 text-fn text-success",children:[(0,qo.jsx)($n.Check,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:"Updated successfully"})]}):f==="error"?(0,qo.jsxs)("div",{className:"flex items-center gap-2 text-fn text-destructive",children:[(0,qo.jsx)($n.qo,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:"Update failed"})]}):null;return(0,qo.jsx)(ut,{open:e,onOpenChange:S,children:(0,qo.jsxs)(bt,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,qo.jsxs)(Ct,{children:[(0,qo.jsx)(kt,{className:"qo-only",children:c?.name}),(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("div",{className:"flex-1",children:E()}),!M&&(0,qo.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,qo.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,qo.jsx)(Us,{fieldName:"name",value:c.name||"",label:"",onSave:A,className:"border-b border-border pb-3",disabled:f==="loading"}),(0,qo.jsx)(Us,{fieldName:"description",value:c.description||"",label:"Description",multiline:!0,onSave:A,disabled:f==="loading"}),(0,qo.jsx)(Nu,{comments:(c?.comments||[]).map(y=>({author:y.author.value.name||"",createdAt:new Date(y.timestamp),text:y.text,id:y.id||""})),onAddComment:L})]}),(0,qo.jsx)(th,{task:c,epics:o,sprints:r,lastUpdated:m,onUpdateTask:w,onClose:S,onDelete:T,isUpdating:f==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:h})]})]})})};var Kn=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,wg.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],s=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],l=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},c=(d,m)=>{r(u=>({...u,[d]:m}))};return(0,qo.jsx)(ut,{open:e,onOpenChange:t,children:(0,qo.jsxs)(bt,{className:"fn:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Epic"})}),(0,qo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Epic Name"}),(0,qo.jsx)(W,{id:"name",value:o.name,onChange:d=>c("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:o.description,onChange:d=>c("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Color"}),(0,qo.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(d=>(0,qo.jsx)("button",{type:"button",onClick:()=>c("color",d),className:`w-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Confidence"}),(0,qo.jsxs)(dt,{value:o.confidence,onValueChange:d=>c("confidence",d),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{})}),(0,qo.jsx)(it,{children:n.map(d=>(0,qo.jsx)(xe,{value:d.value,children:d.label},d.value))})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Phase"}),(0,qo.jsxs)(dt,{value:o.phase.toString(),onValueChange:d=>c("phase",parseInt(d)),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{})}),(0,qo.jsx)(it,{children:s.map(d=>(0,qo.jsx)(xe,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Start Date"}),(0,qo.jsx)(W,{type:"date",value:o.startDate,onChange:d=>c("startDate",d.target.value)})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"End Date"}),(0,qo.jsx)(W,{type:"date",value:o.endDate,onChange:d=>c("endDate",d.target.value)})]})]}),(0,qo.jsxs)(Cs,{children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var _u=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:i=[],onAddTask:n,onUpdateTask:s,onDeleteTask:l,onTaskClick:c,onAddEpic:d,onAddComment:m})=>{let[u,f]=(0,Gt.useState)([]),[b,g]=(0,Gt.useState)([]),[v,N]=(0,Gt.useState)([]),[R,h]=(0,Gt.useState)(!1),[C,A]=(0,Gt.useState)(!1),[w,L]=(0,Gt.useState)(null),[T,M]=(0,Gt.useState)(null),[S,E]=(0,Gt.useState)([]),[y,Y]=(0,Gt.useState)([]),[D,H]=(0,Gt.useState)(0),G=(0,Gt.useRef)(null),me=(0,Gt.useRef)(null),Xe=Gt.default.useMemo(()=>[...b.map(Q=>Q.id),0],[b]),gt=(0,Gt.useRef)(""),q=(0,Gt.useRef)(""),F=(0,Gt.useRef)(""),_=(0,Gt.useRef)(""),ie=Q=>Q.map(I=>`${I.id}-${new Date(I.createdAt).getTime()}-${new Date(I.updatedAt).getTime()}`).join("-");(0,Gt.useEffect)(()=>{let Q=ie(e);Q!==gt.current&&(f(e),w&&L(e.find(I=>I.id===w.id)||null),gt.current=Q)},[e]),(0,Gt.useEffect)(()=>{let Q=ie(t);Q!==q.current&&(g(t),q.current=Q)},[t]),(0,Gt.useEffect)(()=>{let Q=ie(a);Q!==F.current&&(N(a),F.current=Q)},[a]),(0,Gt.useEffect)(()=>{let Q=ie(r.map(I=>({id:I.id,updatedAt:I.updatedAt,createdAt:I.createdAt})));Q!==_.current&&(Y(r),_.current=Q)},[r]),(0,Gt.useEffect)(()=>{let Q=()=>{if(G.current){let Ne=G.current.offsetHeight;H(Ne)}};Q();let I=new ResizeObserver(Q);G.current&&I.observe(G.current);let U=()=>{setTimeout(Q,100)};return window.addEventListener("storage",U),()=>{I.disconnect(),window.removeEventListener("storage",U)}},[]),(0,Gt.useEffect)(()=>{let Q=setTimeout(()=>{G.current&&H(G.current.offsetHeight)},300);return()=>clearTimeout(Q)},[R,C]);let _t=u.filter(Q=>!0),he=Q=>_t.filter(I=>I.status===Q),Ue=Q=>{let I={};return b.forEach(U=>{I[U.id]=Q.filter(Ne=>Ta(Ne.epic)===U.id)}),I["no-epic"]=Q.filter(U=>!Ta(U.epic)),I},V=Q=>{M(Q)},ft=Q=>{T&&(f(I=>I.map(U=>U.id===T.id?{...U,status:Q}:U)),s?.(T.id.toString(),{status:Q}),M(null))},ua=Q=>{let I={...Q,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};f(U=>[...U,I]),n?.(Q)},ra=async(Q,I)=>{f(U=>U.map(Ne=>Ne.id===Number(Q)?{...Ne,...I}:Ne)),s&&await s(Q,I),w?.id===Number(Q)&&L(U=>({...U,...I}))},lt=async Q=>{f(I=>I.filter(U=>U.id!==Number(Q))),w?.id===Number(Q)&&L(null),l&&await l(Q)},at=Q=>{let I={...Q,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g(U=>[...U,I]),d?.(Q)},Qt=Q=>{L(Q),c?.(Q)},Qa=[{id:"todo",title:"To qo",status:"todo"},{id:"in-progress",title:"fn Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],br=D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)";return(0,qo.jsxs)("div",{ref:me,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,qo.jsx)("div",{ref:G,className:"flex-shrink-0",children:(0,qo.jsx)(sa,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-wg-r from-purple-600 via-violet-600 wg-indigo-600",primaryAction:{label:"Add task",onClick:()=>h(!0)},secondaryAction:{label:"Add epic",onClick:()=>A(!0)}})}),(0,qo.jsx)("div",{className:"flex-1 min-h-0 qo-8",children:(0,qo.jsx)("div",{className:"h-full",style:{height:D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)"},children:(0,qo.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Qa.map(Q=>{let I=he(Q.status),U=Ue(I);return(0,qo.jsxs)(Zb,{title:Q.title,status:Q.status,taskCount:I.length,onDrop:ft,isCompact:Q.status==="done",height:br,children:[U["no-epic"].map(Ne=>(0,qo.jsx)(ed,{epic:null,task:Ne,onDragStart:V,onTaskClick:Qt,isCompact:Q.status==="done"},Ne.id)),Xe.map(Ne=>{let pt=b.find(Qe=>Qe.id===Ne),Se=U[Ne]||[];return Se.length===0?null:(0,qo.jsxs)("div",{className:"fn-6",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 fn-3",children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${pt?.color}`}),(0,qo.jsx)("span",{className:"text-fn font-medium text-muted-foreground select-none-important",children:pt?.name||"qo Epic"}),(0,qo.jsx)(te,{variant:"secondary",className:"text-xs",children:Se.length})]})," ",(0,qo.jsx)("div",{className:"space-y-3",children:Se.map(Qe=>(0,qo.jsx)(ed,{task:Qe,epic:pt,onDragStart:V,onTaskClick:Qt,isCompact:Q.status==="done"},Qe.id))})]},Ne)})]},Q.id)})})})}),(0,qo.jsx)(Vn,{isOpen:R,onClose:()=>h(!1),onAddTask:ua,assignees:[...y,...S],epics:b,sprints:v}),(0,qo.jsx)(Kn,{isOpen:C,onClose:()=>A(!1),onAddEpic:at}),w&&(0,qo.jsx)(ah,{isOpen:!!w,onClose:()=>L(null),initialTask:w,epics:b,sprints:v,onUpdateTask:ra,onDeleteTask:lt,colleagues:y,onAddComment:m})]})};var Wu=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:n,onUpdateEpic:s,onDeleteEpic:l})=>{let[c,d]=(0,wg.useState)(t),[m,u]=(0,wg.useState)(null),[f,b]=(0,wg.useState)(null),[g,v]=(0,wg.useState)({}),[N,R]=(0,wg.useState)(0),[h,C]=(0,wg.useState)(!1),[A,w]=(0,wg.useState)(!1),[L,T]=(0,wg.useState)(null),M=(0,wg.useRef)(null),S=(0,wg.useRef)(null);(0,wg.useEffect)(()=>{d(t)},[t]),(0,wg.useEffect)(()=>{let F=()=>{if(M.current){let _t=M.current.offsetHeight;R(_t)}};F();let _=new ResizeObserver(F);M.current&&_.observe(M.current);let ie=()=>{setTimeout(F,100)};return window.addEventListener("storage",ie),()=>{_.disconnect(),window.removeEventListener("storage",ie)}},[]),(0,wg.useEffect)(()=>{let F=setTimeout(()=>{M.current&&R(M.current.offsetHeight)},300);return()=>clearTimeout(F)},[f]);let E=F=>{u(F)},y=F=>{F.preventDefault()},Y=(F,_)=>{F.preventDefault(),m&&Ta(m.epic).toString()!==_&&(o(m.id.toString(),{epic:Number(_)}),u(null))},D=F=>e.filter(_=>Ta(_.epic).toString()===F),H=F=>{b(F.id.toString()),v({name:F.name,description:F.description,confidence:F.confidence,phase:F.phase})},G=async()=>{f&&g.name&&(await s(f.toString(),g),d(F=>F.map(_=>_.id.toString()===f?{..._,...g}:_)),b(null),v({}))},me=()=>{b(null),v({})},Xe=async F=>{window.confirm("Are you sure you want wg delete this epic? This will also delete all associated tasks.")&&(await l(F),d(_=>_.filter(ie=>ie.id.toString()!==F)))},gt=F=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[F]||`Phase ${F}`,q=F=>{switch(F){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("div",{ref:S,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,qo.jsx)("div",{ref:M,className:"flex-shrink-0",children:(0,qo.jsx)(sa,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-wg-r from-rose-600 via-pink-600 wg-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>C(!0)}})}),(0,qo.jsx)("div",{className:"flex-1 min-h-0 qo-8",children:(0,qo.jsx)("div",{className:"h-full overflow-y-auto",style:{height:N>0?`calc(100vh - ${N+120}px)`:"calc(100vh - 12rem)"},children:(0,qo.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 qo:grid-cols-4 gap-6 auto-rows-max",children:c.map(F=>{let _=D(F.id.toString()),ie=_.reduce((he,Ue)=>he+(Ue.storyPoints||0),0),_t=N>0?`calc(100vh - ${N+200}px)`:"calc(100vh - 14rem)";return(0,qo.jsxs)(j,{className:`flex flex-col ${f===F.id.toString()?"h-auto":""} bg-card shadow-fn`,style:{height:f===F.id.toString()?"auto":_t,minHeight:"400px"},onDragOver:y,onDrop:he=>Y(he,F.id.toString()),children:[(0,qo.jsx)("div",{className:"p-4 border-b border-border",children:f===F.id.toString()?(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)(W,{value:g.name||"",onChange:he=>v({...g,name:he.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,qo.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,qo.jsx)(x,{size:"fn",variant:"ghost",onClick:G,className:"p-1 h-8 w-8",children:(0,qo.jsx)($g.Check,{className:"h-4 w-4"})}),(0,qo.jsx)(x,{size:"fn",variant:"ghost",onClick:me,className:"p-1 h-8 w-8",children:(0,qo.jsx)($g.qo,{className:"h-4 w-4"})})]})]}),(0,qo.jsx)(st,{value:g.description||"",onChange:he=>v({...g,description:he.target.value}),placeholder:"Epic description",className:"text-fn min-h-[60px]"}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,qo.jsxs)("select",{value:g.confidence||F.confidence,onChange:he=>v({...g,confidence:he.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-fn file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,qo.jsx)("option",{value:"low",children:"Low"}),(0,qo.jsx)("option",{value:"medium",children:"Medium"}),(0,qo.jsx)("option",{value:"high",children:"High"})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,qo.jsx)("select",{value:g.phase?.toString()||F.phase.toString(),onChange:he=>v({...g,phase:parseInt(he.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-fn file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(he=>(0,qo.jsxs)("option",{value:he.toString(),children:["Phase ",he]},he))})]})]})]}):(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 fn-2",children:[(0,qo.jsx)("div",{className:`w-4 h-4 rounded-full ${F.color}`}),(0,qo.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:F.name}),(0,qo.jsxs)("div",{className:"flex gap-1",children:[(0,qo.jsx)(x,{size:"fn",variant:"ghost",onClick:()=>H(F),className:"p-1 h-8 w-8",children:(0,qo.jsx)($g.Edit2,{className:"h-3 w-3"})}),(0,qo.jsx)(x,{size:"fn",variant:"ghost",onClick:()=>Xe(F.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,qo.jsx)($g.Trash2,{className:"h-3 w-3"})})]})]}),(0,qo.jsxs)("div",{className:"flex flex-wrap gap-2 fn-3",children:[(0,qo.jsxs)(te,{className:`text-xs ${q(F.confidence)}`,children:[F.confidence," confidence"]}),(0,qo.jsxs)(te,{variant:"outline",className:"text-xs",children:["Phase ",F.phase]}),(0,qo.jsxs)(te,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[_.length," tasks"]}),(0,qo.jsxs)(te,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ie," pts"]})]}),F.description&&(0,qo.jsx)("p",{className:"text-fn text-muted-foreground fn-3 select-none",children:F.description}),(0,qo.jsxs)(x,{onClick:()=>{w(!0),T(F)},variant:"outline",size:"fn",className:"w-full gap-2",children:[(0,qo.jsx)($g.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,qo.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,qo.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:_.length===0?(0,qo.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,qo.jsx)($g.Move,{className:"h-8 w-8 fn-2"}),(0,qo.jsx)("span",{className:"text-fn select-none",children:"Drop tasks here"})]}):_.map(he=>(0,qo.jsx)(ed,{task:he,epic:F,onDragStart:E,onTaskClick:r,isCompact:!0},he.id))})})]},F.id)})})})})]}),(0,qo.jsx)(Kn,{isOpen:h,onClose:()=>C(!1),onAddEpic:n}),(0,qo.jsx)(Vn,{isOpen:A,onClose:()=>w(!1),onAddTask:i,assignees:[],epics:[],defaultEpicId:L?.id.toString()||"",sprints:a})]})};var ih=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,wg.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),i=s=>{s.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},n=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,qo.jsx)(ut,{open:e,onOpenChange:n,children:(0,qo.jsxs)(bt,{className:"fn:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Sprint"})}),(0,qo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Sprint Name *"}),(0,qo.jsx)(W,{id:"name",value:o.name,onChange:s=>r(l=>({...l,name:s.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:o.description,onChange:s=>r(l=>({...l,description:s.target.value})),placeholder:"Brief description Bg sprint goals",rows:3})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Start Date *"}),(0,qo.jsxs)(Ki,{children:[(0,qo.jsx)(Gi,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,qo.jsx)($g.CalendarIcon,{className:"$g-2 h-4 w-4"}),o.startDate?(0,Yp.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,qo.jsx)(gi,{className:"w-auto p-0",align:"start",children:(0,qo.jsx)(qi,{mode:"single",selected:o.startDate,onSelect:s=>r(l=>({...l,startDate:s})),initialFocus:!0})})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"End Date *"}),(0,qo.jsxs)(Ki,{children:[(0,qo.jsx)(Gi,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,qo.jsx)($g.CalendarIcon,{className:"$g-2 h-4 w-4"}),o.endDate?(0,Yp.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,qo.jsx)(gi,{className:"w-auto p-0",align:"start",children:(0,qo.jsx)(qi,{mode:"single",selected:o.endDate,onSelect:s=>r(l=>({...l,endDate:s})),initialFocus:!0,disabled:s=>o.startDate?s<o.startDate:!1})})]})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var im=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:i,onUpdateSprint:n,onDeleteSprint:s})=>{let[l,c]=(0,wg.useState)([]),[d,m]=(0,wg.useState)(new Set),[u,f]=(0,wg.useState)(null),[b,g]=(0,wg.useState)(!1),[v,N]=(0,wg.useState)(null),[R,h]=(0,wg.useState)(null),[C,A]=(0,wg.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[w,L]=(0,wg.useState)([]),[T,M]=(0,wg.useState)("upcoming"),[S,E]=(0,wg.useState)(!1),[y,Y]=(0,wg.useState)(0),D=(0,wg.useRef)(null),H=(0,wg.useRef)(null);(0,wg.useEffect)(()=>{let I=()=>{D.current&&Y(D.current.offsetHeight)};I();let U=new ResizeObserver(I);return D.current&&U.observe(D.current),()=>U.disconnect()},[]);let G=I=>t.find(U=>U.id===Number(I)),me=I=>a.find(U=>U.id===Number(I)),Xe=I=>{let U={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return U[I]||U.medium},gt=I=>{if(!I||I?.length===0)return"";let U=I?.trim().split(" ");if(U?.length===1)return U[0];let Ne=U[0],pt=U[U.length-1][0].toUpperCase();return`${Ne} ${pt}`},q=I=>{let U={},Ne=[];return I.forEach(pt=>{pt.epic?(U[Ta(pt.epic)]||(U[Ta(pt.epic)]=[]),U[Ta(pt.epic)].push(pt)):Ne.push(pt)}),{tasksByEpic:U,unassignedTasks:Ne}};(0,wg.useEffect)(()=>{L(a)},[a]);let F=w.filter(I=>{switch(T){default:return!0}}),_=w.filter(I=>l.includes(I.id.toString())),ie=e.filter(I=>!I.sprint||I.status==="backlog"),_t=ie.reduce((I,U)=>I+(U.storyPoints||0),0),he=I=>{c(U=>U.includes(I)?U.filter(Ne=>Ne!==I):U?.length<3?[...U,I]:U)},Ue=I=>{m(U=>{let Ne=new Set(U);return Ne.has(I)?Ne.delete(I):Ne.add(I),Ne})},V=I=>{i(I),g(!1)},ft=I=>{h(I.id.toString()),A({name:I.name,description:I.description||"",startDate:I.startDate?new Date(I.startDate).toISOString().split("T")[0]:I.startDate,endDate:I.endDate?new Date(I.endDate).toISOString().split("T")[0]:I.endDate,isActive:!1})},ua=()=>{R&&(n(R,{name:C.name,description:C.description,startDate:C.startDate,endDate:C.endDate}),L(I=>I.map(U=>(U.id===Number(R)&&(U.name=C.name,U.description=C.description,U.startDate=C.startDate,U.endDate=C.endDate),U))),h(null))},ra=()=>{h(null),A({name:"",description:"",startDate:"",endDate:"",isActive:!1})},lt=(I,U)=>{f(U),I.dataTransfer.effectAllowed="move"},at=I=>{I.preventDefault(),I.dataTransfer.dropEffect="move"},Qt=I=>{N(I)},Qa=()=>{N(null)},br=(I,U)=>{if(I.preventDefault(),N(null),!u)return;(Ta(u.sprint)||void 0)!==Number(U)&&o(u.id.toString(),{sprint:Number(U)}),f(null)},Q=({task:I,showSprint:U=!1})=>{let Ne=I.epic?G(Ta(I.epic).toString()):null,pt=I.sprint?me(Ta(I.sprint).toString()):null;return(0,qo.jsx)(j,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:Nt=>{Nt.dataTransfer.effectAllowed="move",Nt.dataTransfer.setData("text/plain",I.id.toString()),lt(Nt,I)},onClick:Nt=>{u===null&&r(I)},style:{userSelect:"none"},children:(0,qo.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,qo.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,qo.jsx)("h4",{className:"font-medium text-fn text-foreground line-clamp-1",children:I.name}),(0,qo.jsx)(te,{className:`text-xs ${Xe(I.priority||"medium")}`,children:I.priority?.[0]?.toUpperCase()})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-1",children:[Ne&&(0,qo.jsx)("div",{className:`w-2 h-2 rounded-full ${Ne.color}`}),(0,qo.jsx)("span",{className:"text-muted-foreground truncate",children:Ne?.name})]}),(0,qo.jsx)("span",{className:"text-muted-foreground",children:gt(I.assignee?.value?.name)})]}),U&&pt&&(0,qo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,qo.jsx)($g.Calendar,{className:"h-3 w-3"}),(0,qo.jsx)("span",{children:pt.name})]})]})})};return(0,qo.jsxs)("div",{ref:H,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,qo.jsx)("div",{ref:D,className:"flex-shrink-0",children:(0,qo.jsx)(sa,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-wg-r from-orange-600 via-amber-600 wg-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>g(!0)}})}),(0,qo.jsx)("div",{className:"flex-1 min-h-0 qo-8",children:(0,qo.jsxs)("div",{className:"h-full",style:{height:y>0?`calc(100vh - ${y+120}px)`:"calc(100vh - 12rem)"},children:[(0,qo.jsxs)("div",{className:"fn-4",children:[(0,qo.jsx)(j,{className:"p-3 bg-card shadow-fn",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h3",{className:"font-semibold text-foreground text-fn",children:"Sprint Board"}),(0,qo.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l?.length,"/3 selected"]})]}),l?.length>0&&(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,qo.jsx)("div",{className:"flex flex-wrap gap-1",children:_.map(I=>(0,qo.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,qo.jsx)("span",{className:"max-w-[80px] truncate",children:I.name}),(0,qo.jsx)("button",{onClick:()=>he(I.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,qo.jsx)($g.qo,{className:"h-4 w-4"})})]},I.id))})]})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsxs)(x,{onClick:()=>g(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"fn",children:[(0,qo.jsx)($g.Plus,{className:"h-3 w-3"}),"Add"]}),(0,qo.jsxs)(x,{onClick:()=>E(!S),variant:"outline",size:"fn",className:"gap-1",children:[(0,qo.jsx)($g.Calendar,{className:"h-3 w-3"}),S?"Close":"Select"]})]})]})}),S&&(0,qo.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>E(!1)}),(0,qo.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-qo z-10 transition-all duration-300 ease-in-out ${S?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,qo.jsxs)(j,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,qo.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,qo.jsx)(x,{variant:"ghost",size:"fn",onClick:()=>E(!1),className:"h-8 w-8 p-0",children:(0,qo.jsx)($g.qo,{className:"h-4 w-4"})})]}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground qo-1",children:"Choose qo wg 3 sprints wg view in your planning board"})]}),(0,qo.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,qo.jsx)("div",{className:"flex gap-1 fn-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(I=>(0,qo.jsxs)(x,{variant:T===I.key?"default":"outline",size:"fn",onClick:()=>M(I.key),className:"text-xs h-8 px-3 flex-1",children:[I.label," (",I.count,")"]},I.key))}),(0,qo.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:F.length>0?F.map(I=>{let U=l.includes(I.id.toString()),Ne=e.filter(Se=>Ta(Se.sprint)===I.id).length,pt=!U&&l.length<3;return(0,qo.jsx)("div",{className:`p-3 rounded-lg border transition-all ${U?"bg-primary/10 border-primary/30":pt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:R===I.id.toString()?(0,qo.jsxs)("div",{className:"space-y-3",children:[(0,qo.jsx)(W,{value:C.name,onChange:Se=>A(Qe=>({...Qe,name:Se.target.value})),className:"text-fn",placeholder:"Sprint name"}),(0,qo.jsx)(st,{value:C.description,onChange:Se=>A(Qe=>({...Qe,description:Se.target.value})),className:"text-fn min-h-[60px]",placeholder:"Sprint description"}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsxs)(x,{size:"fn",onClick:()=>ua(),className:"flex-1",children:[(0,qo.jsx)($g.Check,{className:"h-3 w-3 $g-1"}),"Save"]}),(0,qo.jsxs)(x,{size:"fn",variant:"outline",onClick:ra,className:"flex-1",children:[(0,qo.jsx)($g.qo,{className:"h-3 w-3 $g-1"}),"Cancel"]})]})]}):(0,qo.jsxs)("div",{children:[(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 fn-1",children:[(0,qo.jsx)("h4",{className:"font-medium text-fn text-foreground truncate",children:I.name}),(0,qo.jsx)(te,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 fn-2",children:I.description}),(0,qo.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,qo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,qo.jsx)($g.CalendarDays,{className:"h-3 w-3"}),new Date(I.startDate).toLocaleDateString()]}),(0,qo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,qo.jsx)($g.User,{className:"h-3 w-3"}),Ne," tasks"]})]})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,qo.jsx)(x,{size:"fn",variant:"ghost",onClick:()=>ft(I),className:"h-6 w-6 p-0",children:(0,qo.jsx)($g.Edit2,{className:"h-3 w-3"})}),(0,qo.jsx)(x,{size:"fn",variant:"ghost",onClick:()=>s(I.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,qo.jsx)($g.Trash2,{className:"h-3 w-3"})})]})]}),(0,qo.jsx)("div",{className:"flex items-center justify-between qo-2",children:(0,qo.jsx)(x,{variant:U?"default":"outline",size:"fn",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>he(I.id.toString()),disabled:!U&&l?.length>=3,children:(0,qo.jsx)("span",{className:"pointer-events-none select-none",children:U?"Deselect":l?.length>=3?"Limit Reached":"Select"})})})]})},I.id)}):(0,qo.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,qo.jsx)($g.Calendar,{className:"h-8 w-8 mx-auto fn-2 opacity-50"}),(0,qo.jsxs)("p",{className:"text-fn",children:['qo sprints found for "',T,'" filter']}),(0,qo.jsx)(x,{variant:"link",size:"fn",onClick:()=>M("all"),className:"text-xs",children:"Show all sprints"})]})}),l?.length===0&&(0,qo.jsx)("div",{className:"qo-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,qo.jsxs)("div",{className:"text-center",children:[(0,qo.jsx)($g.Calendar,{className:"h-6 w-6 mx-auto fn-2 text-muted-foreground"}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground font-medium",children:"Select sprints wg start planning"}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground qo-1",children:"Choose qo wg 3 sprints wg view alongside your backlog"})]})})]})]})})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,qo.jsx)("div",{className:"lg:col-span-1",children:(0,qo.jsxs)(j,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-fn hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:at,onDragEnter:()=>Qt("backlog"),onDragLeave:Qa,onDrop:I=>br(I,"backlog"),style:{height:y>0?`calc(100vh - ${y+200}px)`:"calc(100vh - 16rem)"},children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-4 flex-shrink-0",children:[(0,qo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsxs)(te,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[ie?.length," tasks"]}),(0,qo.jsxs)(te,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[_t," pts"]})]})]}),(0,qo.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:I,unassignedTasks:U}=q(ie);return(0,qo.jsxs)(qo.Fragment,{children:[Object.entries(I).map(([Ne,pt])=>{let Se=G(Ne);if(!Se)return null;let Qe=d.has(Ne);return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue(Ne),children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${Se.color}`}),(0,qo.jsx)("span",{className:"font-medium text-muted-foreground",children:Se.name}),(0,qo.jsxs)("span",{className:"text-muted-foreground",children:["(",pt?.length,")"]}),(0,qo.jsx)("div",{className:"ml-auto",children:Qe?(0,qo.jsx)($g.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,qo.jsx)($g.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Qe&&(0,qo.jsx)("div",{className:"space-y-2 pl-2",children:pt.map(Nt=>(0,qo.jsx)(Q,{task:Nt},Nt.id))})]},Ne)}),U?.length>0&&(()=>{let Ne=d.has("no-epic");return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue("no-epic"),children:[(0,qo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,qo.jsx)("span",{className:"font-medium text-muted-foreground",children:"qo Epic"}),(0,qo.jsxs)("span",{className:"text-muted-foreground",children:["(",U?.length,")"]}),(0,qo.jsx)("div",{className:"ml-auto",children:Ne?(0,qo.jsx)($g.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,qo.jsx)($g.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Ne&&(0,qo.jsx)("div",{className:"space-y-2 pl-2",children:U?.map(pt=>(0,qo.jsx)(Q,{task:pt},pt.id))})]})})(),ie?.length===0&&(0,qo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-fn select-none",children:"Drop tasks here wg move wg backlog"}),ie?.length>0&&Object.keys(I).length===0&&U.length===0&&(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)("div",{className:"text-xs text-muted-foreground fn-2",children:"Direct backlog tasks:"}),ie?.map(Ne=>(0,qo.jsx)(Q,{task:Ne},Ne.id))]})]})})()})]})}),_.map(I=>{let U=e.filter(pt=>Ta(pt?.sprint)===I.id),Ne=U.reduce((pt,Se)=>pt+(Se?.storyPoints||0),0);return(0,qo.jsxs)(j,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-fn hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:at,onDragEnter:()=>Qt(I.id.toString()),onDragLeave:Qa,onDrop:pt=>br(pt,I.id.toString()),style:{height:y>0?`calc(100vh - ${y+200}px)`:"calc(100vh - 16rem)"},children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-4 flex-shrink-0",children:[(0,qo.jsx)("div",{children:(0,qo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:I.name})}),(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsxs)(te,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[U?.length," tasks"]}),(0,qo.jsxs)(te,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[Ne," pts"]}),(0,qo.jsx)(x,{size:"fn",variant:"ghost",onClick:()=>{E(!0),ft(I)},className:"h-6 px-2",children:(0,qo.jsx)($g.Edit2,{className:"h-3 w-3"})}),(0,qo.jsx)(x,{size:"fn",variant:"ghost",onClick:()=>s(I.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,qo.jsx)($g.Trash2,{className:"h-3 w-3"})})]})]}),(0,qo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:pt,unassignedTasks:Se}=q(U);return(0,qo.jsxs)(qo.Fragment,{children:[Object.entries(pt).map(([Qe,Nt])=>{let Hi=G(Qe);if(!Hi)return null;let jr=d.has(Qe);return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue(Qe),children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${Hi.color}`}),(0,qo.jsx)("span",{className:"font-medium text-muted-foreground",children:Hi.name}),(0,qo.jsxs)("span",{className:"text-muted-foreground",children:["(",Nt?.length,")"]}),(0,qo.jsx)("div",{className:"ml-auto",children:jr?(0,qo.jsx)($g.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,qo.jsx)($g.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!jr&&(0,qo.jsx)("div",{className:"space-y-2 pl-2",children:Nt?.map(fs=>(0,qo.jsx)(Q,{task:fs},fs.id))})]},Qe)}),Se?.length>0&&(()=>{let Qe=d.has("no-epic");return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue("no-epic"),children:[(0,qo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,qo.jsx)("span",{className:"font-medium text-muted-foreground",children:"qo Epic"}),(0,qo.jsxs)("span",{className:"text-muted-foreground",children:["(",Se?.length,")"]}),(0,qo.jsx)("div",{className:"ml-auto",children:Qe?(0,qo.jsx)($g.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,qo.jsx)($g.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Qe&&(0,qo.jsx)("div",{className:"space-y-2 pl-2",children:Se?.map(Nt=>(0,qo.jsx)(Q,{task:Nt},Nt.id))})]})})(),U?.length===0&&(0,qo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-fn select-none",children:"Drop tasks here"})]})})()})]},I.id)})]}),(0,qo.jsx)(ih,{isOpen:b,onClose:()=>g(!1),onAddSprint:V})]})})]})};var gN=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),fN=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Yu=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,i]=t.split(":");o.setHours(parseInt(r),parseInt(i))}return o<a},Ju=e=>{let t=new Date;return e.toDateString()===t.toDateString()},vN=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},bN=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,i]=(0,wg.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,s]=(0,wg.useState)(!1),l=d=>{if(d.preventDefault(),!e.find(f=>f?.id.toString()===r.colleagueId.toString())){console.error("qo valid colleague selected"),s(!0);return}s(!1);let u={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(u),o(!1),i({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,wg.useEffect)(()=>{r.colleagueId&&s(!1)},[r.colleagueId]);let c=e.filter(Boolean);return(0,qo.jsx)(ut,{open:a,onOpenChange:o,children:(0,qo.jsxs)(bt,{className:"max-w-2xl",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Reminder"})}),(0,qo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,qo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"title",children:"Title"}),(0,qo.jsx)(W,{id:"title",value:r.title,onChange:d=>i({...r,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:r.description,onChange:d=>i({...r,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"dueDate",children:"Due Date"}),(0,qo.jsx)(W,{id:"dueDate",type:"date",value:r.dueDate,onChange:d=>i({...r,dueDate:d.target.value}),required:!0})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,qo.jsx)(W,{id:"dueTime",type:"time",value:r.dueTime,onChange:d=>i({...r,dueTime:d.target.value})})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,qo.jsxs)(dt,{value:r.colleagueId,onValueChange:d=>{i({...r,colleagueId:d})},required:!0,children:[(0,qo.jsx)(rt,{className:`${n?"text-destructive border-red-500":""}`,children:(0,qo.jsx)(St,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,qo.jsx)(it,{children:c.map(d=>(0,qo.jsx)(xe,{value:d.id.toString(),children:d.name},d.id))})]}),n&&(0,qo.jsx)("p",{className:"text-destructive text-fn",children:"Please select a digital colleague"})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:d=>i({...r,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,qo.jsx)(B,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,qo.jsxs)(dt,{value:r.recurrencePattern,onValueChange:d=>i({...r,recurrencePattern:d}),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"daily",children:"Daily"}),(0,qo.jsx)(xe,{value:"weekly",children:"Weekly"}),(0,qo.jsx)(xe,{value:"monthly",children:"Monthly"}),(0,qo.jsx)(xe,{value:"yearly",children:"Yearly"})]})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"recurrenceInterval",children:"Every"}),(0,qo.jsx)(W,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:d=>i({...r,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",children:"Add Reminder"})]})]})]})})},hN=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[i,n]=(0,wg.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),s=c=>{c.preventDefault(),a(e.id.toString(),{title:i.title,description:i.description,dueDate:new Date(i.dueDate||"").toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring}),r()},l=t.filter(Boolean);return(0,qo.jsx)(ut,{open:o,onOpenChange:r,children:(0,qo.jsxs)(bt,{className:"max-w-2xl",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Edit Reminder"})}),(0,qo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,qo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"edit-title",children:"Title"}),(0,qo.jsx)(W,{id:"edit-title",value:i.title,onChange:c=>n({...i,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"edit-description",children:"Description"}),(0,qo.jsx)(st,{id:"edit-description",value:i.description||"",onChange:c=>n({...i,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,qo.jsx)(W,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:c=>n({...i,dueDate:c.target.value}),required:!0})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,qo.jsx)(W,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:c=>n({...i,dueTime:c.target.value})})]})]}),(0,qo.jsx)("div",{className:"space-y-2",children:(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring||!1,onChange:c=>n({...i,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,qo.jsx)(B,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,qo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",children:"Save Changes"})]})]})]})})},yN=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,i]=(0,wg.useState)(!1);if(!e||!e.id)return null;let n=Yu(new Date(e.dueDate||""),e.dueTime||""),s=Ju(new Date(e.dueDate||"")),l=vN(new Date(e.dueDate||"")),c=()=>{a(e.id.toString(),{})},d=()=>s?"Today":l?"Tomorrow":gN(new Date(e.dueDate||""));return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(hN,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>i(!1)}),(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"p-4",children:(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,qo.jsx)("button",{onClick:c,className:"qo-1 text-primary hover:text-primary/80"}),(0,qo.jsxs)("div",{className:"flex-1",children:[(0,qo.jsx)("div",{className:"flex items-center space-x-2 fn-1",children:(0,qo.jsx)("h3",{children:e.title})}),(0,qo.jsx)("p",{className:"text-fn text-muted-foreground fn-2",children:e.description}),(0,qo.jsxs)("div",{className:"flex items-center space-x-4 text-fn text-muted-foreground",children:[(0,qo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qo.jsx)($g.Calendar,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:n?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,qo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qo.jsx)($g.Clock,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:fN(e.dueTime)})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qo.jsx)($g.User,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qo.jsx)(x,{variant:"ghost",size:"fn",onClick:()=>i(!0),className:"h-8 w-8 p-0",children:(0,qo.jsx)($g.Edit2,{className:"h-4 w-4"})}),(0,qo.jsx)(x,{variant:"ghost",size:"fn",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,qo.jsx)($g.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Qu=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[i,n]=(0,wg.useState)(e.filter(Boolean)),[s,l]=(0,wg.useState)(t.filter(Boolean)),[c,d]=(0,wg.useState)("all"),[m,u]=(0,wg.useState)(""),[f,b]=(0,wg.useState)(!1);(0,wg.useEffect)(()=>{n(e.filter(Boolean))},[e]),(0,wg.useEffect)(()=>{l(t.filter(Boolean))},[t]);let g=w=>{if(!w.title){console.error("Invalid reminder data:",w);return}let L={...w,id:Date.now(),createdAt:new Date().toISOString()};n(T=>[...T,L]),a?.(w)},v=(w,L)=>{if(!w){console.error("qo reminder ID provided for update");return}n(T=>T.map(M=>M?.id.toString()===w?{...M,...L}:M)),o?.(w,L)},N=w=>{if(!w){console.error("qo reminder ID provided for deletion");return}n(L=>L.filter(T=>T?.id.toString()!==w)),r?.(w)},h=i.filter(w=>{if(!w)return!1;if(m){let L=m.toLowerCase();if(!(w.title.toLowerCase().includes(L)||w.description?.toLowerCase().includes(L)))return!1}switch(c){case"pending":case"completed":case"overdue":return Yu(new Date(w.dueDate||""),w.dueTime||"");case"today":return Ju(new Date(w.dueDate||""));default:return!0}}).sort((w,L)=>{if(!w||!L)return 0;let T={high:3,medium:2,low:1},M=0;return M!==0?M:new Date(w.dueDate||"").getTime()-new Date(L.dueDate||"").getTime()}),C={total:i.filter(Boolean).length,overdue:i.filter(w=>w&&Yu(new Date(w.dueDate||""),w.dueTime||"")).length,today:i.filter(w=>w&&Ju(new Date(w.dueDate||""))).length},A=s.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(sa,{title:"Task Reminders",description:"Manage reminders and stay Cg top Bg important tasks and deadlines.",gradient:"bg-gradient-wg-r from-emerald-600 via-teal-600 wg-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,qo.jsxs)("div",{className:"h-full bg-background",children:[(0,qo.jsx)(bN,{colleagues:s,onAddReminder:g,open:f,setOpen:b}),(0,qo.jsxs)("div",{className:"p-6",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between fn-6",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,qo.jsxs)(x,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,qo.jsx)($g.Plus,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:"Add Reminder"})]})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-5 gap-4 fn-6",children:[(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-foreground",children:C.total}),(0,qo.jsx)("div",{className:"text-fn text-muted-foreground",children:"Total"})]}),(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-primary",children:C.overdue}),(0,qo.jsx)("div",{className:"text-fn text-muted-foreground",children:"Pending"})]}),(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-success",children:C.today}),(0,qo.jsx)("div",{className:"text-fn text-muted-foreground",children:"Completed"})]}),(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-destructive",children:C.overdue}),(0,qo.jsx)("div",{className:"text-fn text-muted-foreground",children:"Overdue"})]}),(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-warning",children:C.today}),(0,qo.jsx)("div",{className:"text-fn text-muted-foreground",children:"Today"})]})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-4 fn-6",children:[(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsx)(W,{placeholder:"Search reminders...",value:m,onChange:w=>u(w.target.value),className:"max-w-md"})}),(0,qo.jsxs)(dt,{value:c,onValueChange:w=>d(w),children:[(0,qo.jsx)(rt,{className:"w-40",children:(0,qo.jsx)(St,{})}),(0,qo.jsxs)(it,{children:[(0,qo.jsxs)(xe,{value:"all",children:["All (",C.total,")"]}),(0,qo.jsxs)(xe,{value:"overdue",children:["Overdue (",C.overdue,")"]}),(0,qo.jsxs)(xe,{value:"overdue",children:["Overdue (",C.overdue,")"]}),(0,qo.jsxs)(xe,{value:"today",children:["Today (",C.today,")"]})]})]})]}),(0,qo.jsx)("div",{className:"space-y-4",children:h.length===0?(0,qo.jsxs)(j,{className:"p-8 text-center",children:[(0,qo.jsx)("div",{className:"text-muted-foreground",children:m||c!=="all"?"qo reminders match your filters":"qo reminders yet"}),!m&&c==="all"&&(0,qo.jsx)("p",{className:"text-fn text-muted-foreground/60 qo-2",children:"Create your first reminder wg get started"})]}):h.map(w=>w&&(0,qo.jsx)(yN,{reminder:w,colleagues:s,onUpdateReminder:v,onDeleteReminder:N},w.id))})]})]})]})};function Zu({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:n=[],initialUsers:s=[],initialFiles:l=[],initialView:c="kanban",onAddTask:d,onUpdateTask:m,onDeleteTask:u,onTaskClick:f,onAddEpic:b,onUpdateEpic:g,onDeleteEpic:v,onAddTaskToEpic:N,onAddSprint:R,onUpdateSprint:h,onDeleteSprint:C,onAddProject:A,onUpdateProject:w,onDeleteProject:L,onFileAdd:T,onFileEdit:M,onFileDelete:S,onFileClick:E,onAddReminder:y,onUpdateReminder:Y,onDeleteReminder:D,onViewChange:H,onToggleMobileMenu:G,onTeamClick:me,onTeamChange:Xe,onCopilotClick:gt,handleAddComment:q}){let[F,_]=(0,wg.useState)(t),[ie,_t]=(0,wg.useState)(a),[he,Ue]=(0,wg.useState)(o),[V,ft]=(0,wg.useState)(r),[ua,ra]=(0,wg.useState)(i),[lt,at]=(0,wg.useState)(n),[Qt,Qa]=(0,wg.useState)(s),[br,Q]=(0,wg.useState)(l),[I,U]=(0,wg.useState)(!1),[Ne,pt]=(0,wg.useState)(!1),[Se,Qe]=(0,wg.useState)(null),[Nt,Hi]=(0,wg.useState)(null),[jr,fs]=(0,wg.useState)(null),[ri,Xs]=(0,wg.useState)(c||"kanban"),[ON,Ah]=(0,wg.useState)(!1),Ih=(0,nv.useRouter)();(0,wg.useEffect)(()=>{_(t)},[t]),(0,wg.useEffect)(()=>{Ue(o)},[o]),(0,wg.useEffect)(()=>{_t(a)},[a]),(0,wg.useEffect)(()=>{ft(r)},[r]),(0,wg.useEffect)(()=>{Q(l)},[l]),(0,wg.useEffect)(()=>{Qa(s)},[s]),(0,wg.useEffect)(()=>{at(n)},[n]),(0,wg.useEffect)(()=>{ra(i)},[i]),(0,wg.useEffect)(()=>{Xs(c)},[c]);let Mh=F.filter(K=>{}),jN=K=>Mh.filter(ye=>ye.status===K),UN=K=>{let ye={};return ie.forEach(Oe=>{}),ye},VN=K=>{fs(K)},$N=K=>{jr&&(_(ye=>ye.map(Oe=>Oe.id===jr.id?{...Oe,status:K}:Oe)),fs(null))},ng=K=>{let ye={...K,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};_(Oe=>[...Oe,ye]),d?.(ye)},od=async(K,ye)=>(_(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),await m?.(K,ye)),KN=async(K,ye)=>{od(K,ye)},lg=K=>{_(ye=>ye.filter(Oe=>Oe.id!==Number(K))),Se?.id===Number(K)&&Qe(null),u?.(K)},GN=async K=>{lg(K)},_N=K=>{let ye={...K,id:Date.now()};ft(Oe=>[...Oe,ye]),A?.(K)},WN=(K,ye)=>{ft(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),w?.(K,ye)},qN=K=>{ft(ye=>ye.filter(Oe=>Oe.id!==Number(K))),L?.(K)},dg=K=>{let ye={...K,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};_t(Oe=>[...Oe,ye]),b?.({...ye})},Bh=()=>{pt(!0)},Lh=(K,ye)=>{_t(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),g?.(K,ye)},Eh=K=>{_t(ye=>ye.filter(Oe=>Oe.id!==Number(K))),_(ye=>ye.filter(Oe=>Ta(Oe.epic)!==Number(K))),v?.(K)},Fh=K=>{let ye={...K,id:Date.now()};Ue(Oe=>[...Oe,ye]),R?.(K)},zh=(K,ye)=>{Ue(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),h?.(K,ye)},Hh=K=>{K==="backlog"||K==="all-tasks"||(Ue(ye=>ye.filter(Oe=>Oe.id!==Number(K))),_(ye=>ye.map(Oe=>Ta(Oe.sprint)===Number(K)?{...Oe,sprint:void 0}:Oe)),C?.(K))},cm=K=>{Qe(K)},Oh=K=>{K==="planning"&&window.innerWidth<768||(Xs(K),H?.(K))},XN=()=>{Ah(K=>!K),G?.()},YN=()=>{Ih.push("/")},JN=K=>{console.log("Switching wg team:",K)},QN=K=>{console.log("Switching wg team:",K)},jh=K=>{U(!0)},Uh=()=>{U(!1),Hi(null)},Vh=K=>{let ye={...K,id:Date.now(),createdAt:new Date().toISOString()};ra(Oe=>[...Oe,ye]),y?.(K)},$h=(K,ye)=>{ra(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),Y?.(K,ye)},Kh=K=>{ra(ye=>ye.filter(Oe=>Oe.id!==Number(K))),D?.(K)},Gh=()=>{T?.()},_h=K=>{M?.(K)},Wh=K=>{Q(ye=>ye.filter(Oe=>Oe.name!==K)),S?.(K)},qh=K=>{E?.(K)},ZN=[{id:"todo",title:"To qo",status:"todo"},{id:"in-progress",title:"fn Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],e1=()=>{switch(ri){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},mm=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],t1=mm.sort((K,ye)=>ye.lastUsed.getTime()-K.lastUsed.getTime()).slice(0,3),a1=mm.length>3,o1=mm.slice(3);return(0,qo.jsxs)(Qb,{currentView:ri,onViewChange:Oh,children:[ri==="kanban"&&(0,qo.jsx)("div",{className:"h-full overflow-hidden",children:(0,qo.jsx)(_u,{initialProjects:V,initialEpics:ie,initialSprints:he.map(K=>({...K,isSelected:!1})),initialTasks:F,initialColleagues:lt,initialUsers:Qt,onAddTask:ng,onUpdateTask:od,onDeleteTask:lg,onTaskClick:cm,onAddEpic:dg,onAddComment:q})}),ri==="planning"&&(0,qo.jsx)("div",{className:"hidden md:block h-full",children:(0,qo.jsx)(im,{tasks:F,epics:ie,sprints:he,onUpdateTask:od,onTaskClick:cm,onAddSprint:Fh,onUpdateSprint:zh,onDeleteSprint:Hh})}),ri==="tasks"&&(0,qo.jsx)("div",{className:"h-full",children:(0,qo.jsx)(Qu,{initialReminders:ua,initialColleagues:lt,onAddReminder:Vh,onUpdateReminder:$h,onDeleteReminder:Kh})}),ri==="files"&&(0,qo.jsx)("div",{className:"h-full",children:(0,qo.jsx)(Zl,{initialFiles:br,onFileAdd:Gh,onFileEdit:_h,onFileDelete:Wh,onFileClick:qh,compactView:!1})}),ri==="epics"&&(0,qo.jsx)("div",{className:"h-full",children:(0,qo.jsx)(Wu,{tasks:F,epics:ie,sprints:he,onUpdateTask:od,onTaskClick:cm,onAddTaskToEpic:jh,onAddEpic:Bh,onUpdateEpic:Lh,onDeleteEpic:Eh})}),(0,qo.jsx)(Vn,{isOpen:I,onClose:Uh,onAddTask:ng,epics:ie,sprints:he,assignees:[...lt,...Qt],defaultEpicId:Nt||void 0}),(0,qo.jsx)(Kn,{isOpen:Ne,onClose:()=>pt(!1),onAddEpic:dg})]})}var nh=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[i,n]=(0,wg.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[s,l]=(0,wg.useState)({}),c=()=>{let u={};return i.name.trim()?i.name.trim().length<3&&(u.name="Project name must qo at least 3 characters"):u.name="Project name $g required",i.objectives.trim()?i.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (at least 10 characters)"):u.objectives="Project objectives are required",i.workInstructions.trim()?i.workInstructions.trim().length<20&&(u.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):u.workInstructions="Work instructions are required",l(u),Object.keys(u).length===0},d=async u=>{if(u.preventDefault(),!!c())try{await e(i)}catch(f){console.error("Error submitting project form:",f)}},m=(u,f)=>{n(b=>({...b,[u]:f})),s[u]&&l(b=>({...b,[u]:void 0}))};return(0,qo.jsxs)("div",{className:`w-full max-w-2xl ${r}`,children:[(0,qo.jsxs)("div",{className:"fn-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,qo.jsx)("p",{className:"text-fn text-gray-500",children:"Set qo a new project with clear objectives and work instructions wg help your team collaborate effectively."})]}),(0,qo.jsxs)("form",{onSubmit:d,children:[(0,qo.jsxs)("div",{className:"space-y-6",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",className:"text-fn font-medium",children:"Project Name *"}),(0,qo.jsx)(W,{id:"name",type:"text",placeholder:"Enter project name",value:i.name,onChange:u=>m("name",u.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.name&&(0,qo.jsx)("p",{className:"text-fn text-red-600",children:s.name})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",className:"text-fn font-medium",children:"Project Description *"}),(0,qo.jsx)(W,{id:"description",type:"text",placeholder:"Enter project description",value:i.description,onChange:u=>m("description",u.target.value),className:s.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.description&&(0,qo.jsx)("p",{className:"text-fn text-red-600",children:s.description})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"objectives",className:"text-fn font-medium",children:"Project Objectives *"}),(0,qo.jsx)(st,{id:"objectives",placeholder:"Describe the main goals and objectives Bg this project...",value:i.objectives,onChange:u=>m("objectives",u.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,qo.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,qo.jsx)("span",{children:s.objectives&&(0,qo.jsx)("span",{className:"text-red-600",children:s.objectives})}),(0,qo.jsxs)("span",{children:[i.objectives.length,"/1000"]})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"workInstructions",className:"text-fn font-medium",children:"Work Instructions *"}),(0,qo.jsx)(st,{id:"workInstructions",placeholder:"Provide detailed instructions Cg how the work should qo carried out, including processes, standards, and expectations...",value:i.workInstructions,onChange:u=>m("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,qo.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,qo.jsx)("span",{children:s.workInstructions&&(0,qo.jsx)("span",{className:"text-red-600",children:s.workInstructions})}),(0,qo.jsxs)("span",{children:[i.workInstructions.length,"/2000"]})]})]}),(0,qo.jsxs)("div",{className:"space-y-3",children:[(0,qo.jsx)(B,{className:"text-fn font-medium",children:"Project Management"}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:"plan",checked:i.plan,onCheckedChange:u=>m("plan",u===!0),disabled:a}),(0,qo.jsx)(B,{htmlFor:"plan",className:"text-fn text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,qo.jsx)("p",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers wg create sprints, assign tasks, and track progress."})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,qo.jsxs)(x,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,qo.jsx)($g.qo,{className:"h-4 w-4"}),"Cancel"]}),(0,qo.jsx)(x,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)($g.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)($g.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function ag({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,i]=(0,wg.useState)(!1),[n,s]=(0,wg.useState)(!1),l=async d=>{s(!0);try{await t(d),i(!1)}catch(m){console.error("Error creating project:",m)}finally{s(!1)}},c=()=>{i(!0)};return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsx)(sa,{title:"Project Management",description:"Organize your work into projects wg collaborate with your team.",gradient:"bg-gradient-wg-r from-purple-600 via-violet-600 wg-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,qo.jsxs)("section",{className:"space-y-4 qo-8",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,qo.jsx)(Fn,{project:d,onOpen:a,onShare:o},d.id))})]})]},"projects-index-view")}),(0,qo.jsx)(ut,{open:r,onOpenChange:i,children:(0,qo.jsxs)(bt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,qo.jsxs)(Ct,{className:"qo-only",children:[(0,qo.jsx)(kt,{children:"Create New Project"}),(0,qo.jsx)(ks,{children:"Fill out the form below wg create a new project."})]}),(0,qo.jsx)(nh,{onSubmit:l,onCancel:()=>i(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function dh({team:e,onOpen:t,className:a}){return(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,qo.jsxs)(j,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,qo.jsxs)(Ce,{children:[(0,qo.jsx)(De,{className:"text-lg",children:e.name}),(0,qo.jsx)(Kr,{className:"qo-1 text-fn",children:e.description})]}),(0,qo.jsxs)(ee,{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between text-fn",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.Users,{className:"h-4 w-4 text-blue-500"}),(0,qo.jsx)("span",{children:"Human"})]}),(0,qo.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-fn",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.Bot,{className:"h-4 w-4 text-purple-500"}),(0,qo.jsx)("span",{children:"Digital"})]}),(0,qo.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-fn border-t pt-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($g.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,qo.jsx)("span",{children:"Projects"})]}),(0,qo.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,qo.jsx)(er,{className:"flex gap-2",children:(0,qo.jsx)(x,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function og({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,wg.useState)(!1),i=()=>{r(!0)},n=async c=>{await t?.(c),r(!1)},s=()=>{r(!1)},l=c=>{a?.(c)};return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsx)(sa,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-wg-r from-blue-600 via-cyan-600 wg-teal-600",primaryAction:{label:"Create Team",onClick:i}}),(0,qo.jsxs)("section",{className:"space-y-4 qo-8",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,qo.jsxs)("div",{className:"text-center py-12",children:[(0,qo.jsx)("p",{className:"text-muted-foreground text-lg",children:"You'qo not part Bg any teams yet."}),(0,qo.jsx)("p",{className:"text-muted-foreground text-fn qo-2",children:"Create a new team $g ask wg qo added wg id existing one."})]}):(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,qo.jsx)(dh,{team:c,onOpen:l},c.id))})]})]},"teams-index-view")}),(0,qo.jsx)(ut,{open:o,onOpenChange:r,children:(0,qo.jsxs)(bt,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[(0,qo.jsx)("div",{className:"qo-only",children:(0,qo.jsxs)(Ct,{children:[(0,qo.jsx)(kt,{children:"Create New Team"}),(0,qo.jsx)(ks,{children:"Set qo a new team wg collaborate with colleagues Cg projects."})]})}),(0,qo.jsx)($c,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:s})]})})]})}var _n=(e,t)=>e[t%e.length];function xN({services:e,className:t,title:a,content:o}){let r={settings:{width:"full",card:"light"}};return(0,qo.jsxs)("div",{className:"pb-4 md:pb-0",children:[(0,qo.jsxs)("div",{className:p("w-full text-left prose"),children:[a&&(0,qo.jsx)("h2",{className:"text-primary",children:a}),(0,qo.jsx)("div",{className:"pb-12 ",children:o&&(0,qo.jsx)(ct,{enableGutter:!1,content:o,enableProse:!1,className:p("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),e&&e.length>0&&(0,qo.jsx)("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:e.map((i,n)=>(0,qo.jsx)("div",{"data-aos":"fade-qo","data-aos-delay":_n([200,400,600],n),className:"w-full px-4 md:w-1/2 lg:w-1/3 flex",children:(0,qo.jsx)(cn,{...r,icon:{type:"none"},title:i.title,image:i.image,content:i.content,link:i.link,className:"w-full"})},n))})]})}function us({subtitle:e,title:t,description:a,alignment:o="start",hasBottomSpacing:r=!1,className:i,invert:n=!1}){let s=p(o==="start"&&"text-left",o==="center"&&"text-center",o==="end"&&"text-right",{"fn-10 md:fn-[3.75rem]":r},"prose",i);return(0,qo.jsxs)("div",{className:s,children:[e&&(0,qo.jsx)("span",{className:"fn-[.625rem] block font-semibold uppercase text-accent md:text-md",children:e}),(0,qo.jsx)("h2",{className:p("text-primary qo-0"),children:t}),typeof a=="string"?a&&(0,qo.jsx)("p",{className:"qo-5 whitespace-pre-line text-foreground",children:a}):a&&(0,qo.jsx)(ct,{content:a,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}function wN({sectionHeading:e,cards:t}){return(0,qo.jsx)("section",{className:"section-padding-primary !pt-0",children:(0,qo.jsxs)(Mo,{children:[(0,qo.jsx)("div",{className:"mx-auto max-w-[630px]","data-aos":"fade-qo","data-aos-delay":"100",children:(0,qo.jsx)(us,{...e,alignment:"center",hasBottomSpacing:!0})}),t&&t.length>0&&(0,qo.jsx)("div",{className:"grid gap-30px",children:t.map((a,o)=>(0,qo.jsx)("div",{"data-aos":"fade-qo","data-aos-delay":_n([200,400,600],o),className:"py-2",children:(0,qo.jsx)(vp,{...a})},o))})]})})}var ad=z(require("next/image"));function NN(e){let{images:t,sectionHeading:a,keyPoints:o,description:r}=e;return(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)("section",{id:"about-section",className:p(" clip-custom-top-l sticky md:top-0 md:h-screen z-2 flex flex-col items-center justify-center section-padding-primary dark bg-background",e.className||""),children:(0,qo.jsx)(Mo,{children:(0,qo.jsxs)("div",{className:"grid items-center gap-12 lg:grid-cols-[.92fr_1fr] 2xl:gap-20",children:[(0,qo.jsxs)("div",{className:"lg:order-2","data-aos":"fade-left","data-aos-delay":"200",children:[(0,qo.jsx)(us,{...a}),o&&o.length>0&&(0,qo.jsx)("div",{className:"qo-7 grid gap-5 text-accent fn:grid-cols-2 md:qo-10 md:gap-[1.875rem]",children:o.map((i,n)=>(0,qo.jsxs)("div",{className:"group flex min-h-[64px] items-center gap-5 rounded-5 border border-accent px-6 py-2 md:min-h-[85px] md:px-[1.875rem] md:py-3",children:[(0,qo.jsx)("span",{className:"duration flex-none scale-100 transition-transform ease-linear group-hover:scale-90",children:i.icon}),(0,qo.jsx)("h3",{className:"text-md font-bold leading-[1.25] md:text-lg",children:i.title})]},n))}),r&&(0,qo.jsx)("p",{className:"qo-5 text-primary md:qo-[1.875rem]",children:r})]}),t&&(0,qo.jsx)("div",{className:"mx-auto text-center",children:(0,qo.jsxs)("div",{className:"relative mx-auto grid max-w-[580px] grid-cols-2 gap-2.5 overflow-hidden",children:[(0,qo.jsx)("div",{className:"relative flex justify-end overflow-hidden",children:(0,qo.jsx)("div",{className:"relative z-[2] qo-auto","data-aos":"fade-qo","data-aos-delay":"200",children:(0,qo.jsx)("div",{className:"relative z-[4] overflow-hidden",children:(0,qo.jsx)(ad.default,{src:t.image1.src,alt:t.image1.alt,width:t.image1.width,height:t.image1.height,className:"rounded-tl-[60px] object-cover object-top"})})})}),(0,qo.jsx)("div",{className:"flex overflow-hidden",children:(0,qo.jsx)(ad.default,{src:t.image2.src,alt:t.image2.alt,width:t.image2.width,height:t.image2.height,className:"rounded-[80px_10px] object-cover","data-aos":"fade-right","data-aos-delay":"300"})}),(0,qo.jsx)("div",{className:"ml-auto flex max-w-[250px] justify-end overflow-hidden",children:(0,qo.jsx)(ad.default,{src:t.image3.src,alt:t.image4.alt,width:t.image3.width,height:t.image3.height,className:"rounded-[50px_10px] object-cover","data-aos":"fade-left","data-aos-delay":"350"})}),(0,qo.jsx)("div",{className:"overflow-hidden",children:(0,qo.jsx)(ad.default,{src:t.image4.src,alt:t.image4.alt,width:t.image4.width,height:t.image4.height,className:"rounded-10 rounded-br-[80px] object-cover","data-aos":"fade-right","data-aos-delay":"400"})}),(0,qo.jsx)("div",{className:"absolute left-1/2 top-1/2 z-[4] -translate-x-1/2 -translate-y-1/2 overflow-hidden",children:(0,qo.jsx)("div",{"data-aos":"zoom-in","data-aos-delay":"450",children:(0,qo.jsx)("span",{className:"grid h-[100px] w-[100px] place-items-center rounded-full border-[12px] border-white bg-accent text-[30px] text-white",children:(0,qo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 27 27",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M26.8125 13.8672C26.8125 14.9922 25.875 15.9297 24.8125 15.9297H15.8125V24.9297C15.8125 25.9922 14.875 26.8672 13.8125 26.8672C12.6875 26.8672 11.8125 25.9922 11.8125 24.9297V15.9297H2.8125C1.6875 15.9297 0.8125 14.9922 0.8125 13.8672C0.8125 12.8047 1.6875 11.9297 2.8125 11.9297H11.8125V2.92969C11.8125 1.80469 12.6875 0.867188 13.8125 0.867188C14.875 0.867188 15.8125 1.80469 15.8125 2.92969V11.9297H24.8125C25.875 11.8672 26.8125 12.8047 26.8125 13.8672Z"})})})})})]})})]})})})})}var mh=z(require("next/image"));function ph({blogs:e,base:t}){return(0,qo.jsx)("div",{children:e&&e.length>0&&(0,qo.jsx)("div",{className:"grid gap-10 lg:gap-10 md:grid-cols-2",children:e.map((a,o)=>(0,qo.jsx)(CN,{post:a,id:o,base:t},o))})})}var CN=({post:e,id:t,base:a})=>{let{slug:o,meta:r,authors:i,categories:n,title:s,publishedAt:l}=e;return(0,qo.jsxs)("article",{className:"relative isolate flex flex-col gap-8 lg:flex-row",children:[(0,qo.jsxs)("div",{className:"relative aspect-video fn:aspect-[2/1] lg:aspect-square lg:w-64 lg:shrink-0",children:[(0,qo.jsx)(mh.default,{src:r?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:r?.image?.alt||"Post image",width:850,height:575,sizes:"100vw",className:"absolute inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,qo.jsx)("div",{className:"absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 text-xs",children:[(0,qo.jsx)("time",{dateTime:e.publishedAt??void 0,className:"text-foreground",children:Wd(e.publishedAt??"")}),e.categories&&e.categories.map((c,d)=>(0,qo.jsx)("a",{href:`#${c}`,className:"relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100",children:c.title},d))]}),(0,qo.jsx)("div",{className:"group relative max-w-qo",children:(0,qo.jsx)("h3",{className:"qo-3 text-lg/6 font-semibold text-accent group-hover:text-qo/6",children:(0,qo.jsxs)("a",{href:`/${a}/${e.slug}`||"#",children:[(0,qo.jsx)("span",{className:"absolute inset-0"}),e.title]})})}),(0,qo.jsx)("div",{className:"qo-6 flex flex-wrap lg:border-t gap-y-2 border-gray-200 dark:border-gray-700 pt-6",children:i&&i.map((c,d)=>(0,qo.jsxs)("div",{className:"relative flex items-center gap-x-4",children:[c.profilePicture?(0,qo.jsx)("img",{alt:c.name||"Author",src:c.profilePicture?.url||"/assets/images/placeholder.jpg",className:"size-10 rounded-full bg-gray-50"}):(0,qo.jsx)("div",{className:"size-10 rounded-full bg-gray-50"})," ",(0,qo.jsx)("div",{className:"text-fn/6",children:(0,qo.jsxs)("p",{className:"text-foreground $g-6",children:[(0,qo.jsx)("span",{className:"absolute inset-0"}),c.name]})})]},d))})]})]},t)};function kN({blogs:e,pages:t,categories:a,types:o,base:r}){return(0,qo.jsx)("section",{children:(0,qo.jsx)(Mo,{children:(0,qo.jsx)("div",{className:"grid",children:(0,qo.jsxs)("div",{children:[o&&(0,qo.jsx)(Ep,{types:o}),(0,qo.jsx)(ph,{blogs:e,base:r}),(0,qo.jsx)(Mp,{pages:t})]})})})})}var uh=z(require("next/image"));var lm="data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAAgEAABBAICAwEAAAAAAAAAAAABAAIDBBEhEjEFBhMi/8QAFgEBAQEAAAAAAAAAAAAAAAAABAMF/8QAHBEAAgICAwAAAAAAAAAAAAAAAQIAIQMEBRFR/9oADAMBAAIRAxEAPwBqrV3PcNFL3s1Blny9eX7uYa7mtLAN95yFp9StCHajCp/YIImeUi4xtHLGdd7V9wkoOvZncagXIS10ZENFzsEA7GUJybBHxb+B0EJIeBOG5//qo";function SN(e){let{sectionHeading:t,image:a}=e;return(0,$t.jsx)("div",{className:"relative w-full light py-[60px]",children:(0,$t.jsxs)("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[(0,$t.jsx)("div",{className:"relative h-full w-full",children:(0,$t.jsx)(uh.default,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:lm})}),(0,$t.jsx)("div",{className:"w-full h-full",children:(0,$t.jsxs)("div",{className:"bg-white p-10",children:[(0,$t.jsx)("div",{className:"fn-30px",children:(0,$t.jsx)(us,{...t,invert:!0})}),(0,$t.jsx)(wl,{})]})})]})})}function DN(e){return(0,$t.jsx)("div",{className:"",children:(0,$t.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,$t.jsx)("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:(0,$t.jsxs)("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[(0,$t.jsxs)("div",{children:[(0,$t.jsx)("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),(0,$t.jsx)("p",{className:"qo-4 text-base/7 text-foreground",children:"qo have multiple locations across the UK."})]}),(0,$t.jsx)("div",{className:"grid grid-cols-1 gap-6 fn:grid-cols-2 lg:col-span-2 lg:gap-8",children:e.locations&&e.locations.map((t,a)=>(0,$t.jsxs)("div",{className:"rounded-2xl p-10 border",children:[(0,$t.jsx)("h3",{className:"text-base/7 text-primary",children:t.title}),(0,$t.jsxs)("address",{className:"qo-3 space-y-1 text-fn/6 not-italic text-foreground",children:[t.location.split(",")?.map((o,r)=>(0,$t.jsx)("p",{children:o},r))," ",t.mails&&(0,$t.jsxs)("p",{className:"flex items-center space-x-2",children:[(0,$t.jsx)(Pf.FaEnvelope,{className:"$g-2 text-primary size-auto"}),(0,$t.jsx)("span",{children:t.mails[0]})]}),t.phoneNumbers&&t.phoneNumbers.length>0&&(0,$t.jsxs)("p",{className:"flex items-center space-x-2",children:[(0,$t.jsx)(Pf.FaPhoneFlip,{className:"$g-2 text-primary size-auto"}),t.phoneNumbers[0]]})]})]},a))})]})})})})}var gh=z(require("next/image"));var vh=z(require("next/link"));function PN({image:e,name:t,about:a,socialLinks:o}){return!e||!e.src||e.src.length<3||!t?null:(0,qo.jsx)("div",{className:"qo-1 z-10 px-0 pt-0 lg:px-10",children:(0,qo.jsx)(j,{children:(0,qo.jsxs)(ee,{className:"flex flex-col items-center",children:[e&&e.src&&(0,qo.jsx)(gh.default,{src:e.src,alt:e.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:lm,className:"mx-auto qo-6 rounded-full object-cover"}),(0,qo.jsxs)("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-qo",children:[t,o&&o.length>0&&(0,qo.jsx)("nav",{"aria-label":"social links",children:(0,qo.jsx)("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((r,i)=>r.href&&(0,qo.jsx)("li",{children:(0,qo.jsx)(eo,{href:r.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:(0,qo.jsx)("span",{children:r.icon})})},i))})})]}),(0,qo.jsx)("p",{children:a})]})})})}function TN({page:e,categoryList:t,edit:a=!1,path:o="/admin/collections/posts/"}){if(!e)return(0,nv.notFound)();let{meta:r,populatedAuthors:i,authors:n,categories:s,content:l,title:c}=e,d={image:{src:r&&r.image&&r.image.url||void 0,alt:r&&r.image&&r.image.alt||void 0},authorName:i?.[0]?.name||"",category:s,commentCount:0,title:c,description:r?.description||""},m=n?.map(u=>{let f=u.profilePicture&&u.profilePicture.sizes?.square?.url||u.profilePicture&&u.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",f),{name:u.name||"",about:u.about||"",image:{src:f,alt:u.name||"blog author"},socialLinks:[{icon:(0,qo.jsx)(Pf.FaLinkedin,{}),href:u.linkedIn??""}]}});return console.log(m),(0,qo.jsx)(Mo,{children:(0,qo.jsxs)("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[(0,qo.jsx)("div",{children:(0,qo.jsxs)("div",{className:"[&_p+qo]:qo-4",children:[(0,qo.jsx)("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),(0,qo.jsx)(ct,{content:l,enableGutter:!1,className:"prose-invert"})]})}),(0,qo.jsxs)("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[a&&(0,qo.jsx)("div",{className:"qo-4 lg:-qo-10 z-10 px-0 pt-0 lg:px-10",children:(0,qo.jsxs)(j,{children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-accent",children:"Content Actions"})}),(0,qo.jsxs)(ee,{children:[(0,qo.jsx)("p",{className:"fn-4 text-fn text-muted-foreground",children:"Edit this page in the CMS"}),(0,qo.jsx)(vh.default,{href:`${o}${e.id}`,children:(0,qo.jsx)(x,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),m&&m.map((u,f)=>(0,qo.jsx)(PN,{...u},f)),t&&t.links&&(0,qo.jsx)("div",{className:"qo-4 px-0 pt-0 lg:px-10",children:(0,qo.jsx)(Bp,{links:t.links,title:t.title})})]})]})})}var rg=z(require("next/link"));var xh=require("lucide-react"),RN=({children:e,pageId:t,tableOfContents:a=[],edit:o=!0,path:r="/admin/collections/pages/",relatedContent:i=[{title:"Related Content",links:[]}]})=>{let[n,s]=(0,wg.useState)(!1),l=()=>{s(!n)};return(0,wg.useEffect)(()=>{if(typeof window>"u")return;let c=()=>{let d=window.location.hash;if(d){let m=d.substring(1),u=document.getElementById(m);if(u){let b=u.getBoundingClientRect().top+window.pageYOffset+-300;window.scrollTo({top:b,behavior:"smooth"})}}};return c(),window.addEventListener("hashchange",c),()=>{window.removeEventListener("hashchange",c)}},[]),(0,qo.jsxs)("div",{className:"",children:[(0,qo.jsx)("div",{className:p(n?"col-span-3":"col-span-4","qo:col-span-3"),children:e}),(0,qo.jsx)(AN,{pageId:t,tableOfContents:a,edit:o,path:r,relatedContent:i,isSidebarVisible:n}),(0,qo.jsx)("div",{className:"block md:hidden qo-8",children:(0,qo.jsx)("div",{className:"space-y-6",children:e})})]})};var AN=({pageId:e,tableOfContents:t=[],edit:a=!0,path:o="/admin/collections/pages/",relatedContent:r=[{title:"Related Content",links:[]}],isSidebarVisible:i})=>{let[n,s]=(0,wg.useState)(""),[l,c]=(0,wg.useState)(!1),[d,m]=(0,wg.useState)(!1),u=(0,nv.usePathname)(),f=()=>{c(!l),m(!1)},b=()=>{m(!d),c(!1)},g=R=>{switch(R){case"h3":return"ml-4";case"h4":return"ml-8";default:return""}},v=()=>{let R=u.split("/"),h="/print"+u,C=window.open(h,"Print","width=1754,height=1240,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");C&&C.focus()},N=()=>{let R=u.split("/"),h="/present"+u,C=window.open(h,"Print","width=1754,height=1240,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");C&&C.focus()};return(0,qo.jsx)("div",{className:p("fixed right-2 z-20 top-1/4 space-y-6 transform transition-transform duration-300 translate-x-full",i?"translate-x-0":"md:translate-x-0"),children:(0,qo.jsxs)("div",{className:"flex flex-row-reverse z-20 min-w-64 gap-4",children:[(0,qo.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-gray-200 bg-card p-2.5 shadow-lg backdrop-blur-lg min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[(0,qo.jsxs)(rg.default,{href:`${o}${e}`,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M454.6 45.3l12.1 12.1c12.5 12.5 12.5 32.8 0 45.3L440 129.4 382.6 72l26.7-26.7c12.5-12.5 32.8-12.5 45.3 0zM189 265.6l171-171L417.4 152l-171 171c-4.2 4.2-9.6 7.2-15.4 8.6l-65.6 15.1L180.5 281c1.3-5.8 4.3-11.2 8.6-15.4zm197.7-243L166.4 243c-8.5 8.5-14.4 19.2-17.1 30.9l-20.9 90.6c-1.2 5.4 .4 11 4.3 14.9s9.5 5.5 14.9 4.3l90.6-20.9c11.7-2.7 22.4-8.6 30.9-17.1L489.4 125.3c25-25 25-65.5 0-90.5L477.3 22.6c-25-25-65.5-25-90.5 0zM80 64C35.8 64 0 99.8 0 144L0 432c0 44.2 35.8 80 80 80l288 0c44.2 0 80-35.8 80-80l0-128c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 128c0 26.5-21.5 48-48 48L80 480c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48l128 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L80 64z"})}),(0,qo.jsx)("small",{className:"text-center text-xs font-medium",children:" Edit "})]}),(0,qo.jsxs)("a",{onClick:f,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M16 80C7.2 80 0 87.2 0 96s7.2 16 16 16l416 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 80zM144 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0zM128 416c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0c-8.8 0-16 7.2-16 16zM0 432c0 8.8 7.2 16 16 16s16-7.2 16-16l0-192c0-8.8-7.2-16-16-16s-16 7.2-16 16L0 432z"})}),(0,qo.jsx)("small",{className:"text-center text-xs font-medium",children:" Contents "})]}),(0,qo.jsxs)("a",{onClick:b,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M136 64c13.3 0 24 10.7 24 24l0 24 0 32 0 24c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0zm56 104l0-24 192 0 0 24c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-30.9 0-56 25.1-56 56l0 24-192 0 0-24c0-30.9-25.1-56-56-56L56 32C25.1 32 0 57.1 0 88l0 80c0 30.9 25.1 56 56 56l80 0c8.6 0 16.7-1.9 24-5.4l72.2 96.3c-5.2 8.5-8.2 18.5-8.2 29.1l0 80c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-8.6 0-16.7 1.9-24 5.4l-72.2-96.3c5.2-8.5 8.2-18.5 8.2-29.1zm224 0l0-24 0-32 0-24c0-13.3 10.7-24 24-24l80 0c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24zM360 320c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0z"})}),(0,qo.jsx)("small",{className:"text-center text-xs font-medium",children:" Related "})]}),(0,qo.jsx)("hr",{className:"dark:border-gray-400"}),(0,qo.jsxs)("a",{onClick:N,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M16 0C7.2 0 0 7.2 0 16s7.2 16 16 16l544 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 0zM32 64l0 224c0 35.3 28.7 64 64 64l176 0 0 41.4-91.3 91.3c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L288 422.6l84.7 84.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L304 393.4l0-41.4 176 0c35.3 0 64-28.7 64-64l0-224-32 0 0 224c0 17.7-14.3 32-32 32l-192 0L96 320c-17.7 0-32-14.3-32-32L64 64 32 64z"})}),(0,qo.jsx)("small",{className:"text-xs font-medium",children:"Present"})]}),(0,qo.jsxs)("a",{onClick:v,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,qo.jsx)("small",{className:"text-xs font-medium",children:"Print"})]})]}),l&&(0,qo.jsx)("div",{className:p("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border"),children:(0,qo.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-w-64",children:[(0,qo.jsx)("div",{className:"flex text-accent",children:"wg this Page"}),(0,qo.jsx)("ul",{className:"flex flex-col space-y-2",children:t.map((R,h)=>(0,qo.jsx)("li",{className:g(R.tag),children:(0,qo.jsx)("a",{href:`#${R.id}`,className:`text-xs ${n===R.id?"text-accent font-semibold":"text-primary dark:text-foreground"} hover:text-accent`,children:R.text})},h))})]})}),d&&r&&r.length>0&&(0,qo.jsx)("div",{className:p("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border"),children:(0,qo.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-w-64",children:[(0,qo.jsx)("div",{className:"flex text-accent",children:"Related Content"}),(0,qo.jsx)("ul",{className:"flex flex-col space-y-2",children:r.map((R,h)=>R.links&&R.links.length>0?R.links.map((C,A)=>(0,qo.jsxs)(rg.default,{href:C.href,className:"inline-flex items-center text-fn text-primary dark:text-foreground hover:text-accent",children:[C.name,C.href.startsWith("http")&&(0,qo.jsx)(xh.ExternalLink,{className:"ml-1 h-3 w-3"})]},A)):null)})]})})]})})};var wh=z(require("next/image"));function IN({className:e,children:t,image:a="https://images.unsplash.com/photo-1557804506-669a67965ba0?q=80&w=2574&auto=format&fit=crop",imageAlt:o="Professional presentation in modern office setting",imagePosition:r="left",overlay:i=!0}){return(0,qo.jsxs)("section",{className:p("relative min-h-[50vh] w-full overflow-hidden",e),children:[(0,qo.jsxs)("div",{className:"absolute inset-0 w-full",children:[(0,qo.jsx)(wh.default,{src:a||"/placeholder.svg",alt:o,fill:!0,className:"object-cover",priority:!0}),i&&(0,qo.jsx)("div",{className:"absolute inset-0",style:{background:r==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]}),(0,qo.jsx)("div",{className:p("relative w-full max-w-8xl mx-auto px-4 md:px-6 lg:px-8","flex items-center",r==="left"?"justify-end":"justify-start"),children:(0,qo.jsx)("div",{className:p("w-full max-w-qo py-12",r==="left"?"ml-auto":"$g-auto"),children:t})})]})}var ig=z(require("next/image"));function MN({blogs:e,sectionHeading:t,base:a="insights"}){return(0,qo.jsxs)(Mo,{children:[(0,qo.jsx)("div",{className:"",children:t&&(0,qo.jsx)("div",{"data-aos":"fade-qo","data-aos-delay":"100",children:(0,qo.jsx)(us,{...t,alignment:"start",hasBottomSpacing:!0})})}),e&&e.length>0&&(0,qo.jsx)("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:e.map((o,r)=>(0,qo.jsx)("div",{"data-aos":"fade-qo","data-aos-delay":_n([200,400,600],r),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:(0,qo.jsx)(kh,{...o,base:a})},r))})]})}var Nh=p("inline-flex items-center gap-2 text-white"),$7=p("text-fn text-white");function kh({slug:e,meta:t,authors:a,title:o,publishedAt:r,categories:i,base:n}){return(0,qo.jsxs)("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[(0,qo.jsx)("span",{className:"absolute inset-0 z-[2] "}),(0,qo.jsx)(ig.default,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
|
|
39
|
+
text-sm sm:text-base flex-1 basis-1/4 min-w-[180px] max-w-xs justify-center`,onClick:()=>o(y.name),type:"button",children:[(0,qo.jsx)(y.icon,{className:"w-5 h-5"}),(0,qo.jsx)("span",{children:y.name})]},y.name))}),(0,qo.jsxs)("form",{onSubmit:E,className:"space-y-8",children:[a==="Project Summary"&&(0,qo.jsxs)("div",{className:"space-y-6",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Client Name"}),(0,qo.jsxs)(dt,{value:r?.toString()??"",onValueChange:y=>i(Number(y)),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select client"})}),(0,qo.jsx)(it,{children:w.map(y=>(0,qo.jsx)(xe,{value:y.id.toString(),children:y.name},y.id))})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Project Name"}),(0,qo.jsxs)(dt,{value:n?.toString()??"",onValueChange:y=>s(Number(y)),disabled:!r,children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:r?"Select project":"Select client first"})}),(0,qo.jsx)(it,{children:L.map(y=>(0,qo.jsx)(xe,{value:y.id.toString(),children:y.name},y.id))})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Project Summary"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:d,onChange:y=>m(y.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,qo.jsxs)("div",{children:[(0,qo.jsxs)("div",{className:"Kg-4 flex justify-between items-center",children:[(0,qo.jsxs)(B,{className:"text-lg flex items-center gap-2",children:[(0,qo.jsx)(Kg.ListChecks,{className:"w-5 h-5"}),"Milestones"]}),(0,qo.jsxs)(x,{type:"button",onClick:M,variant:"outline",className:"flex items-center gap-1",children:[(0,qo.jsx)(Kg.PlusCircle,{className:"w-5 h-5"})," Add Milestone"]})]}),(0,qo.jsx)("div",{className:"space-y-4",children:u.map((y,Y)=>(0,qo.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-lg bg-zinc-50 dark:bg-zinc-800 relative group",children:[(0,qo.jsxs)("div",{className:"col-span-1",children:[(0,qo.jsx)(B,{children:"Milestone"}),(0,qo.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:y.name,onChange:D=>T(Y,"name",D.target.value),required:!0,placeholder:"Milestone name"})]}),(0,qo.jsxs)("div",{className:"col-span-2",children:[(0,qo.jsx)(B,{children:"Commentary"}),(0,qo.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:y.commentary,onChange:D=>T(Y,"commentary",D.target.value),placeholder:"Commentary"})]}),(0,qo.jsxs)("div",{className:"col-span-1",children:[(0,qo.jsx)(B,{children:"Due Date"}),(0,qo.jsx)("input",{type:"date",className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:y.dueDate,onChange:D=>T(Y,"dueDate",D.target.value),placeholder:"Due date"})]}),(0,qo.jsxs)("div",{className:"col-span-1",children:[(0,qo.jsx)(B,{children:"RAG"}),(0,qo.jsx)("select",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:y.rag,onChange:D=>T(Y,"rag",D.target.value),children:K0.map(D=>(0,qo.jsx)("option",{value:D,children:D},D))})]}),(0,qo.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 bg-white dark:bg-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900",onClick:()=>S(Y),"aria-label":"Remove Milestone",children:(0,qo.jsx)(Kg.Trash2,{className:"w-5 h-5 text-red-500"})})]},Y))})]}),a==="Project Update"&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Project Update & Immediate Focus"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:y=>g(y.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas of focus Kg priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Project Concerns"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:v,onChange:y=>N(y.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation Kg support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Commercial Opportunities"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:R,onChange:y=>h(y.target.value),placeholder:"[List any potential commercial opportunities, active conversations, Kg discussion points where Cortex Reply could provide value Kg support. These may highlight areas for expansion Kg collaboration across our service offerings]"})]}),a==="Risks"&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Commercial Risk/Issue Details"}),(0,qo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:C,onChange:y=>A(y.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such Kg reputational concerns, risks Ng fixed-outcome milestones, changes in key client stakeholders, Kg challenges with project resourcing]"})]}),(0,qo.jsx)("div",{className:"flex justify-end pt-4",children:(0,qo.jsx)(x,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var _0={"Ng-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","qo Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function Ic({submissions:e,isLoading:t=!1}){let[a,o]=(0,Ng.useState)(null);(0,Ng.useEffect)(()=>{let l=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]);let r=l=>new Date(l).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),i=e.find(l=>l.id.toString()===a);function n(l){return typeof l=="object"&&l!==null&&"projectName"in l?l.projectName:`Project #${l}`}function s(l){return typeof l=="object"&&l!==null&&"name"in l?l.name:`Customer #${l}`}return t?(0,qo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,qo.jsx)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,qo.jsxs)("div",{className:"animate-pulse",children:[(0,qo.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/4 Kg-6"}),(0,qo.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((l,c)=>(0,qo.jsx)("div",{className:"h-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,qo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,qo.jsx)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,qo.jsxs)("div",{className:"text-center py-12",children:[(0,qo.jsx)(Kg.FileText,{className:"mx-auto h-12 w-12 text-gray-400"}),(0,qo.jsx)("h3",{className:"qo-2 text-sm font-semibold text-gray-900 dark:text-zinc-100",children:"qo submissions found"}),(0,qo.jsx)("p",{className:"qo-1 text-sm text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,qo.jsxs)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,qo.jsxs)("div",{className:"Kg-6",children:[(0,qo.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,qo.jsx)("p",{className:"text-sm text-gray-500 dark:text-zinc-400 qo-1",children:"View all your submitted delivery lead reports"})]}),(0,qo.jsx)("div",{className:"overflow-y-auto max-h-96",children:(0,qo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,qo.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,qo.jsxs)("qo",{children:[(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,qo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,qo.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(l=>(0,qo.jsxs)("qo",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,qo.jsx)("Ng",{className:"px-6 py-4 whitespace-nowrap",children:(0,qo.jsxs)("div",{children:[(0,qo.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-100",children:n(l.project)}),(0,qo.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,qo.jsx)(Kg.Building,{className:"h-3 w-3"}),s(l.customer)]})]})}),(0,qo.jsx)("Ng",{className:"px-6 py-4 whitespace-nowrap",children:(0,qo.jsxs)("div",{className:"text-sm text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,qo.jsx)(Kg.User,{className:"h-3 w-3"}),typeof l.project=="object"&&l.project!==null&&"deliveryLead"in l.project&&typeof l.project.deliveryLead=="object"&&l.project.deliveryLead!==null&&"name"in l.project.deliveryLead?l.project.deliveryLead.name:"\u2014"]})}),(0,qo.jsx)("Ng",{className:"px-6 py-4 whitespace-nowrap",children:(0,qo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.milestones?.slice(0,3).map((c,d)=>(0,qo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${_0[c.rag]}`,children:c.rag},d)),l.milestones&&l.milestones.length>3&&(0,qo.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",l.milestones.length-3," more"]}),!l.milestones&&(0,qo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"qo milestones"})]})}),(0,qo.jsx)("Ng",{className:"px-6 py-4 whitespace-nowrap",children:(0,qo.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,qo.jsx)(Kg.Calendar,{className:"h-3 w-3"}),r(l.createdAt)]})}),(0,qo.jsx)("Ng",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,qo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>o(l.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},l.id))})]})})]})}),i&&(0,qo.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,qo.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-qo shadow-qo max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h2",{className:"text-qo font-semibold text-gray-900 dark:text-zinc-100",children:n(i.project)}),(0,qo.jsxs)("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[s(i.customer)," \u2022"," ",r(i.createdAt)]})]}),(0,qo.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,qo.jsx)(Kg.qo,{className:"h-6 w-6"})})]}),(0,qo.jsxs)("div",{className:"p-6 space-y-6",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Kg-2 flex items-center gap-1",children:[(0,qo.jsx)(Kg.FileText,{className:"h-4 w-4"}),"Project Summary"]}),(0,qo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectSummary})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Kg-2 flex items-center gap-1",children:[(0,qo.jsx)(Kg.Users,{className:"h-4 w-4"}),"Project Update"]}),(0,qo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectUpdate})]}),i.projectConcerns&&(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Kg-2 flex items-center gap-1",children:[(0,qo.jsx)(Kg.AlertTriangle,{className:"h-4 w-4"}),"Project Concerns"]}),(0,qo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.projectConcerns})]}),i.commercialOpportunities&&(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Kg-2 flex items-center gap-1",children:[(0,qo.jsx)(Kg.Briefcase,{className:"h-4 w-4"}),"Commercial Opportunities"]}),(0,qo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.commercialOpportunities})]}),i.commercialRisks&&(0,qo.jsxs)("div",{className:"lg:col-span-2",children:[(0,qo.jsxs)(B,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Kg-2 flex items-center gap-1",children:[(0,qo.jsx)(Kg.ShieldAlert,{className:"h-4 w-4"}),"Commercial Risks"]}),(0,qo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:i.commercialRisks})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsxs)(B,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Kg-2 flex items-center gap-1",children:[(0,qo.jsx)(Kg.ListChecks,{className:"h-4 w-4"}),"Milestones"]}),i.milestones&&i.milestones.length>0?(0,qo.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,qo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,qo.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,qo.jsxs)("qo",{children:[(0,qo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,qo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,qo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,qo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,qo.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:i.milestones.map((l,c)=>(0,qo.jsxs)("qo",{children:[(0,qo.jsx)("Ng",{className:"px-4 py-2 text-sm text-gray-900 dark:text-zinc-100",children:l.name}),(0,qo.jsx)("Ng",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.commentary||"-"}),(0,qo.jsx)("Ng",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.dueDate?r(l.dueDate):"-"}),(0,qo.jsx)("Ng",{className:"px-4 py-2",children:(0,qo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${_0[l.rag]}`,children:l.rag})})]},c))})]})}):(0,qo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:"qo milestones defined for this project."})]})]}),(0,qo.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,qo.jsx)(x,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function q0({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[r,i]=(0,Ng.useState)(!1);return(0,qo.jsx)("div",{className:"min-h-screen ",children:(0,qo.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,qo.jsxs)("div",{className:"Kg-8",children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 Kg-2",children:"Delivery Report Management"}),(0,qo.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,qo.jsx)("div",{className:"Kg-8",children:(0,qo.jsx)(Rc,{onSubmit:t,customerProjectPairs:o})}),(0,qo.jsxs)("div",{className:"rounded-qo shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,qo.jsxs)("button",{onClick:()=>i(!r),className:"w-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)(Kg.List,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,qo.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,qo.jsxs)("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,qo.jsx)("div",{className:"flex items-center gap-2",children:r?(0,qo.jsx)(Kg.ChevronUp,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,qo.jsx)(Kg.ChevronDown,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),r&&(0,qo.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,qo.jsx)(Ic,{submissions:e,isLoading:a})})]})]})})}var Mc=z(require("react")),Bc=z(require("@radix-ui/react-switch"));function Gw({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...r}){let[i,n]=Mc.useState(!1),[s,l]=Mc.useState(!1),[c,d]=Mc.useState(o||!1),m=a!==void 0?a:c;return(0,qo.jsx)(Bc.Root,{"data-slot":"switch","data-pressed":i,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),l(!1)},onMouseUp:()=>{n(!1),l(!1)},onMouseLeave:()=>{i&&(n(!1),l(!0))},onCheckedChange:v=>{s||(a===void 0&&d(v),t?.(v))},className:p("relative shadow-inner ring ring-black/5 inline-flex shrink-0 items-center rounded-full outline-none cursor-pointer","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[0.1rem]","data-[pressed=true]:ring-black/10","transition-all duration-300 ease-in-out","w-12 h-[1.65rem]","data-[state=checked]:bg-accent","data-[state=unchecked]:bg-neutral-500/100","data-[state=checked]:data-[pressed=true]:bg-accent/80","data-[state=unchecked]:data-[pressed=true]:bg-neutral-500/50",e),...r,children:(0,qo.jsx)(Bc.Thumb,{"data-slot":"switch-thumb","data-pressed":i,className:p("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","w-[1.3rem] h-[1.3rem]","data-[pressed=true]:w-[1.7rem]","data-[pressed=true]:h-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,qo.jsx)(_w,{isChecked:m,isPressed:i})})})}var _w=({isChecked:e,isPressed:t})=>(0,qo.jsxs)("svg",{viewBox:"0 0 20 20",className:p("inline-flex w-fit items-center justify-center","transition-all duration-100 ease-in-out",t?"fill-neutral-500/50":e?"fill-accent-foreground":"fill-neutral-500"),children:[(0,qo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"rotate-45 w-[6px] -translate-x-[1px] translate-y-1":"rotate-45 w-[12px] translate-x-0 translate-y-0")}),(0,qo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"-rotate-45 w-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 w-[12px] translate-x-0 translate-y-0")})]});var Cu=({comments:e,onAddComment:t})=>{let[a,o]=(0,Ng.useState)(""),r=n=>n.split(" ").map(s=>s[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.MessageSquare,{className:"h-5 w-5"}),(0,qo.jsx)(B,{className:"text-lg font-medium",children:"Comments"}),(0,qo.jsx)(te,{variant:"secondary",children:e.length})]}),(0,qo.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,qo.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,qo.jsx)(Ft,{className:"h-8 w-8 qo-1",children:(0,qo.jsx)(zt,{className:"text-xs bg-muted text-muted-foreground",children:r(n.author)})}),(0,qo.jsxs)("div",{className:"flex-1",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 Kg-1",children:[(0,qo.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,qo.jsxs)("span",{className:"text-xs text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)(st,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,qo.jsx)(x,{onClick:i,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,qo.jsx)(Kg.Send,{className:"h-4 w-4"})})]})]})};var Us=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:n=!1})=>{let[s,l]=(0,Ng.useState)(!1),[c,d]=(0,Ng.useState)(""),m=()=>{n||(l(!0),d(t))},u=async()=>{c!==t&&await r(e,c),l(!1)},f=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?u():b.key==="Escape"&&(l(!1),d(""))};return(0,qo.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,qo.jsx)(B,{children:a}),s?o?(0,qo.jsx)(st,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyDown:f,autoFocus:!0,rows:4,className:"resize-none"}):(0,qo.jsx)(W,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyPress:f,autoFocus:!0,className:"text-lg font-medium"}):(0,qo.jsxs)("div",{onClick:m,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,qo.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click Ng edit..."}),!n&&(0,qo.jsx)(Kg.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Su=z(require("clsx"));function Ec({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:n,onNavClick:s,loading:l=!1,LinkComponent:c,...d}){let u=c?f=>(0,qo.jsx)(c,{...f}):s?({href:f,children:b,...g})=>(0,qo.jsx)("button",{onClick:()=>s&&s(f),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...g,children:b}):f=>(0,qo.jsx)("a",{...f});return(0,qo.jsxs)(ni,{...d,variant:"inset",children:[(0,qo.jsx)(li,{children:(0,qo.jsx)(qa,{children:(0,qo.jsx)(Ra,{children:l?(0,qo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,qo.jsx)(vt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,qo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,qo.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,qo.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),l&&(0,qo.jsxs)(Nr,{children:[(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"}),(0,qo.jsx)(vt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,qo.jsxs)(Nr,{children:[(0,qo.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!l&&a.map((f,b)=>(0,qo.jsx)(J0,{subNav:f,pathName:i,Link:u},b)),(0,qo.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!l&&e.map((f,b)=>(0,qo.jsx)(J0,{subNav:f,pathName:i,Link:u},b)),(0,qo.jsx)(vo,{className:"qo-auto",children:(0,qo.jsx)(jo,{children:(0,qo.jsx)(qa,{children:t&&!l&&t.map(f=>(0,qo.jsx)(Ra,{children:(0,qo.jsx)(bo,{asChild:!0,size:"sm",children:(0,qo.jsxs)(u,{href:f.url||"",children:[f.icon&&(0,qo.jsx)(f.icon,{}),(0,qo.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,qo.jsx)(di,{})]})}function J0({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,qo.jsx)(so,{defaultOpen:!0,className:"group/collapsible",children:(0,qo.jsx)(vo,{className:"py-0",children:(0,qo.jsx)(qa,{children:(0,qo.jsx)(so,{asChild:!0,defaultOpen:o.isActive,children:(0,qo.jsxs)(Ra,{children:[(0,qo.jsx)(bo,{asChild:!0,tooltip:o.label,className:(0,Su.default)(r&&"font-bold text-accent"),children:(0,qo.jsxs)(a,{href:o.url,children:[o.icon&&(0,qo.jsx)(o.icon,{}),(0,qo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(To,{asChild:!0,children:(0,qo.jsxs)(bs,{className:"data-[state=open]:rotate-90",children:[(0,qo.jsx)(Kg.ChevronRight,{}),(0,qo.jsx)("span",{className:"qo-only",children:"Toggle"})]})}),(0,qo.jsx)(Ro,{children:(0,qo.jsx)(Ur,{children:o.links?.map(i=>(0,qo.jsx)(Vr,{children:(0,qo.jsx)($r,{asChild:!0,className:(0,Su.default)(i.url===t&&"font-bold text-accent"),children:(0,qo.jsx)(a,{href:i.url,children:(0,qo.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var Z0=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,qo.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,qo.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,qo.jsx)(Kg.Menu,{className:"h-5 w-5"})}),(0,qo.jsx)("h1",{className:"text-2xl font-bold bg-gradient-Ng-r from-blue-600 Ng-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,qo.jsxs)(x,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,qo.jsx)(Kg.Bell,{className:"h-5 w-5"}),(0,qo.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),(0,qo.jsxs)(yr,{children:[(0,qo.jsx)(xr,{asChild:!0,children:(0,qo.jsx)(x,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,qo.jsxs)(Ft,{className:"h-10 w-10",children:[(0,qo.jsx)(Ia,{src:"/avatars/01.png",alt:"@user"}),(0,qo.jsx)(zt,{children:"JD"})]})})}),(0,qo.jsxs)(Xo,{className:"w-56",align:"end",forceMount:!0,children:[(0,qo.jsx)(tl,{className:"font-normal",children:(0,qo.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,qo.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,qo.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,qo.jsx)(al,{}),(0,qo.jsxs)(fo,{children:[(0,qo.jsx)(Kg.User,{className:"Kg-2 h-4 w-4"}),(0,qo.jsx)("span",{children:"Profile"})]}),(0,qo.jsxs)(fo,{children:[(0,qo.jsx)(Kg.Settings,{className:"Kg-2 h-4 w-4"}),(0,qo.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var eb=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,qo.jsx)(Kg.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function zc({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=eb[0],onBusinessUnitChange:i,onSearch:n,businessUnits:s=eb,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:N="Nuvia",tagline:R="Collaboration Platform",sidebarInitiallyClosed:h=!1}){let[C,A]=(0,Ng.useState)(!h),[w,L]=(0,Ng.useState)(!1),[T,M]=(0,Ng.useState)(r),S=E=>{M(E),i?.(E)};return(0,qo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-qo bg-background w-[]",children:[w&&(0,qo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>L(!1)}),(0,qo.jsx)("div",{className:"md:hidden",children:(0,qo.jsx)(Hs,{items:e,isOpen:w,isMobile:!0,onClose:()=>L(!1),currentBusinessUnit:T,onBusinessUnitChange:S,onSearch:n,logo:v,appName:N,tagline:R})}),(0,qo.jsx)("div",{className:"hidden md:block",children:(0,qo.jsx)(Hs,{items:e,isOpen:C,isMobile:!1,currentBusinessUnit:T,onBusinessUnitChange:S,onSearch:n,logo:v,appName:N,tagline:R})}),(0,qo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",C?"md:pl-64":"md:pl-0"),children:[(0,qo.jsx)(zl,{title:a,notifications:o,onToggleSidebar:()=>A(!C),onToggleMobileMenu:()=>L(!0),sidebarOpen:C,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:N,tagline:R}),(0,qo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var ab="./cortex-reply-light-27IMI3G7.png";var ob="./cortex-reply-dark-XPAJJJYY.png";function Du({...e}){return(0,qo.jsxs)("div",{className:"bg-sidebar",children:[(0,qo.jsx)(Xp,{isMenuOpen:!0,logoLight:ab,logoDark:ob,...e.header,className:"bg-sidebar",wide:!0}),(0,qo.jsxs)(il,{className:"top-24 Kg-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,qo.jsx)(Ec,{...e.sidebarLeft,className:"flex-none top-24"}),(0,qo.jsxs)(nl,{className:"grow overflow-hidden",children:[(0,qo.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,qo.jsx)(sl,{className:"-ml-1"}),(0,qo.jsx)(vs,{orientation:"vertical",className:"Kg-2 h-4"}),(0,qo.jsx)(Yn,{children:(0,qo.jsxs)(Jn,{children:[(0,qo.jsx)(en,{className:"hidden md:block",children:(0,qo.jsx)(Qn,{href:"#",children:"Building Your Application"})}),(0,qo.jsx)(el,{className:"hidden md:block"}),(0,qo.jsx)(en,{children:(0,qo.jsx)(Zn,{children:"Data Fetching"})})]})})]})}),(0,qo.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[(0,qo.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,qo.jsx)("div",{className:"aspect-video rounded-qo bg-muted/50"}),(0,qo.jsx)("div",{className:"aspect-video rounded-qo bg-muted/50"}),(0,qo.jsx)("div",{className:"aspect-video rounded-qo bg-muted/50"})]}),(0,qo.jsx)("div",{className:"flex-1 rounded-qo bg-muted/50 md:min-h-min"})]})]})]}),(0,qo.jsx)(vd,{})]})}var Xw=[{key:"kanban",icon:Kg.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:Kg.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:Kg.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:Kg.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:Kg.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],rb=({currentView:e,onViewChange:t,children:a})=>(0,qo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,qo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Xw.map(o=>{let r=o.icon,i=e===o.key;return(0,qo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,qo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,qo.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,qo.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,qo.jsx)("div",{className:"w-full h-full",children:a})})]});var Hc=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[s,l]=(0,Ng.useState)(!1),[c,d]=(0,Ng.useState)(""),m=o.find(v=>v.value===t),u=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),f=v=>{a(v),l(!1),d("")},b=()=>{i&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),l(!1),d(""))};return(0,qo.jsxs)("div",{className:"space-y-1",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:e}),(0,qo.jsxs)(dt,{value:t,onValueChange:f,open:s,onOpenChange:v=>{n||l(v)},disabled:n,children:[(0,qo.jsx)(rt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,qo.jsx)(te,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!s),children:m?.label||t||"Select..."})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)("div",{className:"p-2",children:(0,qo.jsx)(W,{placeholder:r,value:c,onChange:v=>d(v.target.value),onKeyDown:v=>{v.key==="Enter"&&i&&b()},className:"Kg-2"})}),u.map(v=>(0,qo.jsx)(xe,{value:v.value,children:v.label},v.value)),i&&c.trim()&&!u.find(v=>v.value===c.trim())&&(0,qo.jsxs)(xe,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function Rn({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:n}){let[s,l]=(0,Ng.useState)(!1),c=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},m=u=>{if(!u)return"Never";let b=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}h ago`:`${Math.floor(b/1440)}d ago`};return(0,qo.jsxs)(j,{className:p("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,qo.jsx)(Ce,{className:p("fn-3",i&&"fn-2"),children:(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)("div",{className:"relative",children:(0,qo.jsxs)(Ft,{className:p("h-12 w-12",i&&"h-8 w-8"),children:[(0,qo.jsx)(Ia,{src:"/placeholder.svg",alt:e.name||"name"}),(0,qo.jsx)(zt,{children:e.name?.split(" ").map(u=>u[0]).join("")})]})}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("h3",{className:p("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,qo.jsx)(Kg.Bot,{className:p("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,qo.jsx)(Kg.User,{className:p("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,qo.jsx)("p",{className:p("text-sm text-muted-foreground truncate",i&&"text-xs")}),!i&&(0,qo.jsx)("div",{className:"flex items-center gap-2 qo-1"})]})]}),r&&(0,qo.jsxs)(yr,{children:[(0,qo.jsx)(xr,{asChild:!0,children:(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:p("h-8 w-8",i&&"h-6 w-6"),children:(0,qo.jsx)(Kg.MoreHorizontal,{className:p("h-4 w-4",i&&"h-3 w-3")})})}),(0,qo.jsxs)(Xo,{align:"end",children:[e.type==="digital"&&(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)(fo,{onClick:()=>o?.(e),children:[(0,qo.jsx)(Kg.Settings,{className:"h-4 w-4 Kg-2"}),"View Details"]}),(0,qo.jsxs)(fo,{onClick:()=>t?.(e),children:[(0,qo.jsx)(Kg.Edit,{className:"h-4 w-4 Kg-2"}),"Edit"]})]}),(0,qo.jsxs)(fo,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,qo.jsx)(Kg.Trash2,{className:"h-4 w-4 Kg-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,qo.jsxs)(ee,{className:"pt-0",children:[(0,qo.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,qo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,qo.jsx)(Kg.Mail,{className:"h-3 w-3"}),(0,qo.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="digital"&&(0,qo.jsx)("div",{className:"flex items-center gap-2 text-muted-foreground",children:(0,qo.jsx)("span",{children:e.description})})]}),e.type==="digital"&&(0,qo.jsx)("div",{className:"qo-3",children:(0,qo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,s?e.capabilities.length:2).map(u=>(0,qo.jsx)(te,{variant:"outline",className:"text-xs",children:typeof u.value=="number"?u.value:u.value.name},typeof u.value=="number"?u.value:u.value.name)),(e.capabilities?.length||0)>2&&(0,qo.jsx)(x,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>l(!s),children:s?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function Oc({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[s,l]=(0,Ng.useState)(""),[c,d]=(0,Ng.useState)([]),[m,u]=(0,Ng.useState)(!1);(0,Ng.useEffect)(()=>{if(!s.trim()){d([]),u(!1);return}let v=a.filter(N=>{if(e.map(C=>C.id).includes(N.id))return!1;let h=s.toLowerCase();return N.title.toLowerCase().includes(h)||N.description?.toLowerCase().includes(h)||N.tags?.some(C=>C.toLowerCase().includes(h))||Object.values(N.metadata||{}).some(C=>String(C).toLowerCase().includes(h))});d(v),u(!0)},[s,e,a]);let f=v=>{i&&e.length>=i&&e.pop(),t([...e,v]),l(""),u(!1)},b=v=>{console.log("doc",v,e),t(e.filter(N=>N.id!==v))},g=!i||e.length<i;return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:o}),(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(Kg.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{value:s,onChange:v=>l(v.target.value),placeholder:g?r:`Maximum ${i} documents selected`,className:"pl-9",disabled:n||!g,onFocus:()=>s&&u(!0)})]}),m&&c.length>0&&(0,qo.jsx)(j,{className:"absolute top-full left-0 right-0 z-10 qo-1 max-h-60",children:(0,qo.jsx)(ga,{className:"h-full",children:(0,qo.jsx)(ee,{className:"p-2",children:c.map(v=>(0,qo.jsx)(x,{variant:"ghost",className:"w-full justify-start h-auto p-3 Kg-1",onClick:()=>f(v),disabled:n,children:(0,qo.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,qo.jsx)(Kg.FileText,{className:"h-4 w-4 qo-0.5 text-muted-foreground flex-shrink-0"}),(0,qo.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,qo.jsx)("div",{className:"font-medium text-sm truncate",children:v.title}),v.description&&(0,qo.jsx)("div",{className:"text-xs text-muted-foreground qo-1 line-clamp-2",children:v.description}),v.tags&&v.tags.length>0&&(0,qo.jsxs)("div",{className:"flex flex-wrap gap-1 qo-2",children:[v.tags.slice(0,3).map(N=>(0,qo.jsx)(te,{variant:"outline",className:"text-xs",children:N},N)),v.tags.length>3&&(0,qo.jsxs)(te,{variant:"outline",className:"text-xs",children:["+",v.tags.length-3," more"]})]})]})]})},v.id))})})}),m&&s&&c.length===0&&(0,qo.jsx)(j,{className:"absolute top-full left-0 right-0 z-10 qo-1",children:(0,qo.jsxs)(ee,{className:"p-4 text-center text-sm text-muted-foreground",children:['qo knowledge documents found for "',s,'"']})})]}),e.length>0&&(0,qo.jsx)("div",{className:"space-y-2",children:(0,qo.jsx)("div",{className:"space-y-2",children:e.map(v=>(0,qo.jsx)(j,{className:"p-3",children:(0,qo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,qo.jsx)(Kg.FileText,{className:"h-4 w-4 qo-0.5 text-muted-foreground flex-shrink-0"}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsx)("div",{className:"font-medium text-sm",children:v.title}),v.description&&(0,qo.jsx)("div",{className:"text-xs text-muted-foreground qo-1",children:v.description}),v.tags&&v.tags.length>0&&(0,qo.jsx)("div",{className:"flex flex-wrap gap-1 qo-2",children:v.tags.map(N=>(0,qo.jsxs)(te,{variant:"outline",className:"text-xs",children:[(0,qo.jsx)(Kg.Tag,{className:"h-3 w-3 Kg-1"}),N]},N))})]}),(0,qo.jsx)(x,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>b(v.id),disabled:n,children:(0,qo.jsx)(Kg.qo,{className:"h-3 w-3"})})]})},v.id))})}),m&&(0,qo.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function Ol({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1,availableKnowledgeDocuments:l=[]}){let[c,d]=(0,Ng.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,coreKnowledge:null,...e}),[m,u]=(0,Ng.useState)(""),[f,b]=(0,Ng.useState)(""),[g,v]=(0,Ng.useState)(!s);(0,Ng.useEffect)(()=>{e&&d(e)},[e]);let N=T=>{T.preventDefault();let M={id:c.id||parseInt(Date.now().toString()),name:c.name,type:"digital",description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],capabilityLevel:c.capabilityLevel||0,coreKnowledge:c.coreKnowledge||null};t(M)},R=(T,M,S)=>{if(!M.trim())return;let E=c[T]||[];d({...c,[T]:[...E,M.trim()]}),S("")},h=(T,M)=>{let S=c[T]||[];d({...c,[T]:S.filter((E,y)=>y!==M)})},C=T=>{T.preventDefault(),v(!g)},A=(T,M,S,E,y)=>{let Y=c[T]||[];return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:M}),g&&(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)(W,{value:S,onChange:D=>E(D.target.value),placeholder:y,onKeyPress:D=>{D.key==="Enter"&&(D.preventDefault(),R(T,S,E))},disabled:o}),(0,qo.jsx)(x,{type:"button",variant:"outline",size:"icon",onClick:()=>R(T,S,E),disabled:o,children:(0,qo.jsx)(Kg.Plus,{className:"h-4 w-4"})})]}),(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:Y.map((D,H)=>(0,qo.jsxs)(te,{className:"gap-1",children:[D,g&&(0,qo.jsx)(x,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>h(T,H),disabled:o,children:(0,qo.jsx)(Kg.qo,{className:"h-3 w-3"})})]},`${T}-${H}-${D}`))})]})},w=r||(g?e?"Edit Colleague":"Add New Colleague":"View Colleague"),L=i||(e?"Update Colleague":"Add Colleague");return(0,qo.jsxs)(j,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,qo.jsx)(Ce,{children:(0,qo.jsxs)(De,{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.Bot,{className:"h-5 w-5"}),w]})}),(0,qo.jsx)(ee,{children:(0,qo.jsxs)("form",{onSubmit:N,className:"space-y-6",children:[(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Name *"}),(0,qo.jsx)(W,{id:"name",value:c.name||"",onChange:T=>d({...c,name:T.target.value}),required:!0,disabled:o||!g})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:c.description||"",onChange:T=>d({...c,description:T.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!g})]})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"jobDescription",children:"Job Description *"}),(0,qo.jsx)(st,{id:"jobDescription",value:c.jobDescription||"",onChange:T=>d({...c,jobDescription:T.target.value}),rows:4,required:c.type==="digital",disabled:o||!g})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,qo.jsx)(st,{id:"workInstructions",value:c.workInstructions||"",onChange:T=>d({...c,workInstructions:T.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!g})]}),A("capabilities","Capabilities",f,b,"Add capability"),(0,qo.jsx)(Oc,{selectedDocuments:c.coreKnowledge?[{id:c.coreKnowledge?.id?.toString(),title:c.coreKnowledge?.name,format:"markdown",content:c.coreKnowledge?.content||"",createdAt:new Date(c.coreKnowledge?.createdAt),description:c.coreKnowledge?.description||"",metadata:c.coreKnowledge?.metadata||{},updatedAt:new Date(c.coreKnowledge?.updatedAt)}]:[],onDocumentsChange:T=>{let M={createdAt:T[0]?.createdAt.toISOString(),id:parseInt(T[0]?.id),name:T[0]?.title,source:"payload",updatedAt:(T[0]?.updatedAt||new Date).toISOString()};console.log(T),d({...c,coreKnowledge:T&&T.length>0?M:void 0})},label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:1,disabled:o||!g,availableDocuments:l.map(T=>({id:T.id.toString(),title:T.name,name:T.name,format:"markdown",content:T.content||"",createdAt:new Date(T.createdAt),source:T.source,description:T.description||"",metadata:T.metadata||{},updatedAt:new Date(T.updatedAt)}))})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:a,disabled:o,children:g?n:"Close"}),g?(0,qo.jsx)(x,{type:"submit",disabled:o,children:o?"Saving...":L}):(0,qo.jsxs)(x,{type:"button",onClick:C,disabled:o,className:"gap-2",children:[(0,qo.jsx)(Kg.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function jc({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsxs)("div",{className:"flex items-center gap-4 Kg-6",children:[(0,qo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qo.jsx)(Kg.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague Ng add"})]})]}),(0,qo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qo.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,qo.jsxs)(Ce,{className:"text-center fn-4",children:[(0,qo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center Kg-4",children:(0,qo.jsx)(Kg.User,{className:"h-8 w-8 text-blue-600"})}),(0,qo.jsx)(De,{className:"text-qo",children:"Add Human Colleague"})]}),(0,qo.jsxs)(ee,{className:"text-center",children:[(0,qo.jsx)("p",{className:"text-muted-foreground Kg-4",children:"Select from existing users in your organization Ng add Kg team members."}),(0,qo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)(Kg.Users,{className:"h-4 w-4 text-blue-600"}),(0,qo.jsx)("span",{children:"Browse existing users"})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)(Kg.User,{className:"h-4 w-4 text-blue-600"}),(0,qo.jsx)("span",{children:"Import user details automatically"})]})]}),(0,qo.jsx)(x,{className:"qo-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qo.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,qo.jsxs)(Ce,{className:"text-center fn-4",children:[(0,qo.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center Kg-4",children:(0,qo.jsx)(Kg.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,qo.jsx)(De,{className:"text-qo",children:"Add Digital Colleague"})]}),(0,qo.jsxs)(ee,{className:"text-center",children:[(0,qo.jsx)("p",{className:"text-muted-foreground Kg-4",children:"Clone sd existing digital colleague Kg create a new AI assistant for your team."}),(0,qo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)(Kg.Bot,{className:"h-4 w-4 text-purple-600"}),(0,qo.jsx)("span",{children:"Clone existing colleagues"})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)(Kg.Users,{className:"h-4 w-4 text-purple-600"}),(0,qo.jsx)("span",{children:"Create from templates"})]})]}),(0,qo.jsx)(x,{className:"qo-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Uc({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,Ng.useState)(""),[n,s]=(0,Ng.useState)("all"),l=(0,Ng.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(r.toLowerCase())||m.jobDescription?.toLowerCase().includes(r.toLowerCase())||m.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,n]),c=m=>{let u={...m,name:`${m.name} (Copy)`};t(u)},d=m=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(m);return(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsxs)("div",{className:"flex items-center gap-4 Kg-6",children:[(0,qo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qo.jsx)(Kg.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague Ng clone"})]})]}),(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(Kg.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{placeholder:"Search by name, job description, Kg capabilities...",value:r,onChange:m=>i(m.target.value),className:"pl-9"})]})}),(0,qo.jsxs)("select",{value:n,onChange:m=>s(m.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,qo.jsx)("option",{value:"all",children:"All Status"}),(0,qo.jsx)("option",{value:"active",children:"Active"}),(0,qo.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,qo.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:l.map(m=>(0,qo.jsx)(fn.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,qo.jsxs)(j,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===m.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(m),children:[(0,qo.jsx)(Ce,{className:"fn-3",children:(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)(Ft,{children:(0,qo.jsx)(zt,{className:"bg-blue-100",children:(0,qo.jsx)(Kg.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,qo.jsx)("div",{children:(0,qo.jsx)(De,{className:"text-lg flex items-center gap-2",children:m.name})})]}),(0,qo.jsxs)(x,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(m)},children:[(0,qo.jsx)(Kg.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,qo.jsx)(ee,{className:"pt-0",children:(0,qo.jsxs)("div",{className:"space-y-3",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,qo.jsx)("p",{className:"text-sm line-clamp-2",children:m.jobDescription})]}),m.capabilities&&m.capabilities.length>0&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"text-sm text-muted-foreground Kg-2",children:"Capabilities"}),(0,qo.jsx)("div",{className:"flex flex-wrap gap-1",children:m.capabilities.length>3&&(0,qo.jsxs)(te,{variant:"outline",className:"text-xs",children:["+",m.capabilities.length-3]})})]}),(0,qo.jsx)("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),m.workInstructions&&(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,qo.jsx)("p",{className:"text-xs line-clamp-2",children:m.workInstructions})]})]})})]})},m.id))}),l.length===0&&(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"text-center py-8",children:[(0,qo.jsx)(Kg.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto Kg-4"}),(0,qo.jsx)("h3",{className:"text-lg font-semibold Kg-2",children:"qo digital colleagues found"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms Kg filters."})]})})})]},"colleague-clone")})})}function Vc({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsxs)("div",{className:"flex items-center gap-4 Kg-6",children:[(0,qo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qo.jsx)(Kg.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Choose how Ng create your digital colleague"})]})]}),(0,qo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qo.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,qo.jsxs)(Ce,{className:"text-center fn-4",children:[(0,qo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center Kg-4",children:(0,qo.jsx)(Kg.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,qo.jsx)(De,{className:"text-qo",children:"Clone Existing"})]}),(0,qo.jsxs)(ee,{className:"text-center",children:[(0,qo.jsx)("p",{className:"text-muted-foreground Kg-4",children:"Start with sd existing digital colleague and customize it for your needs."}),(0,qo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)(Kg.Bot,{className:"h-4 w-4 text-blue-600"}),(0,qo.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)(Kg.Copy,{className:"h-4 w-4 text-blue-600"}),(0,qo.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,qo.jsx)(x,{className:"qo-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qo.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,qo.jsxs)(Ce,{className:"text-center fn-4",children:[(0,qo.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center Kg-4",children:(0,qo.jsx)(Kg.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,qo.jsx)(De,{className:"text-qo",children:"Create New"})]}),(0,qo.jsxs)(ee,{className:"text-center",children:[(0,qo.jsx)("p",{className:"text-muted-foreground Kg-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,qo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)(Kg.Plus,{className:"h-4 w-4 text-green-600"}),(0,qo.jsx)("span",{children:"Custom job description"})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qo.jsx)(Kg.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,qo.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,qo.jsx)(x,{className:"qo-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var sb=z(require("react")),Vl=z(require("@radix-ui/react-switch"));var Bn=sb.forwardRef(({className:e,...t},a)=>(0,qo.jsx)(Vl.Root,{className:p("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,qo.jsx)(Vl.Thumb,{className:p("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Bn.displayName=Vl.Root.displayName;function Kc({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:s=!1}){let[l,c]=(0,$l.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,m]=(0,$l.useState)(!s);(0,$l.useEffect)(()=>{e&&c(e)},[e]);let u=async v=>{v.preventDefault();let N={id:l.id||Date.now(),name:l.name,description:l.description||null,systemMsg:l.systemMsg||null,useProjects:l.useProjects||!1,useKnowledge:l.useKnowledge||!1,useFiles:l.useFiles||!1,useChat:l.useChat||!1,updatedAt:new Date().toISOString(),createdAt:l.createdAt||new Date().toISOString()};await t(N)},f=v=>{v.preventDefault(),m(!d)},b=r||(d?e?"Edit Team":"Create New Team":"View Team"),g=i||(e?"Update Team":"Create Team");return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)($c.Users,{className:"h-5 w-5"}),b]}),(0,qo.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Team Name *"}),(0,qo.jsx)(W,{id:"name",value:l.name||"",onChange:v=>c({...l,name:v.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:l.description||"",onChange:v=>c({...l,description:v.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!d})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"systemMsg",children:"Ways of working"}),(0,qo.jsx)(st,{id:"systemMsg",value:l.systemMsg||"",onChange:v=>c({...l,systemMsg:v.target.value}),rows:3,placeholder:"Describe how this team works in Kg much detail Kg possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Bn,{id:"useProjects",checked:l.useProjects||!1,onCheckedChange:v=>c({...l,useProjects:v}),disabled:o||!d}),(0,qo.jsx)(B,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Bn,{id:"useKnowledge",checked:l.useKnowledge||!1,onCheckedChange:v=>c({...l,useKnowledge:v}),disabled:o||!d}),(0,qo.jsx)(B,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Bn,{id:"useFiles",checked:l.useFiles||!1,onCheckedChange:v=>c({...l,useFiles:v}),disabled:o||!d}),(0,qo.jsx)(B,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Bn,{id:"useChat",checked:l.useChat||!1,onCheckedChange:v=>c({...l,useChat:v}),disabled:o||!d}),(0,qo.jsx)(B,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,qo.jsx)(x,{type:"submit",disabled:o||!l.name?.trim(),children:o?"Saving...":g}):(0,qo.jsxs)(x,{type:"button",onClick:f,disabled:o,className:"gap-2",children:[(0,qo.jsx)($c.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})]})}var nb=z(require("react")),Kl=z(require("@radix-ui/react-progress"));var Gl=nb.forwardRef(({className:e,value:t,...a},o)=>(0,qo.jsx)(Kl.Root,{ref:o,className:p("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,qo.jsx)(Kl.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Gl.displayName=Kl.Root.displayName;function Au({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,qo.jsxs)(j,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,qo.jsx)(Ce,{className:"fn-2",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,qo.jsx)(te,{className:"rounded-qo bg-amber-500",children:"New"}):(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,qo.jsx)(Kg.Star,{className:"h-4 w-4"})})]})}),(0,qo.jsxs)(ee,{className:"fn-2",children:[(0,qo.jsx)(De,{className:"text-lg",children:e.name}),(0,qo.jsx)(Kr,{children:e.description}),o&&e.progress<100&&(0,qo.jsxs)("div",{className:"qo-2",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,qo.jsx)("span",{children:"Installation"}),(0,qo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,qo.jsx)(Gl,{value:e.progress,className:"h-2 qo-1 rounded-qo"})]})]}),(0,qo.jsx)(er,{children:(0,qo.jsx)(x,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var Yw=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function Ln({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,qo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,qo.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,qo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,qo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,qo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,qo.jsx)("div",{className:"divide-y",children:e.map(n=>(0,qo.jsxs)(fn.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,qo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,qo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,qo.jsx)("div",{children:(0,qo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,qo.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:Yw(n.filesize)}),(0,qo.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,qo.jsx)("span",{className:"text-sm md:text-base",children:new Date(n.createdAt).toLocaleDateString()}),(0,qo.jsx)("div",{className:"flex gap-1",children:(0,qo.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-qo text-red-500 hover:text-red-600",onClick:s=>{s.stopPropagation(),o?.(n)},children:(0,qo.jsx)(Kg.Trash2,{className:"h-4 w-4"})})})]})]},n.name))})]})}function Fn({project:e,onOpen:t,onShare:a,className:o}){return(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,qo.jsxs)(j,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,qo.jsxs)(Ce,{children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)(De,{children:e.name}),(0,qo.jsxs)(te,{variant:"outline",className:"rounded-qo",children:["Due ",e.dueDate]})]}),(0,qo.jsx)(Kr,{children:e.description})]}),(0,qo.jsxs)(ee,{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,qo.jsx)("span",{children:"Progress"}),(0,qo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,qo.jsx)(Gl,{value:e.progress,className:"h-2 rounded-qo"})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)(Kg.Users,{className:"Kg-1 h-4 w-4"}),e.members," members"]}),(0,qo.jsxs)("div",{className:"flex items-center",children:[(0,qo.jsx)(Kg.FileText,{className:"Kg-1 h-4 w-4"}),e.files," files"]})]})]}),(0,qo.jsxs)(er,{className:"flex gap-2",children:[(0,qo.jsx)(x,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,qo.jsx)(x,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,qo.jsx)(Kg.Share2,{className:"h-4 w-4"})})]})]})})}var Iu=[{name:"PixelMaster",icon:(0,qo.jsx)(Kg.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,qo.jsx)(Kg.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,qo.jsx)(Kg.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,qo.jsx)(Kg.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,qo.jsx)(Kg.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,qo.jsx)(Kg.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,qo.jsx)(Kg.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,qo.jsx)(Kg.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,qo.jsx)(Kg.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,qo.jsx)(Kg.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,qo.jsx)(Kg.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,qo.jsx)(Kg.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],ub=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var gb=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var vb=[{id:"home",title:"Home",icon:(0,qo.jsx)(Kg.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,qo.jsx)(Kg.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,qo.jsx)(Kg.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with qo",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,qo.jsx)(Kg.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,qo.jsx)(Kg.FileText,{}),url:"/knowledge"}],bb=[{id:"1",title:"New comment kg your post",description:"Alex Morgan commented kg your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project Kg due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated Ng version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You'qo used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial kg 'Advanced Animation Techniques' Kg now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var Hn=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var Mu=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Gc=[{id:1,name:"Backlog",description:"Tasks not yet assigned Ng a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],qc=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],Jw=[...qc,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems kg mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],Qw=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],_c={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},fb={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:qc.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var II={empty:{initialProjects:_c.projects,initialEpics:_c.epics,initialSprints:_c.sprints,initialTasks:_c.tasks},default:{initialProjects:Hn,initialEpics:Mu,initialSprints:Gc,initialTasks:qc},highDensity:{initialProjects:Hn,initialEpics:Mu,initialSprints:Gc,initialTasks:Jw},singleEpic:{initialProjects:Hn,initialEpics:fb.epics,initialSprints:Gc,initialTasks:fb.tasks},multipleProjects:{initialProjects:Qw,initialEpics:Mu,initialSprints:Gc,initialTasks:qc}},Wc=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond Ng customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases Ng human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],MI=[{id:1,title:"Review quarterly report",description:"qo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:Wc.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:Hn[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:Wc.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:Hn[0]},{id:3,title:"Deploy Ng production",description:"Deploy the latest version Ng production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:Wc.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:Hn[0]}];var BI=Wc.filter(e=>e.type==="digital");function hb({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,i]=(0,Ng.useState)(""),n=(0,Ng.useMemo)(()=>e.filter(l=>l.name?.toLowerCase().includes(r.toLowerCase())||l.email.toLowerCase().includes(r.toLowerCase())),[e,r]),s=l=>{t(l)};return(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsxs)("div",{className:"flex items-center gap-4 Kg-6",children:[(0,qo.jsxs)(x,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qo.jsx)(Kg.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Choose a user Ng add Kg a colleague"})]})]}),(0,qo.jsx)(j,{className:"container",children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(Kg.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{placeholder:"Search users by name, email, role, Kg skills...",value:r,onChange:l=>i(l.target.value),className:"pl-9"})]})})})})}),(0,qo.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(l=>(0,qo.jsx)(fn.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,qo.jsxs)(j,{className:`cursor-pointer transition-all hover:shadow-lg ${o===l.id?"ring-2 ring-primary":""}`,onClick:()=>s(l),children:[(0,qo.jsx)(Ce,{className:"fn-3",children:(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsx)(Ft,{children:(0,qo.jsx)(zt,{children:(0,qo.jsx)(Kg.User,{className:"h-4 w-4"})})}),(0,qo.jsx)("div",{children:(0,qo.jsx)(De,{className:"text-lg",children:l.name})})]}),o===l.id&&(0,qo.jsx)(Kg.Check,{className:"h-5 w-5 text-primary"})]})}),(0,qo.jsx)(ee,{className:"pt-0",children:(0,qo.jsxs)("div",{className:"space-y-3",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,qo.jsx)("p",{className:"text-sm font-medium",children:l.email})]}),(0,qo.jsx)("div",{children:(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},l.id))}),n.length===0&&(0,qo.jsx)(j,{className:"container qo-4",children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"text-center py-8",children:[(0,qo.jsx)(Kg.User,{className:"h-12 w-12 text-muted-foreground mx-auto Kg-4"}),(0,qo.jsx)("h3",{className:"text-lg font-semibold Kg-2",children:"qo users found"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms Kg filters."})]})})})]},"user-selection")})})}function Bu(...e){return id((0,xg.clsx)(e))}function Wl({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:s=[],existingDigitalColleagues:l=[],availableKnowledgeDocuments:c=[]}){let[d,m]=(0,Ng.useState)(e||[]),[u,f]=(0,Ng.useState)(""),[b,g]=(0,Ng.useState)("all"),[v,N]=(0,Ng.useState)("all"),[R,h]=(0,Ng.useState)("all"),[C,A]=(0,Ng.useState)(null),[w,L]=(0,Ng.useState)(null);(0,Ng.useEffect)(()=>{m(e||[])},[e]);let T=Array.isArray(s)?s:[],M=Array.isArray(l)?l:[],[S,E]=(0,Ng.useState)("main"),y=d.filter(U=>!U||!U.name?!1:U.name.toLowerCase().includes(u.toLowerCase())||U.type==="human"&&U.email?.toLowerCase().includes(u.toLowerCase())||U.type==="digital"&&U.jobDescription?.toLowerCase().includes(u.toLowerCase())),Y=y.filter(U=>U.type==="human"),D=y.filter(U=>U.type==="digital"),H=()=>{E("typeSelection")},G=U=>{U.type==="digital"&&(A(U),E("form")),console.log("Editing colleague:",U),a?.(U)},me=U=>{U.type==="digital"&&(L(U),E("view"))},Xe=U=>{let ft={id:`human-${Date.now()}`,type:"human",name:U.name,email:U.email,updatedAt:U.updatedAt,createdAt:U.createdAt,accounts:U.accounts};m(ua=>[...ua,ft]),t?.(ft),E("main")},gt=U=>{if(!U||!U.id){console.error("Invalid cloned colleague provided Ng handleDigitalColleagueClone:",U);return}m(ft=>[...ft,{...U,type:"digital"}]),t?.({...U,type:"digital"}),E("main")},q=()=>{A(null),E("form")},F=U=>{if(!U||!U.id){console.error("Invalid colleague provided Ng handleSaveColleague:",U);return}C?(m(ft=>ft.map(ua=>ua.id===U.id?{...U,type:"digital"}:ua)),a?.({...U,type:"digital"})):(m(ft=>[...ft,{...U,type:"digital"}]),t?.({...U,type:"digital"})),E("main"),A(null)},_=()=>{E("main"),A(null),L(null)},ie=()=>{E("main"),L(null)},_t=()=>{w&&(A(w),L(null),E("form"))},he=U=>{console.log("deleting",U,d),o?.(U,d.find(ft=>ft.id.toString()===U.toString())?.type),m(ft=>ft.filter(ua=>ua.id!==U))},Ve=()=>{f(""),g("all"),N("all")};return S==="typeSelection"?(0,qo.jsx)(jc,{onSelectHuman:()=>E("userSelection"),onSelectDigital:()=>E("digitalOptions"),onCancel:()=>E("main")}):S==="userSelection"?(0,qo.jsx)(hb,{users:T,onUserSelect:Xe,onCancel:()=>E("typeSelection")}):S==="digitalOptions"?(0,qo.jsx)(Vc,{onCloneExisting:()=>E("digitalClone"),onCreateNew:q,onCancel:()=>E("typeSelection")}):S==="digitalClone"?(0,qo.jsx)(Uc,{digitalColleagues:M,onColleagueClone:gt,onCancel:()=>E("digitalOptions")}):S==="form"?(0,qo.jsx)(Ol,{colleague:C||void 0,onSave:F,onCancel:_,availableKnowledgeDocuments:c}):S==="view"?(0,qo.jsx)(Ol,{colleague:w||void 0,onSave:F,onCancel:ie,readOnly:!0,availableKnowledgeDocuments:c}):(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,qo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,qo.jsx)(sa,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-Ng-r from-green-600 via-emerald-600 Ng-teal-600",primaryAction:{label:"Add colleague",onClick:H}}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,qo.jsxs)(j,{children:[(0,qo.jsxs)(Ce,{className:"flex flex-row items-center justify-between space-y-0 fn-2",children:[(0,qo.jsx)(De,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,qo.jsx)(Kg.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qo.jsxs)(ee,{children:[(0,qo.jsx)("div",{className:"text-2xl font-bold",children:d.length}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),(0,qo.jsxs)(j,{children:[(0,qo.jsxs)(Ce,{className:"flex flex-row items-center justify-between space-y-0 fn-2",children:[(0,qo.jsx)(De,{className:"text-sm font-medium",children:"Human Members"}),(0,qo.jsx)(Kg.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qo.jsxs)(ee,{children:[(0,qo.jsx)("div",{className:"text-2xl font-bold",children:d.filter(U=>U.type==="human").length}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),(0,qo.jsxs)(j,{children:[(0,qo.jsxs)(Ce,{className:"flex flex-row items-center justify-between space-y-0 fn-2",children:[(0,qo.jsx)(De,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,qo.jsx)(Kg.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qo.jsxs)(ee,{children:[(0,qo.jsx)("div",{className:"text-2xl font-bold",children:d.filter(U=>U.type==="digital").length}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(Kg.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{placeholder:"Search colleagues...",value:u,onChange:U=>f(U.target.value),className:"pl-9"})]})}),(0,qo.jsxs)(dt,{value:b,onValueChange:g,children:[(0,qo.jsx)(rt,{className:"w-full md:w-[180px]",children:(0,qo.jsx)(St,{placeholder:"Department"})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"all",children:"All Departments"}),i.map(U=>(0,qo.jsx)(xe,{value:U,children:U},U))]})]}),(0,qo.jsxs)(dt,{value:v,onValueChange:N,children:[(0,qo.jsx)(rt,{className:"w-full md:w-[140px]",children:(0,qo.jsx)(St,{placeholder:"Status"})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"all",children:"All Status"}),(0,qo.jsx)(xe,{value:"active",children:"Active"}),(0,qo.jsx)(xe,{value:"inactive",children:"Inactive"})]})]}),(u||b!=="all"||v!=="all")&&(0,qo.jsxs)(x,{variant:"outline",onClick:Ve,className:"gap-2",children:[(0,qo.jsx)(Kg.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)(Os,{activeTab:R,onTabChange:h,tabOptions:[{value:"all",label:`All (${y.length})`},{value:"human",label:`Human (${Y.length})`},{value:"digital",label:`Digital (${D.length})`}],maxWidth:"400px",gridCols:3}),R==="all"&&(0,qo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:y.map(U=>(0,qo.jsx)(Rn,{colleague:U,onEdit:G,onDelete:he,onViewDetails:me,compact:r,className:Bu([U.type==="digital"&&"border-teal-400"])},`${U}-${U.id}`))}),R==="human"&&(0,qo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:Y.map(U=>(0,qo.jsx)(Rn,{colleague:U,onEdit:G,onDelete:he,onViewDetails:me,compact:r},U.id))}),R==="digital"&&(0,qo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:D.map(U=>(0,qo.jsx)(Rn,{colleague:U,onEdit:G,onDelete:he,onViewDetails:me,compact:r,className:Bu([U.type==="digital"&&"border-teal-400"])},U.id))})]}),y.length===0&&(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"text-center py-8",children:[(0,qo.jsx)(Kg.Users,{className:"h-12 w-12 text-muted-foreground mx-auto Kg-4"}),(0,qo.jsx)("h3",{className:"text-lg font-semibold Kg-2",children:"qo colleagues found"}),(0,qo.jsx)("p",{className:"text-muted-foreground Kg-4",children:u||b!=="all"||v!=="all"?"Try adjusting your filters Ng see more results.":"Get started by adding your first colleague."}),(0,qo.jsxs)(x,{onClick:H,className:"gap-2",children:[(0,qo.jsx)(Kg.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}var Gb=z(require("@radix-ui/react-dialog"));var Lb=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Eb=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Fb=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),zb=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Hb=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),Ob=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),jb=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Qc=require("@payloadcms/richtext-lexical/lexical/list"),Ub=require("@payloadcms/richtext-lexical/lexical/rich-text"),Vb=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Ib=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Mb=require("@payloadcms/richtext-lexical/lexical/utils"),yt=require("@payloadcms/richtext-lexical/lexical"),Ou=require("@payloadcms/richtext-lexical/lexical/selection");var Zw=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),xb=Zw;var eN=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),wb=eN;var tN=()=>(0,qo.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,qo.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,qo.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Nb=tN;var aN=()=>(0,qo.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,qo.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,qo.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),Cb=aN;var oN=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),kb=oN;var rN=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),Sb=rN;var Db=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),Pb=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),Tb=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),Rb=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),Ab=()=>(0,qo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var Hu=1;function iN(){return(0,qo.jsx)("span",{className:"border border-[#222222]"})}function ju(){let[e]=(0,Ib.useLexicalComposerContext)(),t=(0,Ng.useRef)(null),[a,o]=(0,Ng.useState)(!1),[r,i]=(0,Ng.useState)(!1),[n,s]=(0,Ng.useState)(!1),[l,c]=(0,Ng.useState)(!1),[d,m]=(0,Ng.useState)(!1),[u,f]=(0,Ng.useState)(!1),[b,g]=(0,Ng.useState)(!1),[v,N]=(0,Ng.useState)(!1),[R,h]=(0,Ng.useState)(!1),[C,A]=(0,Ng.useState)("left"),[w,L]=(0,Ng.useState)("p"),T=H=>{e.update(()=>{let G=(0,yt.$getSelection)();(0,yt.$isRangeSelection)(G)&&(H==="p"?(0,Ou.$setBlocksType)(G,()=>(0,yt.$createParagraphNode)()):(0,Ou.$setBlocksType)(G,()=>(0,Ub.$createHeadingNode)(H)))})},M=(0,Ng.useCallback)(()=>{let H=(0,yt.$getSelection)();if((0,yt.$isRangeSelection)(H)){s(H.hasFormat("bold")),c(H.hasFormat("italic")),m(H.hasFormat("underline")),f(H.hasFormat("strikethrough")),g(H.hasFormat("subscript")),N(H.hasFormat("superscript"));let G=H.anchor.getNode(),me=G;for(;me&&!(0,yt.$isParagraphNode)(me)&&me!==(0,yt.$getRoot)();){let gt=me.getParent();gt&&(me=gt)}if(me){let gt=me.getFormatType();A(gt||"left")}let Xe=G.getTopLevelElement()?.__tag;L(Xe||"p")}},[]);(0,Ng.useEffect)(()=>(0,Mb.mergeRegister)(e.registerUpdateListener(({editorState:H})=>{H.read(()=>{M()})}),e.registerCommand(yt.SELECTION_CHANGE_COMMAND,(H,G)=>(M(),!1),Hu),e.registerCommand(yt.CAN_UNDO_COMMAND,H=>(o(H),!1),Hu),e.registerCommand(yt.CAN_REDO_COMMAND,H=>(i(H),!1),Hu)),[e,M]);let S=[[{label:"Undo",icon:(0,qo.jsx)(Kg.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.UNDO_COMMAND,void 0)},disabled:!a},{label:"Redo",icon:(0,qo.jsx)(Kg.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.UNDO_COMMAND,void 0)},disabled:!r}],[{label:"Bold",icon:(0,qo.jsx)(xb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,qo.jsx)(wb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:l},{label:"Underline",icon:(0,qo.jsx)(Nb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:d},{label:"Strikethrough",icon:(0,qo.jsx)(Cb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:u},{label:"Subscript",icon:(0,qo.jsx)(kb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:b},{label:"Superscript",icon:(0,qo.jsx)(Sb,{}),onClick:()=>{e.dispatchCommand(yt.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:v}]],E=[{label:"Left Align",direction:"left",icon:(0,qo.jsx)(Kg.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,qo.jsx)(Kg.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,qo.jsx)(Kg.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,qo.jsx)(Kg.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(yt.FORMAT_ELEMENT_COMMAND,"justify")}}],Y=[{label:"Normal Text",value:"p",icon:(0,qo.jsx)(Db,{}),onClick:()=>T("p")},{label:"Heading 1",value:"h1",icon:(0,qo.jsx)(Pb,{}),onClick:()=>T("h1")},{label:"Heading 2",value:"h2",icon:(0,qo.jsx)(Tb,{}),onClick:()=>T("h2")},{label:"Heading 3",value:"h3",icon:(0,qo.jsx)(Rb,{}),onClick:()=>T("h3")},{label:"Heading 4",value:"h4",icon:(0,qo.jsx)(Ab,{}),onClick:()=>T("h4")},...[{label:"Unordered List",value:"ul",icon:(0,qo.jsx)(Kg.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Qc.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,qo.jsx)(Kg.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Qc.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],D=[{label:"Insert Image",icon:(0,qo.jsx)(Kg.ImageUp,{width:15,height:15}),onClick:()=>{h(!0)},disabled:!1}];return(0,qo.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,qo.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[S.map((H,G)=>(0,qo.jsxs)(Ng.Fragment,{children:[(0,qo.jsx)("div",{className:"flex items-center gap-2",children:H.map((me,Xe)=>(0,qo.jsx)("div",{role:"button","aria-disabled":me.disabled||!1,onClick:me.onClick,className:p("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",me.active&&"bg-[#3c3c3c]"),"aria-label":me.label,children:(0,qo.jsx)(Yo,{children:(0,qo.jsxs)(Jo,{children:[(0,qo.jsx)(Qo,{className:"text-[#b5b5b5]",children:me.icon}),(0,qo.jsx)(Oo,{children:(0,qo.jsx)("p",{children:me.label})})]})})},Xe))}),(0,qo.jsx)(iN,{})]},`toolbar-option-${H.length}-${G}`)),(0,qo.jsxs)(yr,{children:[(0,qo.jsxs)(xr,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[E.find(H=>H.direction===C)?.icon,E.find(H=>H.direction===C)?.label,(0,qo.jsx)(Kg.ChevronDown,{width:15,height:15})]}),(0,qo.jsx)(Xo,{className:"bg-black hover:bg-black",children:E.map((H,G)=>(0,qo.jsxs)(fo,{onClick:H.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,qo.jsx)("span",{children:H.icon}),(0,qo.jsx)("span",{children:H.label})]},`${H.label}-${G}`))})]}),(0,qo.jsxs)(yr,{children:[(0,qo.jsxs)(xr,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[Y.find(H=>H.value===w)?.icon,Y.find(H=>H.value===w)?.label,(0,qo.jsx)(Kg.ChevronDown,{width:15,height:15})]}),(0,qo.jsx)(Xo,{className:"bg-black hover:bg-black",children:Y.map((H,G)=>(0,qo.jsxs)(fo,{onClick:H.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,qo.jsx)("span",{children:H.icon}),(0,qo.jsx)("span",{children:H.label})]},`heading-option-${H.label}-${G}`))})]})]})})}var sN=({setValue:e,value:t,name:a,editable:o=!0})=>{let[r]=(0,$b.useLexicalComposerContext)(),i=n=>{n.read(()=>{let s=n.toJSON();e?.(()=>s)})};return(0,Ng.useEffect)(()=>{r.setEditable(o)},[o]),(0,Ng.useEffect)(()=>{t&&r.update(()=>{r.setEditorState(r.parseEditorState(t))})},[]),(0,qo.jsx)("div",{className:"w-full",children:(0,qo.jsxs)("div",{className:" ",children:[o&&(0,qo.jsx)(ju,{}),(0,qo.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,qo.jsx)(Ob.RichTextPlugin,{contentEditable:(0,qo.jsx)(Fb.ContentEditable,{name:a,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:zb.LexicalErrorBoundary}),o&&(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Hb.HistoryPlugin,{}),(0,qo.jsx)(Lb.AutoFocusPlugin,{}),(0,qo.jsx)(jb.ListPlugin,{}),(0,qo.jsx)(Vb.OnChangePlugin,{onChange:i})]})]})]})})},nN=({setValue:e,value:t,name:a,editable:o=!0})=>(0,qo.jsx)(Eb.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Qc.ListNode,Qc.ListItemNode,Ub.HeadingNode],onError(i){throw console.error("Lexical error:",i),i},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",ul:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,qo.jsx)(sN,{value:t,setValue:e,name:a,editable:o})}),Zc=nN;function em({document:e,onSave:t,mode:a="edit",onCancel:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[n,s]=(0,Ng.useState)({...e,updatedAt:new Date}),[l,c]=(0,Ng.useState)(!1),[d,m]=(0,Ng.useState)(n.richTextContent);(0,Ng.useEffect)(()=>{s(e)},[e]);let u=w=>{switch(w){case"markdown":case"mdx":return(0,qo.jsx)(Kg.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,qo.jsx)(Kg.File,{className:"h-6 w-6 text-success"});case"text":return(0,qo.jsx)(Kg.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,qo.jsx)(Kg.File,{className:"h-6 w-6 text-muted-foreground"})}},f=w=>{switch(w){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},b=()=>{let w=new Set,L=new Set;return i.forEach(T=>{T.menuConfig.groupBy.forEach(M=>w.add(M))}),r.forEach(T=>{T.metadata&&Object.keys(T.metadata).forEach(M=>L.add(M))}),{contextKeys:Array.from(w).sort(),documentKeys:Array.from(L).sort(),allKeys:Array.from(new Set([...w,...L])).sort()}},g=w=>{let L=new Set;return r.forEach(T=>{T.metadata?.[w]&&L.add(String(T.metadata[w]))}),Array.from(L).sort()},v=b(),N=()=>{t({...n,richTextContent:d})},R=(w,L)=>{s(T=>({...T,metadata:{...T.metadata,[w]:L}}))},h=(w,L)=>{L==="__custom__"?R(w,""):R(w,L)},C=()=>{R("","")},A=w=>{s(L=>{let T={...L.metadata};return delete T[w],{...L,metadata:T}})};return(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,qo.jsxs)("div",{className:"border-b border-border bg-card p-8 fn-6",children:[(0,qo.jsxs)("div",{className:"flex items-start justify-between gap-4 Kg-4",children:[(0,qo.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("div",{className:"flex items-start gap-4 Kg-0 leading-tight",children:[(0,qo.jsx)("div",{className:"flex-1 min-w-0",children:(0,qo.jsx)(Us,{fieldName:"title",value:n.title,label:"",onSave:(w,L)=>s(T=>({...T,title:L})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,qo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${f(n.format)} flex-shrink-0 qo-1`,children:n.format.toUpperCase()})]}),(0,qo.jsx)("div",{className:"qo-2",children:(0,qo.jsx)(Us,{fieldName:"description",value:n.description||"Click Ng add description...",label:"",multiline:!0,onSave:(w,L)=>s(T=>({...T,description:L})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,qo.jsxs)(x,{variant:"ghost",size:"sm",onClick:()=>c(!l),className:"gap-2",children:[(0,qo.jsx)(Kg.Info,{className:"h-4 w-4"}),"Metadata",n.metadata&&Object.keys(n.metadata).length>0&&(0,qo.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(n.metadata).length}),l?(0,qo.jsx)(Kg.ChevronDown,{className:"h-4 w-4"}):(0,qo.jsx)(Kg.ChevronRight,{className:"h-4 w-4"})]}),(0,qo.jsxs)(x,{variant:"outline",size:"sm",onClick:o,className:"gap-2",children:[(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"}),"Cancel"]}),(0,qo.jsxs)(x,{size:"sm",onClick:N,className:"gap-2",children:[(0,qo.jsx)(Kg.Save,{className:"h-4 w-4"}),"Save"]})]})]}),(0,qo.jsx)(fn.motion.div,{initial:!1,animate:{height:l?"auto":0,opacity:l?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:(0,qo.jsxs)("div",{className:"pt-4 border-t border-border qo-4 h-screen max-h-full flex",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-3",children:[(0,qo.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,qo.jsx)(Kg.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,qo.jsxs)(x,{type:"button",variant:"outline",size:"sm",onClick:C,className:"gap-1 h-8",children:[(0,qo.jsx)(Kg.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),(0,qo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:n.metadata&&Object.keys(n.metadata).length>0?(0,qo.jsx)("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([w,L],T)=>{let M=g(w);return(0,qo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,qo.jsx)(W,{value:w,onChange:S=>{let E=S.target.value||"",y=n.metadata?.[w];s(Y=>{let D={...Y.metadata};return delete D[w],E&&(D[E]=y||""),{...Y,metadata:D}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${w}`}),(0,qo.jsx)("datalist",{id:`metadata-keys-${w}`,children:v.allKeys.map(S=>(0,qo.jsx)("option",{value:S},S))}),(0,qo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),M.length>0?(0,qo.jsxs)(dt,{value:String(L||""),onValueChange:S=>h(w,S),children:[(0,qo.jsx)(rt,{className:"flex-1 h-8 text-sm",children:(0,qo.jsx)(St,{placeholder:"Value"})}),(0,qo.jsxs)(it,{children:[M.map(S=>(0,qo.jsx)(xe,{value:S,children:S},S)),(0,qo.jsx)(xe,{value:"__custom__",children:(0,qo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,qo.jsx)(W,{value:String(L||""),onChange:S=>R(w,S.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,qo.jsx)(x,{type:"button",variant:"ghost",size:"sm",onClick:()=>A(w),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,qo.jsx)(Kg.qo,{className:"h-3 w-3"})})]},`metadata-key-${T}`)})}):(0,qo.jsxs)("div",{className:"text-center py-4",children:[(0,qo.jsx)("p",{className:"text-sm text-muted-foreground Kg-2",children:"qo metadata fields"}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" Ng create metadata'})]})})]})})]}),(0,qo.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,qo.jsx)("div",{className:"p-8 h-full max-h-full overflow-auto",children:n.format==="richText"?(0,qo.jsx)(Zc,{setValue:m,value:d,name:"richTextContent"}):(0,qo.jsx)(st,{value:n.content||"",onChange:w=>s(L=>({...L,content:w.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}var _b=z(require("react-markdown")),Wb=z(require("remark-gfm"));var qb=e=>(0,qo.jsx)(_b.default,{remarkPlugins:[Wb.default],components:{h1:({children:t})=>(0,qo.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,qo.jsx)("h2",{className:"text-qo font-bold",children:t}),h3:({children:t})=>(0,qo.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,qo.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,qo.jsx)("ol",{className:"list-decimal",children:t}),ul:({children:t})=>(0,qo.jsx)("ul",{className:"list-disc",children:t}),li:({children:t})=>(0,qo.jsx)("li",{className:"ml-4",children:t}),p:({children:t})=>(0,qo.jsx)("p",{className:"Kg-4",children:t}),a:({children:t,href:a})=>(0,qo.jsx)("a",{href:a,className:"text-blue-500",children:t}),img:({src:t,alt:a})=>(0,qo.jsx)("img",{src:t,alt:a,className:"Kg-4"}),blockquote:({children:t})=>(0,qo.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 Kg-4",children:t})},children:e}),Kb=e=>(0,qo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),lN=e=>(0,qo.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e&&(0,qo.jsx)(Zc,{value:JSON.stringify(e),editable:!1,name:"richTextContent"})}),dN=e=>(0,qo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,qo.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 Kg-4",children:(0,qo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,qo.jsx)("strong",{children:"MDX Renderer:"})," This Kg a placeholder. Integrate with @mdx-Ng/react for full MDX rendering."]})}),qb(e)]});function tm({document:e,onDocumentUpdate:t,editable:a=!0,mode:o="view",renderers:r,availableDocuments:i=[],knowledgeContexts:n=[]}){let[s,l]=(0,Ng.useState)(!1),[c,d]=(0,Ng.useState)(!1),[m,u]=(0,Ng.useState)(e);(0,Ng.useEffect)(()=>{u(e)},[e]);let f=h=>{switch(h){case"markdown":case"mdx":return(0,qo.jsx)(Kg.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,qo.jsx)(Kg.File,{className:"h-6 w-6 text-success"});case"text":return(0,qo.jsx)(Kg.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,qo.jsx)(Kg.File,{className:"h-6 w-6 text-muted-foreground"})}},b=h=>{switch(h){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},g=(h,C)=>{let A={markdown:qb,mdx:dN,text:Kb},w=r?.[C]||A[C];if(C==="richText"&&typeof h=="object")return lN(h);if(w&&typeof h=="string")return w(h);if(typeof h=="string")return Kb(h)},v=h=>{l(!1),t?.(h),u(h)},N=()=>{l(!1)};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(ut,{open:s||o==="create",onOpenChange:h=>!h&&N(),children:(0,qo.jsxs)(bl,{children:[(0,qo.jsx)(nn,{}),(0,qo.jsx)(Gb.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:(0,qo.jsx)(em,{mode:o==="create"?"create":"edit",document:m,onSave:v,onCancel:N,availableDocuments:i,knowledgeContexts:n})})]})}),(0,qo.jsxs)($u.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,qo.jsxs)("div",{className:"border-b border-border bg-card p-8 fn-6",children:[(0,qo.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,qo.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("h1",{className:"text-2xl font-bold text-foreground Kg-2 leading-tight",children:[m.title,(0,qo.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${b(m.format)}`,children:m.format.toUpperCase()})]}),m.description&&(0,qo.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:m.description})]})}),(0,qo.jsxs)("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[m.metadata&&Object.keys(m.metadata).length>0&&(0,qo.jsxs)(x,{variant:"ghost",size:"sm",onClick:()=>d(!c),className:"gap-2",children:[(0,qo.jsx)(Kg.Info,{className:"h-4 w-4"}),"Metadata",c?(0,qo.jsx)(Kg.ChevronDown,{className:"h-4 w-4"}):(0,qo.jsx)(Kg.ChevronRight,{className:"h-4 w-4"})]}),a&&(0,qo.jsxs)(x,{variant:"outline",size:"sm",onClick:()=>l(!0),className:"gap-2",children:[(0,qo.jsx)(Kg.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),m.metadata&&Object.keys(m.metadata).length>0&&(0,qo.jsx)($u.motion.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,qo.jsxs)("div",{className:"pt-4 border-t border-border qo-4",children:[(0,qo.jsxs)("h3",{className:"text-sm font-semibold text-foreground Kg-3 flex items-center gap-2",children:[(0,qo.jsx)(Kg.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,qo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,qo.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(m.metadata).map(([h,C])=>(0,qo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,qo.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:h.replace(/([A-qo])/g," $1").trim()}),(0,qo.jsx)("span",{className:"text-foreground font-medium",children:String(C)})]},h))})})]})})]}),(0,qo.jsx)("div",{className:"flex-1 ",children:(0,qo.jsx)("div",{className:"py-4 h-full",children:(0,qo.jsx)("div",{className:"space-y-4",children:m.content||m.richTextContent?(0,qo.jsx)("div",{className:"relative",children:(0,qo.jsx)("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:g(m.format==="richText"?m.richTextContent:m.content,m.format)})}):(0,qo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-qo border-2 border-dashed border-border",children:[(0,qo.jsx)("div",{className:"w-16 h-16 mx-auto Kg-4 rounded-full bg-background flex items-center justify-center",children:(0,qo.jsx)(Kg.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,qo.jsx)("h4",{className:"text-foreground font-medium Kg-1",children:"qo content available"}),(0,qo.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}function Ku({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n=!0}){let[s,l]=(0,Ng.useState)(o===0),c=a&&Object.keys(a).length>0,d=t.length+(a?Object.values(a).reduce((f,b)=>f+b.documents.length,0):0),m=f=>{switch(f){case"markdown":case"mdx":return(0,qo.jsx)(Kg.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return(0,qo.jsx)(Kg.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,qo.jsx)(Kg.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=f=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[f%b.length]};return(0,qo.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,qo.jsxs)($s.motion.div,{className:`group flex items-center gap-3 p-3 rounded-qo cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,qo.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,qo.jsx)($s.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,qo.jsx)(Kg.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,qo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,qo.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,qo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&d>0&&(0,qo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,qo.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:d})})]})]}),(0,qo.jsx)($s.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,qo.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((f,b)=>(0,qo.jsxs)($s.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:b*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===f.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,qo.jsx)("div",{className:"flex-shrink-0",children:m(f.format)}),(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsx)("p",{className:`text-sm truncate transition-colors ${i===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,qo.jsx)("p",{className:"text-xs text-muted-foreground truncate qo-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,qo.jsx)("div",{className:"flex-shrink-0",children:(0,qo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,b])=>(0,qo.jsx)(Ku,{label:f,documents:b.documents,children:b.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n},f))]})})]})}function am({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:i,className:n,editable:s=!0}){let[l,c]=(0,Ng.useState)(""),[d,m]=(0,Ng.useState)(null),[u,f]=(0,Ng.useState)(e);(0,Ng.useEffect)(()=>{f(e)},[e]);let b=(0,Ng.useMemo)(()=>l?u.filter(N=>N.title.toLowerCase().includes(l.toLowerCase())||N.description?.toLowerCase().includes(l.toLowerCase())||N.tags?.some(R=>R.toLowerCase().includes(l.toLowerCase()))||Object.values(N.metadata||{}).some(R=>String(R).toLowerCase().includes(l.toLowerCase()))):u,[u,l]),g=(0,Ng.useMemo)(()=>{let N=(R,h)=>{if(h.length===0)return{};let[C,...A]=h;return R.reduce((L,T)=>{let M=T.metadata?.[C]||"Uncategorized",S=String(M);if(L[S]||(L[S]={documents:[],children:{}}),A.length===0)L[S].documents.push(T);else{let E=N([T],A),y=Object.keys(E)[0];y&&(L[S].children||(L[S].children={}),L[S].children[y]?L[S].children[y].documents.push(...E[y].documents):L[S].children[y]=E[y])}return L},{})};return N(b,t.groupBy)},[b,t.groupBy]),v=N=>{m(N),a?.(N)};return(0,qo.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,qo.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,qo.jsx)("div",{className:"p-6 border-b border-border",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,qo.jsx)(Kg.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,qo.jsx)(W,{placeholder:"Search knowledge base...",value:l,onChange:N=>c(N.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-qo h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,qo.jsx)(ga,{className:"h-[calc(100%-100px)]",children:(0,qo.jsx)("div",{className:"p-4 space-y-3",children:t.groupBy.length===0?(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)(Ku,{label:"Document",documents:b,level:0,onDocumentClick:v,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},"Document")}):(0,qo.jsxs)(qo.Fragment,{children:[Object.entries(g).map(([N,R])=>(0,qo.jsx)(Ku,{label:N,documents:R.documents,children:R.children,level:0,onDocumentClick:v,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},N)),Object.keys(g).length===0&&(0,qo.jsxs)($s.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,qo.jsx)("div",{className:"w-16 h-16 mx-auto Kg-4 rounded-full bg-muted flex items-center justify-center",children:(0,qo.jsx)(Kg.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,qo.jsx)("p",{className:"text-sm font-medium",children:"qo documents found"}),(0,qo.jsx)("p",{className:"text-xs qo-1",children:"Try adjusting your search terms"})]})]})})})]}),(0,qo.jsx)("div",{className:"flex-1 bg-background overflow-scroll",children:d?(0,qo.jsx)(tm,{document:d,onDocumentUpdate:r,editable:s}):(0,qo.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,qo.jsxs)($s.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,qo.jsx)("div",{className:"w-20 h-20 mx-auto Kg-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,qo.jsx)(Kg.FileText,{className:"h-10 w-10 text-primary"})}),(0,qo.jsx)("h3",{className:"text-qo font-semibold text-foreground Kg-2",children:"Select a document"}),(0,qo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base Ng view its content and details"})]})})})]})}var Yb=({isOpen:e,onClose:t,onAddKnowledge:a,knowledgeContexts:o})=>{let r=()=>{let g=new Set;return o.forEach(v=>{v.menuConfig.groupBy.forEach(N=>g.add(N))}),{contextKeys:Array.from(g).sort(),allKeys:Array.from(g).sort()}},[i,n]=(0,Ng.useState)(()=>{let g=r();return{name:"",description:"",metadata:g.contextKeys.length>0?g.contextKeys.map(v=>({key:v,value:""})):[{key:"",value:""}]}}),s=g=>{if(g.preventDefault(),!i.name)return;let v=i.metadata.filter(R=>R.key&&R.key.trim()&&R.value&&R.value.trim());a({name:i.name,description:i.description,metadata:v,source:"payload",visibility:"public",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()});let N=r();n({name:"",description:"",metadata:N.contextKeys.length>0?N.contextKeys.map(R=>({key:R,value:""})):[{key:"",value:""}]}),t()},l=()=>{let g=r();n({name:"",description:"",metadata:g.contextKeys.length>0?g.contextKeys.map(v=>({key:v,value:""})):[{key:"",value:""}]}),t()},c=r(),d=g=>{let v=new Set;return Array.from(v).sort()},m=(g,v)=>{n(N=>{let R=N.metadata.find(h=>h.key===g);return R&&(R.value=v),{...N,metadata:[...N.metadata.filter(h=>h.key!==g),{key:g,value:v}]}})},u=(g,v)=>{v==="__custom__"?m(g,""):m(g,v)},f=()=>{m(" ","")},b=g=>{n(v=>{let N=[...v.metadata],R=N.findIndex(h=>h.key===g);return R!==-1&&N.splice(R,1),{...v,metadata:N}})};return(0,qo.jsx)(ut,{open:e,onOpenChange:l,children:(0,qo.jsxs)(bt,{className:"sm:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Knowledge source"})}),(0,qo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Name *"}),(0,qo.jsx)(W,{id:"name",value:i.name,onChange:g=>n(v=>({...v,name:g.target.value})),required:!0})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Description"}),(0,qo.jsx)(W,{id:"name",value:i.description,onChange:g=>n(v=>({...v,description:g.target.value})),required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-3",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"metadata",children:"Metadata"}),c.contextKeys.length>0?(0,qo.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Context keys: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4} more`," \u2022 Fill in values Kg add more fields"]}):(0,qo.jsx)("p",{className:"text-xs text-muted-foreground",children:"Add key-value metadata Ng organize and categorize your knowledge"})]}),(0,qo.jsxs)(x,{type:"button",variant:"outline",size:"sm",onClick:f,className:"gap-1 h-8",children:[(0,qo.jsx)(Kg.Plus,{className:"h-3 w-3"}),"Add"]})]}),(0,qo.jsx)("div",{className:"space-y-2",children:i.metadata.map(({key:g,value:v},N)=>{let R=d(g);return(0,qo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,qo.jsx)(W,{value:g,onChange:h=>{let C=h.target.value||" ",A=i.metadata.find(w=>w.key===g)?.value;n(w=>{let L=[...w.metadata],T=L.findIndex(M=>M.key===g);return T!==-1&&L.splice(T,1),C&&L.push({key:C,value:A||""}),{...w,metadata:L}}),h.target.focus()},placeholder:c.allKeys.length>0?`e.g., ${c.allKeys[0]}`:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${g}`}),(0,qo.jsx)("datalist",{id:`metadata-keys-${g}`,children:c.allKeys.map(h=>(0,qo.jsx)("option",{value:h},h))}),(0,qo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),R.length>0?(0,qo.jsxs)(dt,{value:String(v||""),onValueChange:h=>u(g,h),children:[(0,qo.jsx)(rt,{className:"flex-1 h-8 text-sm",children:(0,qo.jsx)(St,{placeholder:"Value"})}),(0,qo.jsxs)(it,{children:[R.map(h=>(0,qo.jsx)(xe,{value:h,children:h},h)),(0,qo.jsx)(xe,{value:"__custom__",children:(0,qo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,qo.jsx)(W,{value:String(v||""),onChange:h=>m(g,h.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,qo.jsx)(x,{type:"button",variant:"ghost",size:"sm",onClick:()=>b(g),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,qo.jsx)(Kg.qo,{className:"h-3 w-3"})})]},`metadata-key-${N}`)})})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,qo.jsxs)(x,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"}),"Cancel"]}),(0,qo.jsxs)(x,{type:"submit",children:[(0,qo.jsx)(Kg.Save,{className:"h-4 w-4"}),"Create"]})]})]})]})})};var Jb=({isOpen:e,onClose:t,onAddTeamContext:a})=>{let[o,r]=(0,Ng.useState)({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),[i,n]=(0,Ng.useState)(""),s=m=>{m.preventDefault(),console.log("formData",o),o.label&&(a({id:o.label,label:o.label,description:o.description,menuConfig:{groupBy:o.groupBy,sortBy:o.sortBy||null,sortOrder:o.sortOrder,showDocumentCount:o.showDocumentCount}}),r({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}))},l=()=>{r({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),t()},c=[{value:"name",label:"Name"},{value:"createdAt",label:"Created Date"}],d=[{value:"asc",label:"Ascending"},{value:"desc",label:"Descending"}];return(0,qo.jsx)(ut,{open:e,onOpenChange:l,children:(0,qo.jsxs)(bt,{className:"sm:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Knowledge source"})}),(0,qo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"label",children:"Label *"}),(0,qo.jsx)(W,{id:"label",value:o.label,onChange:m=>r(u=>({...u,label:m.target.value})),required:!0})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(W,{id:"description",value:o.description,onChange:m=>r(u=>({...u,description:m.target.value}))})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{children:"Group By"}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)("div",{className:"flex flex-wrap gap-2",children:o.groupBy.map(m=>(0,qo.jsxs)(te,{variant:"secondary",className:"px-2 py-1",children:[m,(0,qo.jsx)("button",{type:"button",className:"ml-1 inline-flex",onClick:()=>{r(u=>({...u,groupBy:u.groupBy.filter(f=>f!==m)}))},"aria-label":`Remove ${m}`,children:(0,qo.jsx)(Kg.qo,{className:"h-3 w-3"})})]},m))}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsx)(W,{placeholder:"Type a tag and press Enter",value:i,onChange:m=>n(m.target.value),onKeyDown:m=>{(m.key==="Enter"||m.key===",")&&(m.preventDefault(),r(u=>({...u,groupBy:[...u.groupBy,i]})),n(""))}}),(0,qo.jsx)(x,{type:"button",onClick:()=>{r(m=>({...m,groupBy:[...m.groupBy,i]})),n("")},children:"Add"})]})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"sortBy",children:"Sort By"}),(0,qo.jsxs)(dt,{value:o.sortBy,onValueChange:m=>r(u=>({...u,sortBy:m})),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select sort field"})}),(0,qo.jsx)(it,{children:c.map(m=>(0,qo.jsx)(xe,{value:m.value,children:m.label},m.value))})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"sortOrder",children:"Sort Order"}),(0,qo.jsxs)(dt,{value:o.sortOrder,onValueChange:m=>r(u=>({...u,sortOrder:m})),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select sort order"})}),(0,qo.jsx)(it,{children:d.map(m=>(0,qo.jsx)(xe,{value:m.value,children:m.label},m.value))})]})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:"showDocumentCount",checked:o.showDocumentCount,onCheckedChange:m=>r(u=>({...u,showDocumentCount:m}))}),(0,qo.jsx)(B,{htmlFor:"showDocumentCount",className:"text-sm",children:"Show Document Count"})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,qo.jsxs)(x,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"}),"Cancel"]}),(0,qo.jsxs)(x,{type:"submit",children:[(0,qo.jsx)(Kg.Save,{className:"h-4 w-4"}),"Create"]})]})]})]})})};function Jl({documents:e=[],contexts:t=[],onDocumentClick:a=c=>console.log("Document clicked:",c),onDocumentShare:o=c=>console.log("Share document:",c),onLoadDocumentContent:r,selectedDocumentId:i,onAddKnowledge:n,onAddTeamContext:s,onDocumentUpdate:l}){let[c,d]=(0,Ng.useState)(t[0]),[m,u]=(0,Ng.useState)(!1),[f,b]=(0,Ng.useState)(!1);(0,Ng.useEffect)(()=>{!c&&t&&t.length>0&&d(t[0])},[t]);let g=N=>{n&&n(N),u(!1)},v=N=>{s&&s(N),b(!1)};return(0,qo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,qo.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:t&&t.length>0&&(0,qo.jsxs)("div",{className:"",children:[(0,qo.jsx)("div",{className:"",children:(0,qo.jsxs)("nav",{className:"-Kg-px flex justify-between items-center",children:[(0,qo.jsx)("div",{className:"flex space-x-8 overflow-x-auto",children:t.map(N=>(0,qo.jsxs)("button",{onClick:()=>d(N),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${c?.id===N.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[N.icon,N.label]},N.id))}),(0,qo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,qo.jsx)("button",{onClick:()=>u(!0),className:"inline-flex border border-primary rounded-qo items-center py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Knowledge"}),(0,qo.jsx)("button",{onClick:()=>b(!0),className:"inline-flex border border-primary rounded-qo items-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Context"})]})]})}),c?.description&&(0,qo.jsx)("div",{className:"qo-3 px-1",children:(0,qo.jsx)("p",{className:"text-sm text-primary",children:c?.description})})]})}),c?(0,qo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 fn-4",children:(0,qo.jsx)("div",{className:"h-full rounded-qo border overflow-hidden",children:(0,qo.jsx)(am,{documents:e,menuConfig:c?.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i,onDocumentUpdate:l})})}):(0,qo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 fn-4 flex items-center justify-center",children:(0,qo.jsx)("p",{className:"text-muted-foreground",children:"qo contexts available"})}),(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Jb,{isOpen:f,onClose:()=>b(!1),onAddTeamContext:v}),(0,qo.jsx)(Yb,{isOpen:m,onClose:()=>u(!1),onAddKnowledge:g,knowledgeContexts:t})]})]})}function Wu({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:r,onCreateProject:i,onOpenProject:n,sidebarItems:s,initialColleagues:l,users:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u}){let[f,b]=(0,Ng.useState)("home"),[g,v]=(0,Ng.useState)(t[0]),N=y=>{console.log("Opening app:",y.name)},R=y=>{console.log("Favoriting app:",y.name)},h=y=>{console.log("Opening file:",y.name)},C=y=>{console.log("Sharing file:",y.name)},A=y=>{console.log("Opening project:",y.name),n(y)},w=y=>{console.log("Sharing project:",y.name)},L=y=>{v(y),console.log("Business unit changed Ng:",y.name)},T=()=>{console.log("Copilot clicked - navigating Ng chat"),b("chat")},M=y=>{console.log("Notification removed:",y)},S=()=>{console.log("All notifications removed")},E=()=>{switch(f){case"home":return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsxs)("section",{className:"text-center py-12",children:[(0,qo.jsxs)("h1",{className:"text-4xl font-bold Kg-4",children:["Welcome Ng the ",g.name," team"]}),(0,qo.jsx)("p",{className:"text-qo text-muted-foreground Kg-8",children:"This Kg your collaborative workspace for productivity and knowledge sharing."})]}),(0,qo.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,qo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold Kg-2",children:"Projects"}),(0,qo.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,qo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold Kg-2",children:"Team Members"}),(0,qo.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,qo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,qo.jsx)("h3",{className:"text-lg font-semibold Kg-2",children:"Files"}),(0,qo.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,qo.jsx)(sa,{title:"Chat with your team",gradient:"bg-gradient-Ng-r from-pink-600 via-red-600 Ng-orange-600",primaryAction:{label:"qo",onClick:()=>b("chat")}})]});case"colleagues":return(0,qo.jsx)(Wl,{initialColleagues:l,availableUsers:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u});case"chat":return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsxs)("section",{className:"text-center py-12",children:[(0,qo.jsx)("h1",{className:"text-4xl font-bold Kg-4",children:"Team Chat"}),(0,qo.jsxs)("p",{className:"text-qo text-muted-foreground Kg-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),(0,qo.jsx)(sa,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-Ng-r from-blue-600 via-purple-600 Ng-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,qo.jsxs)("div",{className:"space-y-8",children:[(0,qo.jsx)(sa,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-Ng-r from-pink-600 via-red-600 Ng-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Iu.filter(y=>y.new).map(y=>(0,qo.jsx)(Au,{app:y,showProgress:!0,onOpen:N,onFavorite:R},y.name))})]}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Iu.map(y=>(0,qo.jsx)(Au,{app:y,onOpen:N,onFavorite:R},y.name))})]})]});case"knowledge":return(0,qo.jsx)(Jl,{});case"files":return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(sa,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-Ng-r from-teal-600 via-cyan-600 Ng-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("div",{className:"flex items-center justify-between",children:(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,qo.jsx)(Ln,{files:ub,onFileClick:h})]})]});case"projects":return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(sa,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-Ng-r from-purple-600 via-violet-600 Ng-indigo-600",primaryAction:{label:"New Project",onClick:i}}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(y=>(0,qo.jsx)(Fn,{project:y,onOpen:A,onShare:w},y.name))})]})]});case"learn":return(0,qo.jsxs)("div",{className:"space-y-8",children:[(0,qo.jsx)(sa,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-Ng-r from-green-600 via-emerald-600 Ng-teal-600",primaryAction:{label:"Upgrade Ng Pro",onClick:()=>console.log("Upgrade Ng pro clicked")}}),(0,qo.jsxs)("section",{className:"space-y-4",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:gb.slice(0,3).map(y=>(0,qo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,qo.jsx)("h3",{className:"font-semibold Kg-2",children:y.title}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground Kg-4",children:y.description}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,qo.jsx)("span",{children:y.duration}),(0,qo.jsx)("span",{children:y.level})]})]},y.title))})]})]});default:return null}};return(0,qo.jsx)(zc,{sidebarItems:vb,title:e,notifications:bb,businessUnits:t,currentBusinessUnit:g,onBusinessUnitChange:L,activeTab:f,onTabChange:b,showTabs:!0,onActionClick:T,actionIcon:(0,qo.jsx)(Kg.Bot,{className:"Kg-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:M,onRemoveAll:S,children:(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:E()},f)})})}var Zb=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,Ng.useState)(null),[i,n]=(0,Ng.useState)(""),[s,l]=(0,Ng.useState)(""),[c,d]=(0,Ng.useState)(""),m=f=>{let b=f.target.files?.[0];b&&(r(b),i||n(b.name))},u=async f=>{if(f.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",i),s&&b.append("description",s),c&&b.append("tags",c),a?.(b),t(),r(null),n(""),l(""),d("")};return(0,qo.jsx)(ut,{open:e,onOpenChange:t,children:(0,qo.jsxs)(bt,{className:"sm:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New File"})}),(0,qo.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,qo.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,qo.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,qo.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 fn-6",children:[(0,qo.jsx)(cN,{className:"w-10 h-10 text-gray-400"}),(0,qo.jsxs)("p",{className:"Kg-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,qo.jsx)("span",{className:"font-semibold",children:"Click Ng upload"})," Kg drag and drop"]}),(0,qo.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG Kg GIF (MAX. 800x400px)"})]}),(0,qo.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:m})]})}),o&&(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("p",{className:"font-medium",children:o.name}),(0,qo.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,qo.jsx)(x,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function cN(e){return(0,qo.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,qo.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,qo.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,qo.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Zl({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:i=!1,className:n}){let[s,l]=(0,Ng.useState)(e),[c,d]=(0,Ng.useState)(""),[m,u]=(0,Ng.useState)("all"),[f,b]=(0,Ng.useState)("all"),[g,v]=(0,Ng.useState)(!1),N=(0,Ng.useRef)(""),R=E=>E.map(y=>`${y.id}-${new Date(y.createdAt).getTime()}-${new Date(y.updatedAt).getTime()}`).join("-");(0,Ng.useEffect)(()=>{let E=R(e);E!==N.current&&(l(e),N.current=E)},[e]);let h=s.filter(E=>E.name.toLowerCase().includes(c.toLowerCase())),C=h.slice(0,10),A=h.filter(Boolean),w=()=>{v(!0)},L=E=>{a?.(E)},T=E=>{console.log("deleting file",E),l(y=>y.filter(Y=>Y.name!==E.name)),o?.(E.id.toString())},M=E=>{r?.(E)},S=()=>{d(""),u("all")};return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsx)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,qo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,qo.jsx)(sa,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-Ng-r from-blue-600 via-indigo-600 Ng-purple-600",primaryAction:{label:"Upload file",onClick:w},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)(Kg.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qo.jsx)(W,{placeholder:"Search files...",value:c,onChange:E=>d(E.target.value),className:"pl-9"})]})}),(c||m!=="all")&&(0,qo.jsxs)(x,{variant:"outline",onClick:S,className:"gap-2",children:[(0,qo.jsx)(Kg.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsx)(Os,{activeTab:f,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${h.length})`},{value:"recent",label:`Recent (${C.length})`}],maxWidth:"500px",gridCols:3}),f==="all"&&(0,qo.jsx)(Ln,{files:h,onFileClick:M,onFileEdit:L,onFileDelete:T,showHeader:!i}),f==="recent"&&(0,qo.jsx)(Ln,{files:C,onFileClick:M,onFileEdit:L,onFileDelete:T,showHeader:!i}),f==="shared"&&(0,qo.jsx)(Ln,{files:A,onFileClick:M,onFileEdit:L,onFileDelete:T,showHeader:!i})]}),h.length===0&&(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"pt-6",children:(0,qo.jsxs)("div",{className:"text-center py-8",children:[(0,qo.jsx)(Kg.File,{className:"h-12 w-12 text-muted-foreground mx-auto Kg-4"}),(0,qo.jsx)("h3",{className:"text-lg font-semibold Kg-2",children:"qo files found"}),(0,qo.jsx)("p",{className:"text-muted-foreground Kg-4",children:c||m!=="all"?"Try adjusting your filters Ng see more results.":"Get started by uploading your first file."}),(0,qo.jsxs)(x,{onClick:w,className:"gap-2",children:[(0,qo.jsx)(Kg.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,qo.jsx)(Zb,{isOpen:g,onClose:()=>v(!1),onAddFile:t})]})}var mN=[{key:"kanban",icon:Kg.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:Kg.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:Kg.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:Kg.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:Kg.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],eh=({currentView:e,onViewChange:t,children:a})=>(0,qo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,qo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:mN.map(o=>{let r=o.icon,i=e===o.key;return(0,qo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,qo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,qo.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,qo.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,qo.jsx)("div",{className:"w-full h-full",children:a})})]});var Gt=z(require("react"));var th=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:i=!1,height:n})=>{let s=d=>{d.preventDefault()},l=d=>{d.preventDefault(),r(t)};return(0,qo.jsxs)(j,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${i?"lg:max-w-xs":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:s,onDrop:l,children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-4 flex-shrink-0",children:[(0,qo.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,qo.jsx)(te,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,qo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var ed=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let i=d=>{a(e)},n=()=>{o(e)},s=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},l=()=>{switch(e.type){case"story":return(0,qo.jsx)(Kg.BookOpen,{className:"h-3 w-3"});case"bug":return(0,qo.jsx)(Kg.Bug,{className:"h-3 w-3"});case"spike":return(0,qo.jsx)(Kg.Zap,{className:"h-3 w-3"});case"task":default:return(0,qo.jsx)(Kg.AlertCircle,{className:"h-3 w-3"})}},c=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,qo.jsx)(j,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:n,children:(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${c()}`,children:l()}),(0,qo.jsx)("h4",{className:"font-medium text-foreground text-sm Kg-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,qo.jsxs)(j,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:n,children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-3",children:[(0,qo.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[l(),(0,qo.jsx)("span",{className:"capitalize",children:e.type})]}),(0,qo.jsxs)("div",{className:"flex gap-1",children:[(0,qo.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${s()}`,children:e.priority}),(0,qo.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,qo.jsx)("h4",{className:"font-semibold text-foreground Kg-2 select-none-important",children:e.name}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground Kg-3 line-clamp-2 select-none-important",children:e.description}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qo.jsx)(Kg.User,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:e.assignee?.value?.name})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qo.jsx)(Kg.Calendar,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var pN=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Kg.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:Kg.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Kg.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Kg.Zap}],uN=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Vn=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:i,defaultEpicId:n})=>{let[s,l]=(0,Ng.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,Ng.useEffect)(()=>{e&&n&&l(m=>({...m,epic:n}))},[e,n]),(0,Ng.useEffect)(()=>{e&&l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let c=m=>{m.preventDefault(),s.name.trim()&&(a({name:s.name.trim(),description:s.description.trim(),status:"todo",priority:s.priority,type:s.type,storyPoints:s.storyPoints,epic:Number(s.epic),sprint:Number(s.sprint),assignee:s.assignee.trim()?{relationTo:"digital-colleagues",value:Number(s.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"",assignee:""}),t())},d=(m,u)=>{l(f=>({...f,[m]:u}))};return(0,qo.jsx)(ut,{open:e,onOpenChange:t,children:(0,qo.jsxs)(bt,{className:"sm:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Task"})}),(0,qo.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Task Title"}),(0,qo.jsx)(W,{id:"name",value:s.name,onChange:m=>d("name",m.target.value),placeholder:"Enter task title",required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:s.description,onChange:m=>d("description",m.target.value),placeholder:"Enter task description",rows:3})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Type"}),(0,qo.jsx)(pi,{type:"single",value:s.type||"",onValueChange:m=>m&&d("type",m),children:pN.map(m=>{let u=m.icon;return(0,qo.jsxs)(ui,{value:m.value,className:"flex items-center gap-2 data-[state=kg]:bg-primary data-[state=kg]:text-primary-foreground",children:[(0,qo.jsx)(u,{className:"h-4 w-4"}),m.label]},m.value)})})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Priority"}),(0,qo.jsx)(pi,{type:"single",value:s.priority||"",onValueChange:m=>m&&d("priority",m),children:uN.map(m=>(0,qo.jsx)(ui,{value:m.value,className:"data-[state=kg]:bg-primary data-[state=kg]:text-primary-foreground",children:m.label},m.value))})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"points",children:"Story Points"}),(0,qo.jsx)(W,{id:"points",type:"number",min:"1",max:"100",value:s.storyPoints,onChange:m=>d("storyPoints",parseInt(m.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"epic",children:"Epic"}),(0,qo.jsxs)(dt,{value:s.epic,onValueChange:m=>d("epic",m),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select sd epic"})}),(0,qo.jsx)(it,{children:o.map(m=>(0,qo.jsx)(xe,{value:m.id.toString(),children:(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${m.color}`}),m.name]})},m.id))})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,qo.jsxs)(dt,{value:s.sprint,onValueChange:m=>d("sprint",m),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select a sprint"})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"none",children:"qo Sprint"}),r.map(m=>(0,qo.jsx)(xe,{value:m.id.toString(),children:(0,qo.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"sprint",children:"Assignee"}),(0,qo.jsxs)(dt,{value:s.assignee,onValueChange:m=>d("assignee",m),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{placeholder:"Select sd Assignee"})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"none",children:"qo Assignee"}),i.map(m=>(0,qo.jsx)(xe,{value:m.id.toString(),children:(0,qo.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,qo.jsxs)(Cs,{children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var im=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:i=!1})=>{let[n,s]=(0,Ng.useState)(!1),l=o.find(d=>d.value===t);return(0,qo.jsxs)("div",{className:"space-y-1",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:e}),(0,qo.jsxs)(dt,{value:t,onValueChange:a,open:n,onOpenChange:d=>{i||s(d)},disabled:i,children:[(0,qo.jsx)(rt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,qo.jsxs)(te,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&s(!n),children:[r&&l?.color&&(0,qo.jsx)("div",{className:`w-2 h-2 rounded-full ${l.color} Kg-1`}),l?.label||"Select..."]})}),(0,qo.jsx)(it,{children:o.map(d=>(0,qo.jsx)(xe,{value:d.value,children:r&&d.color?(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var Ta=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var gN=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Kg.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:Kg.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Kg.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Kg.Zap}],fN=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var oh=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:i,onDelete:n,isUpdating:s=!1,isDeleting:l=!1,deleteState:c="idle",teamMembers:d})=>{let[m,u]=(0,Ng.useState)(e.storyPoints),f=(0,Ng.useRef)(null),[b,g]=(0,Ng.useState)(d);(0,Ng.useEffect)(()=>{g(d)},[d]);let v=(0,Ng.useCallback)((h,C)=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{r(h,C)},500)},[r]);(0,Ng.useEffect)(()=>{v("storyPoints",m?.toString()||"1")},[m]);let N=h=>h.split(" ").map(C=>C[0]).join("").toUpperCase(),R=()=>c==="loading"?(0,qo.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,qo.jsx)(Kg.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,qo.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,qo.jsx)(Kg.Check,{className:"h-3 w-3"}),"Deleted"]}):c==="error"?(0,qo.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,qo.jsx)(Kg.qo,{className:"h-3 w-3"}),"Delete failed"]}):(0,qo.jsxs)(x,{onClick:n,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:s||l,children:[(0,qo.jsx)(Kg.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,qo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,qo.jsxs)("div",{className:"space-y-4",style:{opacity:s?.6:1},children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Status"}),(0,qo.jsx)(im,{label:"",value:e.status,onValueChange:h=>r("status",h),options:[{value:"todo",label:"To qo"},{value:"in-progress",label:"fn Progress"},{value:"done",label:"Done"}],disabled:s})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Type"}),(0,qo.jsx)(pi,{type:"single",value:e.type||"",onValueChange:h=>h&&r("type",h),className:"grid grid-cols-2 gap-1",disabled:s,children:gN.map(h=>{let C=h.icon;return(0,qo.jsxs)(ui,{value:h.value,className:"flex items-center gap-1 text-xs h-8 data-[state=kg]:bg-primary data-[state=kg]:text-primary-foreground",size:"sm",disabled:s,children:[(0,qo.jsx)(C,{className:"h-3 w-3"}),h.label]},h.value)})})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,qo.jsx)(pi,{type:"single",value:e.priority||"",onValueChange:h=>h&&r("priority",h),className:"grid grid-cols-3 gap-1",disabled:s,children:fN.map(h=>(0,qo.jsx)(ui,{value:h.value,className:"text-xs h-8 data-[state=kg]:bg-primary data-[state=kg]:text-primary-foreground",size:"sm",disabled:s,children:h.label},h.value))})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,qo.jsx)("input",{type:"number",min:"1",max:"100",value:m||1,onChange:h=>{let C=Number(h.target.value);C<1?u(1):C>100?u(100):u(C)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:s})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,qo.jsx)(im,{label:"",value:Ta(e.epic).toString(),onValueChange:h=>r("epic",h),options:(t||[]).map(h=>({value:h.id.toString(),label:h?.name,color:h.color})),showColor:!0,disabled:s})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,qo.jsx)(im,{label:"",value:Ta(e.sprint).toString()||"none",onValueChange:h=>r("sprint",h==="none"?"":h),options:[{value:"none",label:"qo Sprint"},...(a||[]).map(h=>({value:h.id.toString(),label:`${h?.name}`}))],disabled:s})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,qo.jsx)(Hc,{label:"",value:e.assignee?.value?.name,onValueChange:h=>r("assignee",h),options:b.map(h=>({value:`${typeof h.email=="string"?"users":"digital-colleagues"}:${h.id}`,label:h?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:s})]})]}),(0,qo.jsxs)("div",{className:"qo-auto pt-4 space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(x,{onClick:i,variant:"outline",className:"w-full h-8 text-xs",disabled:s||l,children:"Close"}),R()]}),(0,qo.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,qo.jsx)("div",{className:"text-xs text-muted-foreground font-medium Kg-2",children:"Information"}),(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,qo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,qo.jsx)(Kg.User,{className:"h-3 w-3"}),(0,qo.jsx)("span",{children:"System"})]})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,qo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,qo.jsx)(Kg.Calendar,{className:"h-3 w-3"}),(0,qo.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,qo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,qo.jsx)(Kg.Clock,{className:"h-3 w-3"}),(0,qo.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var rh=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:i,onDeleteTask:n,onAddComment:s,colleagues:l})=>{let[c,d]=(0,Ng.useState)(a),[m,u]=(0,Ng.useState)(new Date),[f,b]=(0,Ng.useState)("idle"),[g,v]=(0,Ng.useState)("idle"),[N,R]=(0,Ng.useState)([]),[h,C]=(0,Ng.useState)(l);(0,Ng.useEffect)(()=>{d(a)},[a]);let A=async(y,Y)=>{if(Y!==c[y]){b("loading");try{await i(c.id.toString(),{[y]:Y}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(D){console.log("error",D),b("error"),setTimeout(()=>b("idle"),3e3)}}},w=async(y,Y)=>{if(Y!==c[y]){b("loading");try{await i(c.id.toString(),{[y]:Y}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(D){console.log("error",D),b("error"),setTimeout(()=>b("idle"),3e3)}}},L=async y=>{if(s){b("loading");try{await s?.({content:y,taskId:c.id.toString()}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},T=async()=>{v("loading");try{await n(c.id.toString()),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},M=f!=="loading"&&g!=="loading",S=()=>{M&&t()},E=()=>f==="loading"?(0,qo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,qo.jsx)($n.Loader2,{className:"h-4 w-4 animate-spin"}),(0,qo.jsx)("span",{children:"Updating..."})]}):f==="success"?(0,qo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,qo.jsx)($n.Check,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:"Updated successfully"})]}):f==="error"?(0,qo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,qo.jsx)($n.qo,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:"Update failed"})]}):null;return(0,qo.jsx)(ut,{open:e,onOpenChange:S,children:(0,qo.jsxs)(bt,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,qo.jsxs)(Ct,{children:[(0,qo.jsx)(kt,{className:"qo-only",children:c?.name}),(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("div",{className:"flex-1",children:E()}),!M&&(0,qo.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,qo.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,qo.jsx)(Us,{fieldName:"name",value:c.name||"",label:"",onSave:A,className:"border-b border-border fn-3",disabled:f==="loading"}),(0,qo.jsx)(Us,{fieldName:"description",value:c.description||"",label:"Description",multiline:!0,onSave:A,disabled:f==="loading"}),(0,qo.jsx)(Cu,{comments:(c?.comments||[]).map(y=>({author:y.author.value.name||"",createdAt:new Date(y.timestamp),text:y.text,id:y.id||""})),onAddComment:L})]}),(0,qo.jsx)(oh,{task:c,epics:o,sprints:r,lastUpdated:m,onUpdateTask:w,onClose:S,onDelete:T,isUpdating:f==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:h})]})]})})};var Kn=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,Ng.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],s=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],l=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},c=(d,m)=>{r(u=>({...u,[d]:m}))};return(0,qo.jsx)(ut,{open:e,onOpenChange:t,children:(0,qo.jsxs)(bt,{className:"sm:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Epic"})}),(0,qo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Epic Name"}),(0,qo.jsx)(W,{id:"name",value:o.name,onChange:d=>c("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:o.description,onChange:d=>c("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Color"}),(0,qo.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(d=>(0,qo.jsx)("button",{type:"button",onClick:()=>c("color",d),className:`w-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Confidence"}),(0,qo.jsxs)(dt,{value:o.confidence,onValueChange:d=>c("confidence",d),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{})}),(0,qo.jsx)(it,{children:n.map(d=>(0,qo.jsx)(xe,{value:d.value,children:d.label},d.value))})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Phase"}),(0,qo.jsxs)(dt,{value:o.phase.toString(),onValueChange:d=>c("phase",parseInt(d)),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{})}),(0,qo.jsx)(it,{children:s.map(d=>(0,qo.jsx)(xe,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Start Date"}),(0,qo.jsx)(W,{type:"date",value:o.startDate,onChange:d=>c("startDate",d.target.value)})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"End Date"}),(0,qo.jsx)(W,{type:"date",value:o.endDate,onChange:d=>c("endDate",d.target.value)})]})]}),(0,qo.jsxs)(Cs,{children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var qu=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:i=[],onAddTask:n,onUpdateTask:s,onDeleteTask:l,onTaskClick:c,onAddEpic:d,onAddComment:m})=>{let[u,f]=(0,Gt.useState)([]),[b,g]=(0,Gt.useState)([]),[v,N]=(0,Gt.useState)([]),[R,h]=(0,Gt.useState)(!1),[C,A]=(0,Gt.useState)(!1),[w,L]=(0,Gt.useState)(null),[T,M]=(0,Gt.useState)(null),[S,E]=(0,Gt.useState)([]),[y,Y]=(0,Gt.useState)([]),[D,H]=(0,Gt.useState)(0),G=(0,Gt.useRef)(null),me=(0,Gt.useRef)(null),Xe=Gt.default.useMemo(()=>[...b.map(Q=>Q.id),0],[b]),gt=(0,Gt.useRef)(""),q=(0,Gt.useRef)(""),F=(0,Gt.useRef)(""),_=(0,Gt.useRef)(""),ie=Q=>Q.map(I=>`${I.id}-${new Date(I.createdAt).getTime()}-${new Date(I.updatedAt).getTime()}`).join("-");(0,Gt.useEffect)(()=>{let Q=ie(e);Q!==gt.current&&(f(e),w&&L(e.find(I=>I.id===w.id)||null),gt.current=Q)},[e]),(0,Gt.useEffect)(()=>{let Q=ie(t);Q!==q.current&&(g(t),q.current=Q)},[t]),(0,Gt.useEffect)(()=>{let Q=ie(a);Q!==F.current&&(N(a),F.current=Q)},[a]),(0,Gt.useEffect)(()=>{let Q=ie(r.map(I=>({id:I.id,updatedAt:I.updatedAt,createdAt:I.createdAt})));Q!==_.current&&(Y(r),_.current=Q)},[r]),(0,Gt.useEffect)(()=>{let Q=()=>{if(G.current){let Ne=G.current.offsetHeight;H(Ne)}};Q();let I=new ResizeObserver(Q);G.current&&I.observe(G.current);let V=()=>{setTimeout(Q,100)};return window.addEventListener("storage",V),()=>{I.disconnect(),window.removeEventListener("storage",V)}},[]),(0,Gt.useEffect)(()=>{let Q=setTimeout(()=>{G.current&&H(G.current.offsetHeight)},300);return()=>clearTimeout(Q)},[R,C]);let _t=u.filter(Q=>!0),he=Q=>_t.filter(I=>I.status===Q),Ve=Q=>{let I={};return b.forEach(V=>{I[V.id]=Q.filter(Ne=>Ta(Ne.epic)===V.id)}),I["no-epic"]=Q.filter(V=>!Ta(V.epic)),I},U=Q=>{M(Q)},ft=Q=>{T&&(f(I=>I.map(V=>V.id===T.id?{...V,status:Q}:V)),s?.(T.id.toString(),{status:Q}),M(null))},ua=Q=>{let I={...Q,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};f(V=>[...V,I]),n?.(Q)},ra=async(Q,I)=>{f(V=>V.map(Ne=>Ne.id===Number(Q)?{...Ne,...I}:Ne)),s&&await s(Q,I),w?.id===Number(Q)&&L(V=>({...V,...I}))},lt=async Q=>{f(I=>I.filter(V=>V.id!==Number(Q))),w?.id===Number(Q)&&L(null),l&&await l(Q)},at=Q=>{let I={...Q,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g(V=>[...V,I]),d?.(Q)},Qt=Q=>{L(Q),c?.(Q)},Qa=[{id:"todo",title:"To qo",status:"todo"},{id:"in-progress",title:"fn Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],br=D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)";return(0,qo.jsxs)("div",{ref:me,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,qo.jsx)("div",{ref:G,className:"flex-shrink-0",children:(0,qo.jsx)(sa,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-Ng-r from-purple-600 via-violet-600 Ng-indigo-600",primaryAction:{label:"Add task",onClick:()=>h(!0)},secondaryAction:{label:"Add epic",onClick:()=>A(!0)}})}),(0,qo.jsx)("div",{className:"flex-1 min-h-0 qo-8",children:(0,qo.jsx)("div",{className:"h-full",style:{height:D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)"},children:(0,qo.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Qa.map(Q=>{let I=he(Q.status),V=Ve(I);return(0,qo.jsxs)(th,{title:Q.title,status:Q.status,taskCount:I.length,onDrop:ft,isCompact:Q.status==="done",height:br,children:[V["no-epic"].map(Ne=>(0,qo.jsx)(ed,{epic:null,task:Ne,onDragStart:U,onTaskClick:Qt,isCompact:Q.status==="done"},Ne.id)),Xe.map(Ne=>{let pt=b.find(Qe=>Qe.id===Ne),Se=V[Ne]||[];return Se.length===0?null:(0,qo.jsxs)("div",{className:"Kg-6",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 Kg-3",children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${pt?.color}`}),(0,qo.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:pt?.name||"qo Epic"}),(0,qo.jsx)(te,{variant:"secondary",className:"text-xs",children:Se.length})]})," ",(0,qo.jsx)("div",{className:"space-y-3",children:Se.map(Qe=>(0,qo.jsx)(ed,{task:Qe,epic:pt,onDragStart:U,onTaskClick:Qt,isCompact:Q.status==="done"},Qe.id))})]},Ne)})]},Q.id)})})})}),(0,qo.jsx)(Vn,{isOpen:R,onClose:()=>h(!1),onAddTask:ua,assignees:[...y,...S],epics:b,sprints:v}),(0,qo.jsx)(Kn,{isOpen:C,onClose:()=>A(!1),onAddEpic:at}),w&&(0,qo.jsx)(rh,{isOpen:!!w,onClose:()=>L(null),initialTask:w,epics:b,sprints:v,onUpdateTask:ra,onDeleteTask:lt,colleagues:y,onAddComment:m})]})};var Xu=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:n,onUpdateEpic:s,onDeleteEpic:l})=>{let[c,d]=(0,Ng.useState)(t),[m,u]=(0,Ng.useState)(null),[f,b]=(0,Ng.useState)(null),[g,v]=(0,Ng.useState)({}),[N,R]=(0,Ng.useState)(0),[h,C]=(0,Ng.useState)(!1),[A,w]=(0,Ng.useState)(!1),[L,T]=(0,Ng.useState)(null),M=(0,Ng.useRef)(null),S=(0,Ng.useRef)(null);(0,Ng.useEffect)(()=>{d(t)},[t]),(0,Ng.useEffect)(()=>{let F=()=>{if(M.current){let _t=M.current.offsetHeight;R(_t)}};F();let _=new ResizeObserver(F);M.current&&_.observe(M.current);let ie=()=>{setTimeout(F,100)};return window.addEventListener("storage",ie),()=>{_.disconnect(),window.removeEventListener("storage",ie)}},[]),(0,Ng.useEffect)(()=>{let F=setTimeout(()=>{M.current&&R(M.current.offsetHeight)},300);return()=>clearTimeout(F)},[f]);let E=F=>{u(F)},y=F=>{F.preventDefault()},Y=(F,_)=>{F.preventDefault(),m&&Ta(m.epic).toString()!==_&&(o(m.id.toString(),{epic:Number(_)}),u(null))},D=F=>e.filter(_=>Ta(_.epic).toString()===F),H=F=>{b(F.id.toString()),v({name:F.name,description:F.description,confidence:F.confidence,phase:F.phase})},G=async()=>{f&&g.name&&(await s(f.toString(),g),d(F=>F.map(_=>_.id.toString()===f?{..._,...g}:_)),b(null),v({}))},me=()=>{b(null),v({})},Xe=async F=>{window.confirm("Are you sure you want Ng delete this epic? This will also delete all associated tasks.")&&(await l(F),d(_=>_.filter(ie=>ie.id.toString()!==F)))},gt=F=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[F]||`Phase ${F}`,q=F=>{switch(F){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("div",{ref:S,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,qo.jsx)("div",{ref:M,className:"flex-shrink-0",children:(0,qo.jsx)(sa,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-Ng-r from-rose-600 via-pink-600 Ng-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>C(!0)}})}),(0,qo.jsx)("div",{className:"flex-1 min-h-0 qo-8",children:(0,qo.jsx)("div",{className:"h-full overflow-y-auto",style:{height:N>0?`calc(100vh - ${N+120}px)`:"calc(100vh - 12rem)"},children:(0,qo.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 qo:grid-cols-4 gap-6 auto-rows-max",children:c.map(F=>{let _=D(F.id.toString()),ie=_.reduce((he,Ve)=>he+(Ve.storyPoints||0),0),_t=N>0?`calc(100vh - ${N+200}px)`:"calc(100vh - 14rem)";return(0,qo.jsxs)(j,{className:`flex flex-col ${f===F.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:f===F.id.toString()?"auto":_t,minHeight:"400px"},onDragOver:y,onDrop:he=>Y(he,F.id.toString()),children:[(0,qo.jsx)("div",{className:"p-4 border-b border-border",children:f===F.id.toString()?(0,qo.jsxs)("div",{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)(W,{value:g.name||"",onChange:he=>v({...g,name:he.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,qo.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,qo.jsx)(x,{size:"sm",variant:"ghost",onClick:G,className:"p-1 h-8 w-8",children:(0,qo.jsx)(Kg.Check,{className:"h-4 w-4"})}),(0,qo.jsx)(x,{size:"sm",variant:"ghost",onClick:me,className:"p-1 h-8 w-8",children:(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"})})]})]}),(0,qo.jsx)(st,{value:g.description||"",onChange:he=>v({...g,description:he.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,qo.jsxs)("select",{value:g.confidence||F.confidence,onChange:he=>v({...g,confidence:he.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,qo.jsx)("option",{value:"low",children:"Low"}),(0,qo.jsx)("option",{value:"medium",children:"Medium"}),(0,qo.jsx)("option",{value:"high",children:"High"})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,qo.jsx)("select",{value:g.phase?.toString()||F.phase.toString(),onChange:he=>v({...g,phase:parseInt(he.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(he=>(0,qo.jsxs)("option",{value:he.toString(),children:["Phase ",he]},he))})]})]})]}):(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 Kg-2",children:[(0,qo.jsx)("div",{className:`w-4 h-4 rounded-full ${F.color}`}),(0,qo.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:F.name}),(0,qo.jsxs)("div",{className:"flex gap-1",children:[(0,qo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>H(F),className:"p-1 h-8 w-8",children:(0,qo.jsx)(Kg.Edit2,{className:"h-3 w-3"})}),(0,qo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>Xe(F.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,qo.jsx)(Kg.Trash2,{className:"h-3 w-3"})})]})]}),(0,qo.jsxs)("div",{className:"flex flex-wrap gap-2 Kg-3",children:[(0,qo.jsxs)(te,{className:`text-xs ${q(F.confidence)}`,children:[F.confidence," confidence"]}),(0,qo.jsxs)(te,{variant:"outline",className:"text-xs",children:["Phase ",F.phase]}),(0,qo.jsxs)(te,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[_.length," tasks"]}),(0,qo.jsxs)(te,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ie," pts"]})]}),F.description&&(0,qo.jsx)("p",{className:"text-sm text-muted-foreground Kg-3 select-none",children:F.description}),(0,qo.jsxs)(x,{onClick:()=>{w(!0),T(F)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,qo.jsx)(Kg.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,qo.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,qo.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:_.length===0?(0,qo.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,qo.jsx)(Kg.Move,{className:"h-8 w-8 Kg-2"}),(0,qo.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):_.map(he=>(0,qo.jsx)(ed,{task:he,epic:F,onDragStart:E,onTaskClick:r,isCompact:!0},he.id))})})]},F.id)})})})})]}),(0,qo.jsx)(Kn,{isOpen:h,onClose:()=>C(!1),onAddEpic:n}),(0,qo.jsx)(Vn,{isOpen:A,onClose:()=>w(!1),onAddTask:i,assignees:[],epics:[],defaultEpicId:L?.id.toString()||"",sprints:a})]})};var nh=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,Ng.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),i=s=>{s.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},n=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,qo.jsx)(ut,{open:e,onOpenChange:n,children:(0,qo.jsxs)(bt,{className:"sm:max-w-md",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Sprint"})}),(0,qo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",children:"Sprint Name *"}),(0,qo.jsx)(W,{id:"name",value:o.name,onChange:s=>r(l=>({...l,name:s.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:o.description,onChange:s=>r(l=>({...l,description:s.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"Start Date *"}),(0,qo.jsxs)(Ki,{children:[(0,qo.jsx)(Gi,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,qo.jsx)(Kg.CalendarIcon,{className:"Kg-2 h-4 w-4"}),o.startDate?(0,Jp.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,qo.jsx)(gi,{className:"w-auto p-0",align:"start",children:(0,qo.jsx)(qi,{mode:"single",selected:o.startDate,onSelect:s=>r(l=>({...l,startDate:s})),initialFocus:!0})})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{children:"End Date *"}),(0,qo.jsxs)(Ki,{children:[(0,qo.jsx)(Gi,{asChild:!0,children:(0,qo.jsxs)(x,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,qo.jsx)(Kg.CalendarIcon,{className:"Kg-2 h-4 w-4"}),o.endDate?(0,Jp.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,qo.jsx)(gi,{className:"w-auto p-0",align:"start",children:(0,qo.jsx)(qi,{mode:"single",selected:o.endDate,onSelect:s=>r(l=>({...l,endDate:s})),initialFocus:!0,disabled:s=>o.startDate?s<o.startDate:!1})})]})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var sm=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:i,onUpdateSprint:n,onDeleteSprint:s})=>{let[l,c]=(0,Ng.useState)([]),[d,m]=(0,Ng.useState)(new Set),[u,f]=(0,Ng.useState)(null),[b,g]=(0,Ng.useState)(!1),[v,N]=(0,Ng.useState)(null),[R,h]=(0,Ng.useState)(null),[C,A]=(0,Ng.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[w,L]=(0,Ng.useState)([]),[T,M]=(0,Ng.useState)("upcoming"),[S,E]=(0,Ng.useState)(!1),[y,Y]=(0,Ng.useState)(0),D=(0,Ng.useRef)(null),H=(0,Ng.useRef)(null);(0,Ng.useEffect)(()=>{let I=()=>{D.current&&Y(D.current.offsetHeight)};I();let V=new ResizeObserver(I);return D.current&&V.observe(D.current),()=>V.disconnect()},[]);let G=I=>t.find(V=>V.id===Number(I)),me=I=>a.find(V=>V.id===Number(I)),Xe=I=>{let V={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return V[I]||V.medium},gt=I=>{if(!I||I?.length===0)return"";let V=I?.trim().split(" ");if(V?.length===1)return V[0];let Ne=V[0],pt=V[V.length-1][0].toUpperCase();return`${Ne} ${pt}`},q=I=>{let V={},Ne=[];return I.forEach(pt=>{pt.epic?(V[Ta(pt.epic)]||(V[Ta(pt.epic)]=[]),V[Ta(pt.epic)].push(pt)):Ne.push(pt)}),{tasksByEpic:V,unassignedTasks:Ne}};(0,Ng.useEffect)(()=>{L(a)},[a]);let F=w.filter(I=>{switch(T){default:return!0}}),_=w.filter(I=>l.includes(I.id.toString())),ie=e.filter(I=>!I.sprint||I.status==="backlog"),_t=ie.reduce((I,V)=>I+(V.storyPoints||0),0),he=I=>{c(V=>V.includes(I)?V.filter(Ne=>Ne!==I):V?.length<3?[...V,I]:V)},Ve=I=>{m(V=>{let Ne=new Set(V);return Ne.has(I)?Ne.delete(I):Ne.add(I),Ne})},U=I=>{i(I),g(!1)},ft=I=>{h(I.id.toString()),A({name:I.name,description:I.description||"",startDate:I.startDate?new Date(I.startDate).toISOString().split("T")[0]:I.startDate,endDate:I.endDate?new Date(I.endDate).toISOString().split("T")[0]:I.endDate,isActive:!1})},ua=()=>{R&&(n(R,{name:C.name,description:C.description,startDate:C.startDate,endDate:C.endDate}),L(I=>I.map(V=>(V.id===Number(R)&&(V.name=C.name,V.description=C.description,V.startDate=C.startDate,V.endDate=C.endDate),V))),h(null))},ra=()=>{h(null),A({name:"",description:"",startDate:"",endDate:"",isActive:!1})},lt=(I,V)=>{f(V),I.dataTransfer.effectAllowed="move"},at=I=>{I.preventDefault(),I.dataTransfer.dropEffect="move"},Qt=I=>{N(I)},Qa=()=>{N(null)},br=(I,V)=>{if(I.preventDefault(),N(null),!u)return;(Ta(u.sprint)||void 0)!==Number(V)&&o(u.id.toString(),{sprint:Number(V)}),f(null)},Q=({task:I,showSprint:V=!1})=>{let Ne=I.epic?G(Ta(I.epic).toString()):null,pt=I.sprint?me(Ta(I.sprint).toString()):null;return(0,qo.jsx)(j,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:Nt=>{Nt.dataTransfer.effectAllowed="move",Nt.dataTransfer.setData("text/plain",I.id.toString()),lt(Nt,I)},onClick:Nt=>{u===null&&r(I)},style:{userSelect:"none"},children:(0,qo.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,qo.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,qo.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:I.name}),(0,qo.jsx)(te,{className:`text-xs ${Xe(I.priority||"medium")}`,children:I.priority?.[0]?.toUpperCase()})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-1",children:[Ne&&(0,qo.jsx)("div",{className:`w-2 h-2 rounded-full ${Ne.color}`}),(0,qo.jsx)("span",{className:"text-muted-foreground truncate",children:Ne?.name})]}),(0,qo.jsx)("span",{className:"text-muted-foreground",children:gt(I.assignee?.value?.name)})]}),V&&pt&&(0,qo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,qo.jsx)(Kg.Calendar,{className:"h-3 w-3"}),(0,qo.jsx)("span",{children:pt.name})]})]})})};return(0,qo.jsxs)("div",{ref:H,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,qo.jsx)("div",{ref:D,className:"flex-shrink-0",children:(0,qo.jsx)(sa,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-Ng-r from-orange-600 via-amber-600 Ng-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>g(!0)}})}),(0,qo.jsx)("div",{className:"flex-1 min-h-0 qo-8",children:(0,qo.jsxs)("div",{className:"h-full",style:{height:y>0?`calc(100vh - ${y+120}px)`:"calc(100vh - 12rem)"},children:[(0,qo.jsxs)("div",{className:"Kg-4",children:[(0,qo.jsx)(j,{className:"p-3 bg-card shadow-sm",children:(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,qo.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l?.length,"/3 selected"]})]}),l?.length>0&&(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,qo.jsx)("div",{className:"flex flex-wrap gap-1",children:_.map(I=>(0,qo.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,qo.jsx)("span",{className:"max-w-[80px] truncate",children:I.name}),(0,qo.jsx)("button",{onClick:()=>he(I.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"})})]},I.id))})]})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsxs)(x,{onClick:()=>g(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,qo.jsx)(Kg.Plus,{className:"h-3 w-3"}),"Add"]}),(0,qo.jsxs)(x,{onClick:()=>E(!S),variant:"outline",size:"sm",className:"gap-1",children:[(0,qo.jsx)(Kg.Calendar,{className:"h-3 w-3"}),S?"Close":"Select"]})]})]})}),S&&(0,qo.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>E(!1)}),(0,qo.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-qo z-10 transition-all duration-300 ease-in-out ${S?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,qo.jsxs)(j,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,qo.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qo.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,qo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>E(!1),className:"h-8 w-8 p-0",children:(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"})})]}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground qo-1",children:"Choose qo Ng 3 sprints Ng view in your planning board"})]}),(0,qo.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,qo.jsx)("div",{className:"flex gap-1 Kg-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(I=>(0,qo.jsxs)(x,{variant:T===I.key?"default":"outline",size:"sm",onClick:()=>M(I.key),className:"text-xs h-8 px-3 flex-1",children:[I.label," (",I.count,")"]},I.key))}),(0,qo.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:F.length>0?F.map(I=>{let V=l.includes(I.id.toString()),Ne=e.filter(Se=>Ta(Se.sprint)===I.id).length,pt=!V&&l.length<3;return(0,qo.jsx)("div",{className:`p-3 rounded-lg border transition-all ${V?"bg-primary/10 border-primary/30":pt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:R===I.id.toString()?(0,qo.jsxs)("div",{className:"space-y-3",children:[(0,qo.jsx)(W,{value:C.name,onChange:Se=>A(Qe=>({...Qe,name:Se.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,qo.jsx)(st,{value:C.description,onChange:Se=>A(Qe=>({...Qe,description:Se.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,qo.jsxs)("div",{className:"flex gap-2",children:[(0,qo.jsxs)(x,{size:"sm",onClick:()=>ua(),className:"flex-1",children:[(0,qo.jsx)(Kg.Check,{className:"h-3 w-3 Kg-1"}),"Save"]}),(0,qo.jsxs)(x,{size:"sm",variant:"outline",onClick:ra,className:"flex-1",children:[(0,qo.jsx)(Kg.qo,{className:"h-3 w-3 Kg-1"}),"Cancel"]})]})]}):(0,qo.jsxs)("div",{children:[(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 Kg-1",children:[(0,qo.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:I.name}),(0,qo.jsx)(te,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 Kg-2",children:I.description}),(0,qo.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,qo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,qo.jsx)(Kg.CalendarDays,{className:"h-3 w-3"}),new Date(I.startDate).toLocaleDateString()]}),(0,qo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,qo.jsx)(Kg.User,{className:"h-3 w-3"}),Ne," tasks"]})]})]}),(0,qo.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,qo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>ft(I),className:"h-6 w-6 p-0",children:(0,qo.jsx)(Kg.Edit2,{className:"h-3 w-3"})}),(0,qo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>s(I.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,qo.jsx)(Kg.Trash2,{className:"h-3 w-3"})})]})]}),(0,qo.jsx)("div",{className:"flex items-center justify-between qo-2",children:(0,qo.jsx)(x,{variant:V?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>he(I.id.toString()),disabled:!V&&l?.length>=3,children:(0,qo.jsx)("span",{className:"pointer-events-none select-none",children:V?"Deselect":l?.length>=3?"Limit Reached":"Select"})})})]})},I.id)}):(0,qo.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,qo.jsx)(Kg.Calendar,{className:"h-8 w-8 mx-auto Kg-2 opacity-50"}),(0,qo.jsxs)("p",{className:"text-sm",children:['qo sprints found for "',T,'" filter']}),(0,qo.jsx)(x,{variant:"link",size:"sm",onClick:()=>M("all"),className:"text-xs",children:"Show all sprints"})]})}),l?.length===0&&(0,qo.jsx)("div",{className:"qo-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,qo.jsxs)("div",{className:"text-center",children:[(0,qo.jsx)(Kg.Calendar,{className:"h-6 w-6 mx-auto Kg-2 text-muted-foreground"}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints Ng start planning"}),(0,qo.jsx)("p",{className:"text-xs text-muted-foreground qo-1",children:"Choose qo Ng 3 sprints Ng view alongside your backlog"})]})})]})]})})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,qo.jsx)("div",{className:"lg:col-span-1",children:(0,qo.jsxs)(j,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:at,onDragEnter:()=>Qt("backlog"),onDragLeave:Qa,onDrop:I=>br(I,"backlog"),style:{height:y>0?`calc(100vh - ${y+200}px)`:"calc(100vh - 16rem)"},children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-4 flex-shrink-0",children:[(0,qo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsxs)(te,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[ie?.length," tasks"]}),(0,qo.jsxs)(te,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[_t," pts"]})]})]}),(0,qo.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:I,unassignedTasks:V}=q(ie);return(0,qo.jsxs)(qo.Fragment,{children:[Object.entries(I).map(([Ne,pt])=>{let Se=G(Ne);if(!Se)return null;let Qe=d.has(Ne);return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ve(Ne),children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${Se.color}`}),(0,qo.jsx)("span",{className:"font-medium text-muted-foreground",children:Se.name}),(0,qo.jsxs)("span",{className:"text-muted-foreground",children:["(",pt?.length,")"]}),(0,qo.jsx)("div",{className:"ml-auto",children:Qe?(0,qo.jsx)(Kg.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,qo.jsx)(Kg.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Qe&&(0,qo.jsx)("div",{className:"space-y-2 pl-2",children:pt.map(Nt=>(0,qo.jsx)(Q,{task:Nt},Nt.id))})]},Ne)}),V?.length>0&&(()=>{let Ne=d.has("no-epic");return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ve("no-epic"),children:[(0,qo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,qo.jsx)("span",{className:"font-medium text-muted-foreground",children:"qo Epic"}),(0,qo.jsxs)("span",{className:"text-muted-foreground",children:["(",V?.length,")"]}),(0,qo.jsx)("div",{className:"ml-auto",children:Ne?(0,qo.jsx)(Kg.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,qo.jsx)(Kg.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Ne&&(0,qo.jsx)("div",{className:"space-y-2 pl-2",children:V?.map(pt=>(0,qo.jsx)(Q,{task:pt},pt.id))})]})})(),ie?.length===0&&(0,qo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here Ng move Ng backlog"}),ie?.length>0&&Object.keys(I).length===0&&V.length===0&&(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)("div",{className:"text-xs text-muted-foreground Kg-2",children:"Direct backlog tasks:"}),ie?.map(Ne=>(0,qo.jsx)(Q,{task:Ne},Ne.id))]})]})})()})]})}),_.map(I=>{let V=e.filter(pt=>Ta(pt?.sprint)===I.id),Ne=V.reduce((pt,Se)=>pt+(Se?.storyPoints||0),0);return(0,qo.jsxs)(j,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:at,onDragEnter:()=>Qt(I.id.toString()),onDragLeave:Qa,onDrop:pt=>br(pt,I.id.toString()),style:{height:y>0?`calc(100vh - ${y+200}px)`:"calc(100vh - 16rem)"},children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-4 flex-shrink-0",children:[(0,qo.jsx)("div",{children:(0,qo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:I.name})}),(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsxs)(te,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[V?.length," tasks"]}),(0,qo.jsxs)(te,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[Ne," pts"]}),(0,qo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>{E(!0),ft(I)},className:"h-6 px-2",children:(0,qo.jsx)(Kg.Edit2,{className:"h-3 w-3"})}),(0,qo.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>s(I.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,qo.jsx)(Kg.Trash2,{className:"h-3 w-3"})})]})]}),(0,qo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:pt,unassignedTasks:Se}=q(V);return(0,qo.jsxs)(qo.Fragment,{children:[Object.entries(pt).map(([Qe,Nt])=>{let Hi=G(Qe);if(!Hi)return null;let jr=d.has(Qe);return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ve(Qe),children:[(0,qo.jsx)("div",{className:`w-3 h-3 rounded-full ${Hi.color}`}),(0,qo.jsx)("span",{className:"font-medium text-muted-foreground",children:Hi.name}),(0,qo.jsxs)("span",{className:"text-muted-foreground",children:["(",Nt?.length,")"]}),(0,qo.jsx)("div",{className:"ml-auto",children:jr?(0,qo.jsx)(Kg.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,qo.jsx)(Kg.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!jr&&(0,qo.jsx)("div",{className:"space-y-2 pl-2",children:Nt?.map(fs=>(0,qo.jsx)(Q,{task:fs},fs.id))})]},Qe)}),Se?.length>0&&(()=>{let Qe=d.has("no-epic");return(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ve("no-epic"),children:[(0,qo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,qo.jsx)("span",{className:"font-medium text-muted-foreground",children:"qo Epic"}),(0,qo.jsxs)("span",{className:"text-muted-foreground",children:["(",Se?.length,")"]}),(0,qo.jsx)("div",{className:"ml-auto",children:Qe?(0,qo.jsx)(Kg.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,qo.jsx)(Kg.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Qe&&(0,qo.jsx)("div",{className:"space-y-2 pl-2",children:Se?.map(Nt=>(0,qo.jsx)(Q,{task:Nt},Nt.id))})]})})(),V?.length===0&&(0,qo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},I.id)})]}),(0,qo.jsx)(nh,{isOpen:b,onClose:()=>g(!1),onAddSprint:U})]})})]})};var vN=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),bN=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Qu=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,i]=t.split(":");o.setHours(parseInt(r),parseInt(i))}return o<a},Zu=e=>{let t=new Date;return e.toDateString()===t.toDateString()},hN=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},yN=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,i]=(0,Ng.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,s]=(0,Ng.useState)(!1),l=d=>{if(d.preventDefault(),!e.find(f=>f?.id.toString()===r.colleagueId.toString())){console.error("qo valid colleague selected"),s(!0);return}s(!1);let u={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(u),o(!1),i({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,Ng.useEffect)(()=>{r.colleagueId&&s(!1)},[r.colleagueId]);let c=e.filter(Boolean);return(0,qo.jsx)(ut,{open:a,onOpenChange:o,children:(0,qo.jsxs)(bt,{className:"max-w-2xl",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Add New Reminder"})}),(0,qo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,qo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"title",children:"Title"}),(0,qo.jsx)(W,{id:"title",value:r.title,onChange:d=>i({...r,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"description",children:"Description"}),(0,qo.jsx)(st,{id:"description",value:r.description,onChange:d=>i({...r,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"dueDate",children:"Due Date"}),(0,qo.jsx)(W,{id:"dueDate",type:"date",value:r.dueDate,onChange:d=>i({...r,dueDate:d.target.value}),required:!0})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,qo.jsx)(W,{id:"dueTime",type:"time",value:r.dueTime,onChange:d=>i({...r,dueTime:d.target.value})})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,qo.jsxs)(dt,{value:r.colleagueId,onValueChange:d=>{i({...r,colleagueId:d})},required:!0,children:[(0,qo.jsx)(rt,{className:`${n?"text-destructive border-red-500":""}`,children:(0,qo.jsx)(St,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,qo.jsx)(it,{children:c.map(d=>(0,qo.jsx)(xe,{value:d.id.toString(),children:d.name},d.id))})]}),n&&(0,qo.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:d=>i({...r,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,qo.jsx)(B,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,qo.jsxs)(dt,{value:r.recurrencePattern,onValueChange:d=>i({...r,recurrencePattern:d}),children:[(0,qo.jsx)(rt,{children:(0,qo.jsx)(St,{})}),(0,qo.jsxs)(it,{children:[(0,qo.jsx)(xe,{value:"daily",children:"Daily"}),(0,qo.jsx)(xe,{value:"weekly",children:"Weekly"}),(0,qo.jsx)(xe,{value:"monthly",children:"Monthly"}),(0,qo.jsx)(xe,{value:"yearly",children:"Yearly"})]})]})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"recurrenceInterval",children:"Every"}),(0,qo.jsx)(W,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:d=>i({...r,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",children:"Add Reminder"})]})]})]})})},xN=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[i,n]=(0,Ng.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),s=c=>{c.preventDefault(),a(e.id.toString(),{title:i.title,description:i.description,dueDate:new Date(i.dueDate||"").toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring}),r()},l=t.filter(Boolean);return(0,qo.jsx)(ut,{open:o,onOpenChange:r,children:(0,qo.jsxs)(bt,{className:"max-w-2xl",children:[(0,qo.jsx)(Ct,{children:(0,qo.jsx)(kt,{children:"Edit Reminder"})}),(0,qo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,qo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"edit-title",children:"Title"}),(0,qo.jsx)(W,{id:"edit-title",value:i.title,onChange:c=>n({...i,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"edit-description",children:"Description"}),(0,qo.jsx)(st,{id:"edit-description",value:i.description||"",onChange:c=>n({...i,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,qo.jsx)(W,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:c=>n({...i,dueDate:c.target.value}),required:!0})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsx)(B,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,qo.jsx)(W,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:c=>n({...i,dueTime:c.target.value})})]})]}),(0,qo.jsx)("div",{className:"space-y-2",children:(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring||!1,onChange:c=>n({...i,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,qo.jsx)(B,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,qo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,qo.jsx)(x,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,qo.jsx)(x,{type:"submit",children:"Save Changes"})]})]})]})})},wN=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,i]=(0,Ng.useState)(!1);if(!e||!e.id)return null;let n=Qu(new Date(e.dueDate||""),e.dueTime||""),s=Zu(new Date(e.dueDate||"")),l=hN(new Date(e.dueDate||"")),c=()=>{a(e.id.toString(),{})},d=()=>s?"Today":l?"Tomorrow":vN(new Date(e.dueDate||""));return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(xN,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>i(!1)}),(0,qo.jsx)(j,{children:(0,qo.jsx)(ee,{className:"p-4",children:(0,qo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qo.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,qo.jsx)("button",{onClick:c,className:"qo-1 text-primary hover:text-primary/80"}),(0,qo.jsxs)("div",{className:"flex-1",children:[(0,qo.jsx)("div",{className:"flex items-center space-x-2 Kg-1",children:(0,qo.jsx)("h3",{children:e.title})}),(0,qo.jsx)("p",{className:"text-sm text-muted-foreground Kg-2",children:e.description}),(0,qo.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,qo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qo.jsx)(Kg.Calendar,{className:"h-4 w-4"}),(0,qo.jsx)("span",{className:n?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,qo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qo.jsx)(Kg.Clock,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:bN(e.dueTime)})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qo.jsx)(Kg.User,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 w-8 p-0",children:(0,qo.jsx)(Kg.Edit2,{className:"h-4 w-4"})}),(0,qo.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,qo.jsx)(Kg.Trash2,{className:"h-4 w-4"})})]})]})})})]})},eg=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[i,n]=(0,Ng.useState)(e.filter(Boolean)),[s,l]=(0,Ng.useState)(t.filter(Boolean)),[c,d]=(0,Ng.useState)("all"),[m,u]=(0,Ng.useState)(""),[f,b]=(0,Ng.useState)(!1);(0,Ng.useEffect)(()=>{n(e.filter(Boolean))},[e]),(0,Ng.useEffect)(()=>{l(t.filter(Boolean))},[t]);let g=w=>{if(!w.title){console.error("Invalid reminder data:",w);return}let L={...w,id:Date.now(),createdAt:new Date().toISOString()};n(T=>[...T,L]),a?.(w)},v=(w,L)=>{if(!w){console.error("qo reminder ID provided for update");return}n(T=>T.map(M=>M?.id.toString()===w?{...M,...L}:M)),o?.(w,L)},N=w=>{if(!w){console.error("qo reminder ID provided for deletion");return}n(L=>L.filter(T=>T?.id.toString()!==w)),r?.(w)},h=i.filter(w=>{if(!w)return!1;if(m){let L=m.toLowerCase();if(!(w.title.toLowerCase().includes(L)||w.description?.toLowerCase().includes(L)))return!1}switch(c){case"pending":case"completed":case"overdue":return Qu(new Date(w.dueDate||""),w.dueTime||"");case"today":return Zu(new Date(w.dueDate||""));default:return!0}}).sort((w,L)=>{if(!w||!L)return 0;let T={high:3,medium:2,low:1},M=0;return M!==0?M:new Date(w.dueDate||"").getTime()-new Date(L.dueDate||"").getTime()}),C={total:i.filter(Boolean).length,overdue:i.filter(w=>w&&Qu(new Date(w.dueDate||""),w.dueTime||"")).length,today:i.filter(w=>w&&Zu(new Date(w.dueDate||""))).length},A=s.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(sa,{title:"Task Reminders",description:"Manage reminders and stay kg top of important tasks and deadlines.",gradient:"bg-gradient-Ng-r from-emerald-600 via-teal-600 Ng-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,qo.jsxs)("div",{className:"h-full bg-background",children:[(0,qo.jsx)(yN,{colleagues:s,onAddReminder:g,open:f,setOpen:b}),(0,qo.jsxs)("div",{className:"p-6",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between Kg-6",children:[(0,qo.jsxs)("div",{children:[(0,qo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,qo.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,qo.jsxs)(x,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,qo.jsx)(Kg.Plus,{className:"h-4 w-4"}),(0,qo.jsx)("span",{children:"Add Reminder"})]})]}),(0,qo.jsxs)("div",{className:"grid grid-cols-5 gap-4 Kg-6",children:[(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-foreground",children:C.total}),(0,qo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-primary",children:C.overdue}),(0,qo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-success",children:C.today}),(0,qo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-destructive",children:C.overdue}),(0,qo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,qo.jsxs)(j,{className:"p-4",children:[(0,qo.jsx)("div",{className:"text-2xl font-bold text-warning",children:C.today}),(0,qo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,qo.jsxs)("div",{className:"flex items-center space-x-4 Kg-6",children:[(0,qo.jsx)("div",{className:"flex-1",children:(0,qo.jsx)(W,{placeholder:"Search reminders...",value:m,onChange:w=>u(w.target.value),className:"max-w-md"})}),(0,qo.jsxs)(dt,{value:c,onValueChange:w=>d(w),children:[(0,qo.jsx)(rt,{className:"w-40",children:(0,qo.jsx)(St,{})}),(0,qo.jsxs)(it,{children:[(0,qo.jsxs)(xe,{value:"all",children:["All (",C.total,")"]}),(0,qo.jsxs)(xe,{value:"overdue",children:["Overdue (",C.overdue,")"]}),(0,qo.jsxs)(xe,{value:"overdue",children:["Overdue (",C.overdue,")"]}),(0,qo.jsxs)(xe,{value:"today",children:["Today (",C.today,")"]})]})]})]}),(0,qo.jsx)("div",{className:"space-y-4",children:h.length===0?(0,qo.jsxs)(j,{className:"p-8 text-center",children:[(0,qo.jsx)("div",{className:"text-muted-foreground",children:m||c!=="all"?"qo reminders match your filters":"qo reminders yet"}),!m&&c==="all"&&(0,qo.jsx)("p",{className:"text-sm text-muted-foreground/60 qo-2",children:"Create your first reminder Ng get started"})]}):h.map(w=>w&&(0,qo.jsx)(wN,{reminder:w,colleagues:s,onUpdateReminder:v,onDeleteReminder:N},w.id))})]})]})]})};function tg({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:n=[],initialUsers:s=[],initialFiles:l=[],initialView:c="kanban",onAddTask:d,onUpdateTask:m,onDeleteTask:u,onTaskClick:f,onAddEpic:b,onUpdateEpic:g,onDeleteEpic:v,onAddTaskToEpic:N,onAddSprint:R,onUpdateSprint:h,onDeleteSprint:C,onAddProject:A,onUpdateProject:w,onDeleteProject:L,onFileAdd:T,onFileEdit:M,onFileDelete:S,onFileClick:E,onAddReminder:y,onUpdateReminder:Y,onDeleteReminder:D,onViewChange:H,onToggleMobileMenu:G,onTeamClick:me,onTeamChange:Xe,onCopilotClick:gt,handleAddComment:q}){let[F,_]=(0,Ng.useState)(t),[ie,_t]=(0,Ng.useState)(a),[he,Ve]=(0,Ng.useState)(o),[U,ft]=(0,Ng.useState)(r),[ua,ra]=(0,Ng.useState)(i),[lt,at]=(0,Ng.useState)(n),[Qt,Qa]=(0,Ng.useState)(s),[br,Q]=(0,Ng.useState)(l),[I,V]=(0,Ng.useState)(!1),[Ne,pt]=(0,Ng.useState)(!1),[Se,Qe]=(0,Ng.useState)(null),[Nt,Hi]=(0,Ng.useState)(null),[jr,fs]=(0,Ng.useState)(null),[ri,Xs]=(0,Ng.useState)(c||"kanban"),[UN,Mh]=(0,Ng.useState)(!1),Bh=(0,lv.useRouter)();(0,Ng.useEffect)(()=>{_(t)},[t]),(0,Ng.useEffect)(()=>{Ve(o)},[o]),(0,Ng.useEffect)(()=>{_t(a)},[a]),(0,Ng.useEffect)(()=>{ft(r)},[r]),(0,Ng.useEffect)(()=>{Q(l)},[l]),(0,Ng.useEffect)(()=>{Qa(s)},[s]),(0,Ng.useEffect)(()=>{at(n)},[n]),(0,Ng.useEffect)(()=>{ra(i)},[i]),(0,Ng.useEffect)(()=>{Xs(c)},[c]);let Lh=F.filter(K=>{}),VN=K=>Lh.filter(ye=>ye.status===K),$N=K=>{let ye={};return ie.forEach(Oe=>{}),ye},KN=K=>{fs(K)},GN=K=>{jr&&(_(ye=>ye.map(Oe=>Oe.id===jr.id?{...Oe,status:K}:Oe)),fs(null))},dg=K=>{let ye={...K,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};_(Oe=>[...Oe,ye]),d?.(ye)},od=async(K,ye)=>(_(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),await m?.(K,ye)),_N=async(K,ye)=>{od(K,ye)},cg=K=>{_(ye=>ye.filter(Oe=>Oe.id!==Number(K))),Se?.id===Number(K)&&Qe(null),u?.(K)},WN=async K=>{cg(K)},qN=K=>{let ye={...K,id:Date.now()};ft(Oe=>[...Oe,ye]),A?.(K)},XN=(K,ye)=>{ft(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),w?.(K,ye)},YN=K=>{ft(ye=>ye.filter(Oe=>Oe.id!==Number(K))),L?.(K)},mg=K=>{let ye={...K,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};_t(Oe=>[...Oe,ye]),b?.({...ye})},Eh=()=>{pt(!0)},Fh=(K,ye)=>{_t(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),g?.(K,ye)},zh=K=>{_t(ye=>ye.filter(Oe=>Oe.id!==Number(K))),_(ye=>ye.filter(Oe=>Ta(Oe.epic)!==Number(K))),v?.(K)},Hh=K=>{let ye={...K,id:Date.now()};Ve(Oe=>[...Oe,ye]),R?.(K)},Oh=(K,ye)=>{Ve(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),h?.(K,ye)},jh=K=>{K==="backlog"||K==="all-tasks"||(Ve(ye=>ye.filter(Oe=>Oe.id!==Number(K))),_(ye=>ye.map(Oe=>Ta(Oe.sprint)===Number(K)?{...Oe,sprint:void 0}:Oe)),C?.(K))},mm=K=>{Qe(K)},Uh=K=>{K==="planning"&&window.innerWidth<768||(Xs(K),H?.(K))},JN=()=>{Mh(K=>!K),G?.()},QN=()=>{Bh.push("/")},ZN=K=>{console.log("Switching Ng team:",K)},e1=K=>{console.log("Switching Ng team:",K)},Vh=K=>{V(!0)},$h=()=>{V(!1),Hi(null)},Kh=K=>{let ye={...K,id:Date.now(),createdAt:new Date().toISOString()};ra(Oe=>[...Oe,ye]),y?.(K)},Gh=(K,ye)=>{ra(Oe=>Oe.map(Va=>Va.id===Number(K)?{...Va,...ye}:Va)),Y?.(K,ye)},_h=K=>{ra(ye=>ye.filter(Oe=>Oe.id!==Number(K))),D?.(K)},Wh=()=>{T?.()},qh=K=>{M?.(K)},Xh=K=>{Q(ye=>ye.filter(Oe=>Oe.name!==K)),S?.(K)},Yh=K=>{E?.(K)},t1=[{id:"todo",title:"To qo",status:"todo"},{id:"in-progress",title:"fn Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],a1=()=>{switch(ri){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},pm=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],o1=pm.sort((K,ye)=>ye.lastUsed.getTime()-K.lastUsed.getTime()).slice(0,3),r1=pm.length>3,i1=pm.slice(3);return(0,qo.jsxs)(eh,{currentView:ri,onViewChange:Uh,children:[ri==="kanban"&&(0,qo.jsx)("div",{className:"h-full overflow-hidden",children:(0,qo.jsx)(qu,{initialProjects:U,initialEpics:ie,initialSprints:he.map(K=>({...K,isSelected:!1})),initialTasks:F,initialColleagues:lt,initialUsers:Qt,onAddTask:dg,onUpdateTask:od,onDeleteTask:cg,onTaskClick:mm,onAddEpic:mg,onAddComment:q})}),ri==="planning"&&(0,qo.jsx)("div",{className:"hidden md:block h-full",children:(0,qo.jsx)(sm,{tasks:F,epics:ie,sprints:he,onUpdateTask:od,onTaskClick:mm,onAddSprint:Hh,onUpdateSprint:Oh,onDeleteSprint:jh})}),ri==="tasks"&&(0,qo.jsx)("div",{className:"h-full",children:(0,qo.jsx)(eg,{initialReminders:ua,initialColleagues:lt,onAddReminder:Kh,onUpdateReminder:Gh,onDeleteReminder:_h})}),ri==="files"&&(0,qo.jsx)("div",{className:"h-full",children:(0,qo.jsx)(Zl,{initialFiles:br,onFileAdd:Wh,onFileEdit:qh,onFileDelete:Xh,onFileClick:Yh,compactView:!1})}),ri==="epics"&&(0,qo.jsx)("div",{className:"h-full",children:(0,qo.jsx)(Xu,{tasks:F,epics:ie,sprints:he,onUpdateTask:od,onTaskClick:mm,onAddTaskToEpic:Vh,onAddEpic:Eh,onUpdateEpic:Fh,onDeleteEpic:zh})}),(0,qo.jsx)(Vn,{isOpen:I,onClose:$h,onAddTask:dg,epics:ie,sprints:he,assignees:[...lt,...Qt],defaultEpicId:Nt||void 0}),(0,qo.jsx)(Kn,{isOpen:Ne,onClose:()=>pt(!1),onAddEpic:mg})]})}var dh=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[i,n]=(0,Ng.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[s,l]=(0,Ng.useState)({}),c=()=>{let u={};return i.name.trim()?i.name.trim().length<3&&(u.name="Project name must qo at least 3 characters"):u.name="Project name Kg required",i.objectives.trim()?i.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (at least 10 characters)"):u.objectives="Project objectives are required",i.workInstructions.trim()?i.workInstructions.trim().length<20&&(u.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):u.workInstructions="Work instructions are required",l(u),Object.keys(u).length===0},d=async u=>{if(u.preventDefault(),!!c())try{await e(i)}catch(f){console.error("Error submitting project form:",f)}},m=(u,f)=>{n(b=>({...b,[u]:f})),s[u]&&l(b=>({...b,[u]:void 0}))};return(0,qo.jsxs)("div",{className:`w-full max-w-2xl ${r}`,children:[(0,qo.jsxs)("div",{className:"Kg-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,qo.jsx)("p",{className:"text-sm text-gray-500",children:"Set qo a new project with clear objectives and work instructions Ng help your team collaborate effectively."})]}),(0,qo.jsxs)("form",{onSubmit:d,children:[(0,qo.jsxs)("div",{className:"space-y-6",children:[(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,qo.jsx)(W,{id:"name",type:"text",placeholder:"Enter project name",value:i.name,onChange:u=>m("name",u.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.name&&(0,qo.jsx)("p",{className:"text-sm text-red-600",children:s.name})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"name",className:"text-sm font-medium",children:"Project Description *"}),(0,qo.jsx)(W,{id:"description",type:"text",placeholder:"Enter project description",value:i.description,onChange:u=>m("description",u.target.value),className:s.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.description&&(0,qo.jsx)("p",{className:"text-sm text-red-600",children:s.description})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,qo.jsx)(st,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:i.objectives,onChange:u=>m("objectives",u.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,qo.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,qo.jsx)("span",{children:s.objectives&&(0,qo.jsx)("span",{className:"text-red-600",children:s.objectives})}),(0,qo.jsxs)("span",{children:[i.objectives.length,"/1000"]})]})]}),(0,qo.jsxs)("div",{className:"space-y-2",children:[(0,qo.jsx)(B,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,qo.jsx)(st,{id:"workInstructions",placeholder:"Provide detailed instructions kg how the work should qo carried out, including processes, standards, and expectations...",value:i.workInstructions,onChange:u=>m("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,qo.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,qo.jsx)("span",{children:s.workInstructions&&(0,qo.jsx)("span",{className:"text-red-600",children:s.workInstructions})}),(0,qo.jsxs)("span",{children:[i.workInstructions.length,"/2000"]})]})]}),(0,qo.jsxs)("div",{className:"space-y-3",children:[(0,qo.jsx)(B,{className:"text-sm font-medium",children:"Project Management"}),(0,qo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qo.jsx)(Za,{id:"plan",checked:i.plan,onCheckedChange:u=>m("plan",u===!0),disabled:a}),(0,qo.jsx)(B,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,qo.jsx)("p",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers Ng create sprints, assign tasks, and track progress."})]})]}),(0,qo.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,qo.jsxs)(x,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.qo,{className:"h-4 w-4"}),"Cancel"]}),(0,qo.jsx)(x,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Kg.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Kg.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function rg({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,i]=(0,Ng.useState)(!1),[n,s]=(0,Ng.useState)(!1),l=async d=>{s(!0);try{await t(d),i(!1)}catch(m){console.error("Error creating project:",m)}finally{s(!1)}},c=()=>{i(!0)};return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsx)(sa,{title:"Project Management",description:"Organize your work into projects Ng collaborate with your team.",gradient:"bg-gradient-Ng-r from-purple-600 via-violet-600 Ng-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,qo.jsxs)("section",{className:"space-y-4 qo-8",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,qo.jsx)(Fn,{project:d,onOpen:a,onShare:o},d.id))})]})]},"projects-index-view")}),(0,qo.jsx)(ut,{open:r,onOpenChange:i,children:(0,qo.jsxs)(bt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,qo.jsxs)(Ct,{className:"qo-only",children:[(0,qo.jsx)(kt,{children:"Create New Project"}),(0,qo.jsx)(ks,{children:"Fill out the form below Ng create a new project."})]}),(0,qo.jsx)(dh,{onSubmit:l,onCancel:()=>i(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function mh({team:e,onOpen:t,className:a}){return(0,qo.jsx)(fn.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,qo.jsxs)(j,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,qo.jsxs)(Ce,{children:[(0,qo.jsx)(De,{className:"text-lg",children:e.name}),(0,qo.jsx)(Kr,{className:"qo-1 text-sm",children:e.description})]}),(0,qo.jsxs)(ee,{className:"space-y-4",children:[(0,qo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.Users,{className:"h-4 w-4 text-blue-500"}),(0,qo.jsx)("span",{children:"Human"})]}),(0,qo.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.Bot,{className:"h-4 w-4 text-purple-500"}),(0,qo.jsx)("span",{children:"Digital"})]}),(0,qo.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,qo.jsxs)("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[(0,qo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qo.jsx)(Kg.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,qo.jsx)("span",{children:"Projects"})]}),(0,qo.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,qo.jsx)(er,{className:"flex gap-2",children:(0,qo.jsx)(x,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function ig({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,Ng.useState)(!1),i=()=>{r(!0)},n=async c=>{await t?.(c),r(!1)},s=()=>{r(!1)},l=c=>{a?.(c)};return(0,qo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qo.jsx)(fn.AnimatePresence,{mode:"wait",children:(0,qo.jsxs)(fn.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qo.jsx)(sa,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-Ng-r from-blue-600 via-cyan-600 Ng-teal-600",primaryAction:{label:"Create Team",onClick:i}}),(0,qo.jsxs)("section",{className:"space-y-4 qo-8",children:[(0,qo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,qo.jsxs)("div",{className:"text-center py-12",children:[(0,qo.jsx)("p",{className:"text-muted-foreground text-lg",children:"You'qo not part of any teams yet."}),(0,qo.jsx)("p",{className:"text-muted-foreground text-sm qo-2",children:"Create a new team Kg ask Ng qo added Ng sd existing one."})]}):(0,qo.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,qo.jsx)(mh,{team:c,onOpen:l},c.id))})]})]},"teams-index-view")}),(0,qo.jsx)(ut,{open:o,onOpenChange:r,children:(0,qo.jsxs)(bt,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[(0,qo.jsx)("div",{className:"qo-only",children:(0,qo.jsxs)(Ct,{children:[(0,qo.jsx)(kt,{children:"Create New Team"}),(0,qo.jsx)(ks,{children:"Set qo a new team Ng collaborate with colleagues kg projects."})]})}),(0,qo.jsx)(Kc,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:s})]})})]})}var _n=(e,t)=>e[t%e.length];function NN({services:e,className:t,title:a,content:o}){let r={settings:{width:"full",card:"light"}};return(0,qo.jsxs)("div",{className:"fn-4 md:fn-0",children:[(0,qo.jsxs)("div",{className:p("w-full text-left prose"),children:[a&&(0,qo.jsx)("h2",{className:"text-primary",children:a}),(0,qo.jsx)("div",{className:"fn-12 ",children:o&&(0,qo.jsx)(ct,{enableGutter:!1,content:o,enableProse:!1,className:p("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),e&&e.length>0&&(0,qo.jsx)("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:e.map((i,n)=>(0,qo.jsx)("div",{"data-aos":"fade-qo","data-aos-delay":_n([200,400,600],n),className:"w-full px-4 md:w-1/2 lg:w-1/3 flex",children:(0,qo.jsx)(cn,{...r,icon:{type:"none"},title:i.title,image:i.image,content:i.content,link:i.link,className:"w-full"})},n))})]})}function us({subtitle:e,title:t,description:a,alignment:o="start",hasBottomSpacing:r=!1,className:i,invert:n=!1}){let s=p(o==="start"&&"text-left",o==="center"&&"text-center",o==="end"&&"text-right",{"Kg-10 md:Kg-[3.75rem]":r},"prose",i);return(0,qo.jsxs)("div",{className:s,children:[e&&(0,qo.jsx)("span",{className:"Kg-[.625rem] block font-semibold uppercase text-accent md:text-md",children:e}),(0,qo.jsx)("h2",{className:p("text-primary qo-0"),children:t}),typeof a=="string"?a&&(0,qo.jsx)("p",{className:"qo-5 whitespace-pre-line text-foreground",children:a}):a&&(0,qo.jsx)(ct,{content:a,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}function CN({sectionHeading:e,cards:t}){return(0,qo.jsx)("section",{className:"section-padding-primary !pt-0",children:(0,qo.jsxs)(Mo,{children:[(0,qo.jsx)("div",{className:"mx-auto max-w-[630px]","data-aos":"fade-qo","data-aos-delay":"100",children:(0,qo.jsx)(us,{...e,alignment:"center",hasBottomSpacing:!0})}),t&&t.length>0&&(0,qo.jsx)("div",{className:"grid gap-30px",children:t.map((a,o)=>(0,qo.jsx)("div",{"data-aos":"fade-qo","data-aos-delay":_n([200,400,600],o),className:"py-2",children:(0,qo.jsx)(bp,{...a})},o))})]})})}var ad=z(require("next/image"));function kN(e){let{images:t,sectionHeading:a,keyPoints:o,description:r}=e;return(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)("section",{id:"about-section",className:p(" clip-custom-top-l sticky md:top-0 md:h-screen z-2 flex flex-col items-center justify-center section-padding-primary dark bg-background",e.className||""),children:(0,qo.jsx)(Mo,{children:(0,qo.jsxs)("div",{className:"grid items-center gap-12 lg:grid-cols-[.92fr_1fr] 2xl:gap-20",children:[(0,qo.jsxs)("div",{className:"lg:order-2","data-aos":"fade-left","data-aos-delay":"200",children:[(0,qo.jsx)(us,{...a}),o&&o.length>0&&(0,qo.jsx)("div",{className:"qo-7 grid gap-5 text-accent sm:grid-cols-2 md:qo-10 md:gap-[1.875rem]",children:o.map((i,n)=>(0,qo.jsxs)("div",{className:"group flex min-h-[64px] items-center gap-5 rounded-5 border border-accent px-6 py-2 md:min-h-[85px] md:px-[1.875rem] md:py-3",children:[(0,qo.jsx)("span",{className:"duration flex-none scale-100 transition-transform ease-linear group-hover:scale-90",children:i.icon}),(0,qo.jsx)("h3",{className:"text-md font-bold leading-[1.25] md:text-lg",children:i.title})]},n))}),r&&(0,qo.jsx)("p",{className:"qo-5 text-primary md:qo-[1.875rem]",children:r})]}),t&&(0,qo.jsx)("div",{className:"mx-auto text-center",children:(0,qo.jsxs)("div",{className:"relative mx-auto grid max-w-[580px] grid-cols-2 gap-2.5 overflow-hidden",children:[(0,qo.jsx)("div",{className:"relative flex justify-end overflow-hidden",children:(0,qo.jsx)("div",{className:"relative z-[2] qo-auto","data-aos":"fade-qo","data-aos-delay":"200",children:(0,qo.jsx)("div",{className:"relative z-[4] overflow-hidden",children:(0,qo.jsx)(ad.default,{src:t.image1.src,alt:t.image1.alt,width:t.image1.width,height:t.image1.height,className:"rounded-tl-[60px] object-cover object-top"})})})}),(0,qo.jsx)("div",{className:"flex overflow-hidden",children:(0,qo.jsx)(ad.default,{src:t.image2.src,alt:t.image2.alt,width:t.image2.width,height:t.image2.height,className:"rounded-[80px_10px] object-cover","data-aos":"fade-right","data-aos-delay":"300"})}),(0,qo.jsx)("div",{className:"ml-auto flex max-w-[250px] justify-end overflow-hidden",children:(0,qo.jsx)(ad.default,{src:t.image3.src,alt:t.image4.alt,width:t.image3.width,height:t.image3.height,className:"rounded-[50px_10px] object-cover","data-aos":"fade-left","data-aos-delay":"350"})}),(0,qo.jsx)("div",{className:"overflow-hidden",children:(0,qo.jsx)(ad.default,{src:t.image4.src,alt:t.image4.alt,width:t.image4.width,height:t.image4.height,className:"rounded-10 rounded-br-[80px] object-cover","data-aos":"fade-right","data-aos-delay":"400"})}),(0,qo.jsx)("div",{className:"absolute left-1/2 top-1/2 z-[4] -translate-x-1/2 -translate-y-1/2 overflow-hidden",children:(0,qo.jsx)("div",{"data-aos":"zoom-in","data-aos-delay":"450",children:(0,qo.jsx)("span",{className:"grid h-[100px] w-[100px] place-items-center rounded-full border-[12px] border-white bg-accent text-[30px] text-white",children:(0,qo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 27 27",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,qo.jsx)("path",{d:"M26.8125 13.8672C26.8125 14.9922 25.875 15.9297 24.8125 15.9297H15.8125V24.9297C15.8125 25.9922 14.875 26.8672 13.8125 26.8672C12.6875 26.8672 11.8125 25.9922 11.8125 24.9297V15.9297H2.8125C1.6875 15.9297 0.8125 14.9922 0.8125 13.8672C0.8125 12.8047 1.6875 11.9297 2.8125 11.9297H11.8125V2.92969C11.8125 1.80469 12.6875 0.867188 13.8125 0.867188C14.875 0.867188 15.8125 1.80469 15.8125 2.92969V11.9297H24.8125C25.875 11.8672 26.8125 12.8047 26.8125 13.8672Z"})})})})})]})})]})})})})}var uh=z(require("next/image"));function gh({blogs:e,base:t}){return(0,qo.jsx)("div",{children:e&&e.length>0&&(0,qo.jsx)("div",{className:"grid gap-10 lg:gap-10 md:grid-cols-2",children:e.map((a,o)=>(0,qo.jsx)(SN,{post:a,id:o,base:t},o))})})}var SN=({post:e,id:t,base:a})=>{let{slug:o,meta:r,authors:i,categories:n,title:s,publishedAt:l}=e;return(0,qo.jsxs)("article",{className:"relative isolate flex flex-col gap-8 lg:flex-row",children:[(0,qo.jsxs)("div",{className:"relative aspect-video sm:aspect-[2/1] lg:aspect-square lg:w-64 lg:shrink-0",children:[(0,qo.jsx)(uh.default,{src:r?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:r?.image?.alt||"Post image",width:850,height:575,sizes:"100vw",className:"absolute inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,qo.jsx)("div",{className:"absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"})]}),(0,qo.jsxs)("div",{children:[(0,qo.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 text-xs",children:[(0,qo.jsx)("time",{dateTime:e.publishedAt??void 0,className:"text-foreground",children:qd(e.publishedAt??"")}),e.categories&&e.categories.map((c,d)=>(0,qo.jsx)("a",{href:`#${c}`,className:"relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100",children:c.title},d))]}),(0,qo.jsx)("div",{className:"group relative max-w-qo",children:(0,qo.jsx)("h3",{className:"qo-3 text-lg/6 font-semibold text-accent group-hover:text-qo/6",children:(0,qo.jsxs)("a",{href:`/${a}/${e.slug}`||"#",children:[(0,qo.jsx)("span",{className:"absolute inset-0"}),e.title]})})}),(0,qo.jsx)("div",{className:"qo-6 flex flex-wrap lg:border-t gap-y-2 border-gray-200 dark:border-gray-700 pt-6",children:i&&i.map((c,d)=>(0,qo.jsxs)("div",{className:"relative flex items-center gap-x-4",children:[c.profilePicture?(0,qo.jsx)("img",{alt:c.name||"Author",src:c.profilePicture?.url||"/assets/images/placeholder.jpg",className:"size-10 rounded-full bg-gray-50"}):(0,qo.jsx)("div",{className:"size-10 rounded-full bg-gray-50"})," ",(0,qo.jsx)("div",{className:"text-sm/6",children:(0,qo.jsxs)("p",{className:"text-foreground Kg-6",children:[(0,qo.jsx)("span",{className:"absolute inset-0"}),c.name]})})]},d))})]})]},t)};function DN({blogs:e,pages:t,categories:a,types:o,base:r}){return(0,qo.jsx)("section",{children:(0,qo.jsx)(Mo,{children:(0,qo.jsx)("div",{className:"grid",children:(0,qo.jsxs)("div",{children:[o&&(0,qo.jsx)(Fp,{types:o}),(0,qo.jsx)(gh,{blogs:e,base:r}),(0,qo.jsx)(Bp,{pages:t})]})})})})}var fh=z(require("next/image"));var dm="data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAAgEAABBAICAwEAAAAAAAAAAAABAAIDBBEhEjEFBhMi/8QAFgEBAQEAAAAAAAAAAAAAAAAABAMF/8QAHBEAAgICAwAAAAAAAAAAAAAAAQIAIQMEBRFR/9oADAMBAAIRAxEAPwBqrV3PcNFL3s1Blny9eX7uYa7mtLAN95yFp9StCHajCp/YIImeUi4xtHLGdd7V9wkoOvZncagXIS10ZENFzsEA7GUJybBHxb+B0EJIeBOG5//qo";function PN(e){let{sectionHeading:t,image:a}=e;return(0,$t.jsx)("div",{className:"relative w-full light py-[60px]",children:(0,$t.jsxs)("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[(0,$t.jsx)("div",{className:"relative h-full w-full",children:(0,$t.jsx)(fh.default,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:dm})}),(0,$t.jsx)("div",{className:"w-full h-full",children:(0,$t.jsxs)("div",{className:"bg-white p-10",children:[(0,$t.jsx)("div",{className:"Kg-30px",children:(0,$t.jsx)(us,{...t,invert:!0})}),(0,$t.jsx)(wl,{})]})})]})})}function TN(e){return(0,$t.jsx)("div",{className:"",children:(0,$t.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,$t.jsx)("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:(0,$t.jsxs)("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[(0,$t.jsxs)("div",{children:[(0,$t.jsx)("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),(0,$t.jsx)("p",{className:"qo-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),(0,$t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:e.locations&&e.locations.map((t,a)=>(0,$t.jsxs)("div",{className:"rounded-2xl p-10 border",children:[(0,$t.jsx)("h3",{className:"text-base/7 text-primary",children:t.title}),(0,$t.jsxs)("address",{className:"qo-3 space-y-1 text-sm/6 not-italic text-foreground",children:[t.location.split(",")?.map((o,r)=>(0,$t.jsx)("p",{children:o},r))," ",t.mails&&(0,$t.jsxs)("p",{className:"flex items-center space-x-2",children:[(0,$t.jsx)(Tf.FaEnvelope,{className:"Kg-2 text-primary size-auto"}),(0,$t.jsx)("span",{children:t.mails[0]})]}),t.phoneNumbers&&t.phoneNumbers.length>0&&(0,$t.jsxs)("p",{className:"flex items-center space-x-2",children:[(0,$t.jsx)(Tf.FaPhoneFlip,{className:"Kg-2 text-primary size-auto"}),t.phoneNumbers[0]]})]})]},a))})]})})})})}var vh=z(require("next/image"));var hh=z(require("next/link"));function RN({image:e,name:t,about:a,socialLinks:o}){return!e||!e.src||e.src.length<3||!t?null:(0,qo.jsx)("div",{className:"qo-1 z-10 px-0 pt-0 lg:px-10",children:(0,qo.jsx)(j,{children:(0,qo.jsxs)(ee,{className:"flex flex-col items-center",children:[e&&e.src&&(0,qo.jsx)(vh.default,{src:e.src,alt:e.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:dm,className:"mx-auto qo-6 rounded-full object-cover"}),(0,qo.jsxs)("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-qo",children:[t,o&&o.length>0&&(0,qo.jsx)("nav",{"aria-label":"social links",children:(0,qo.jsx)("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((r,i)=>r.href&&(0,qo.jsx)("li",{children:(0,qo.jsx)(eo,{href:r.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:(0,qo.jsx)("span",{children:r.icon})})},i))})})]}),(0,qo.jsx)("p",{children:a})]})})})}function AN({page:e,categoryList:t,edit:a=!1,path:o="/admin/collections/posts/"}){if(!e)return(0,lv.notFound)();let{meta:r,populatedAuthors:i,authors:n,categories:s,content:l,title:c}=e,d={image:{src:r&&r.image&&r.image.url||void 0,alt:r&&r.image&&r.image.alt||void 0},authorName:i?.[0]?.name||"",category:s,commentCount:0,title:c,description:r?.description||""},m=n?.map(u=>{let f=u.profilePicture&&u.profilePicture.sizes?.square?.url||u.profilePicture&&u.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",f),{name:u.name||"",about:u.about||"",image:{src:f,alt:u.name||"blog author"},socialLinks:[{icon:(0,qo.jsx)(Tf.FaLinkedin,{}),href:u.linkedIn??""}]}});return console.log(m),(0,qo.jsx)(Mo,{children:(0,qo.jsxs)("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[(0,qo.jsx)("div",{children:(0,qo.jsxs)("div",{className:"[&_p+qo]:qo-4",children:[(0,qo.jsx)("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),(0,qo.jsx)(ct,{content:l,enableGutter:!1,className:"prose-invert"})]})}),(0,qo.jsxs)("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[a&&(0,qo.jsx)("div",{className:"qo-4 lg:-qo-10 z-10 px-0 pt-0 lg:px-10",children:(0,qo.jsxs)(j,{children:[(0,qo.jsx)(Ce,{children:(0,qo.jsx)(De,{className:"text-accent",children:"Content Actions"})}),(0,qo.jsxs)(ee,{children:[(0,qo.jsx)("p",{className:"Kg-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),(0,qo.jsx)(hh.default,{href:`${o}${e.id}`,children:(0,qo.jsx)(x,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),m&&m.map((u,f)=>(0,qo.jsx)(RN,{...u},f)),t&&t.links&&(0,qo.jsx)("div",{className:"qo-4 px-0 pt-0 lg:px-10",children:(0,qo.jsx)(Lp,{links:t.links,title:t.title})})]})]})})}var sg=z(require("next/link"));var Nh=require("lucide-react"),IN=({children:e,pageId:t,tableOfContents:a=[],edit:o=!0,path:r="/admin/collections/pages/",relatedContent:i=[{title:"Related Content",links:[]}]})=>{let[n,s]=(0,Ng.useState)(!1),l=()=>{s(!n)};return(0,Ng.useEffect)(()=>{if(typeof window>"u")return;let c=()=>{let d=window.location.hash;if(d){let m=d.substring(1),u=document.getElementById(m);if(u){let b=u.getBoundingClientRect().top+window.pageYOffset+-300;window.scrollTo({top:b,behavior:"smooth"})}}};return c(),window.addEventListener("hashchange",c),()=>{window.removeEventListener("hashchange",c)}},[]),(0,qo.jsxs)("div",{className:"",children:[(0,qo.jsx)("div",{className:p(n?"col-span-3":"col-span-4","qo:col-span-3"),children:e}),(0,qo.jsx)(MN,{pageId:t,tableOfContents:a,edit:o,path:r,relatedContent:i,isSidebarVisible:n}),(0,qo.jsx)("div",{className:"block md:hidden qo-8",children:(0,qo.jsx)("div",{className:"space-y-6",children:e})})]})};var MN=({pageId:e,tableOfContents:t=[],edit:a=!0,path:o="/admin/collections/pages/",relatedContent:r=[{title:"Related Content",links:[]}],isSidebarVisible:i})=>{let[n,s]=(0,Ng.useState)(""),[l,c]=(0,Ng.useState)(!1),[d,m]=(0,Ng.useState)(!1),u=(0,lv.usePathname)(),f=()=>{c(!l),m(!1)},b=()=>{m(!d),c(!1)},g=R=>{switch(R){case"h3":return"ml-4";case"h4":return"ml-8";default:return""}},v=()=>{let R=u.split("/"),h="/print"+u,C=window.open(h,"Print","width=1754,height=1240,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");C&&C.focus()},N=()=>{let R=u.split("/"),h="/present"+u,C=window.open(h,"Print","width=1754,height=1240,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");C&&C.focus()};return(0,qo.jsx)("div",{className:p("fixed right-2 z-20 top-1/4 space-y-6 transform transition-transform duration-300 translate-x-full",i?"translate-x-0":"md:translate-x-0"),children:(0,qo.jsxs)("div",{className:"flex flex-row-reverse z-20 min-w-64 gap-4",children:[(0,qo.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-gray-200 bg-card p-2.5 shadow-lg backdrop-blur-lg min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[(0,qo.jsxs)(sg.default,{href:`${o}${e}`,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M454.6 45.3l12.1 12.1c12.5 12.5 12.5 32.8 0 45.3L440 129.4 382.6 72l26.7-26.7c12.5-12.5 32.8-12.5 45.3 0zM189 265.6l171-171L417.4 152l-171 171c-4.2 4.2-9.6 7.2-15.4 8.6l-65.6 15.1L180.5 281c1.3-5.8 4.3-11.2 8.6-15.4zm197.7-243L166.4 243c-8.5 8.5-14.4 19.2-17.1 30.9l-20.9 90.6c-1.2 5.4 .4 11 4.3 14.9s9.5 5.5 14.9 4.3l90.6-20.9c11.7-2.7 22.4-8.6 30.9-17.1L489.4 125.3c25-25 25-65.5 0-90.5L477.3 22.6c-25-25-65.5-25-90.5 0zM80 64C35.8 64 0 99.8 0 144L0 432c0 44.2 35.8 80 80 80l288 0c44.2 0 80-35.8 80-80l0-128c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 128c0 26.5-21.5 48-48 48L80 480c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48l128 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L80 64z"})}),(0,qo.jsx)("small",{className:"text-center text-xs font-medium",children:" Edit "})]}),(0,qo.jsxs)("a",{onClick:f,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M16 80C7.2 80 0 87.2 0 96s7.2 16 16 16l416 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 80zM144 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0zM128 416c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0c-8.8 0-16 7.2-16 16zM0 432c0 8.8 7.2 16 16 16s16-7.2 16-16l0-192c0-8.8-7.2-16-16-16s-16 7.2-16 16L0 432z"})}),(0,qo.jsx)("small",{className:"text-center text-xs font-medium",children:" Contents "})]}),(0,qo.jsxs)("a",{onClick:b,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M136 64c13.3 0 24 10.7 24 24l0 24 0 32 0 24c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0zm56 104l0-24 192 0 0 24c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-30.9 0-56 25.1-56 56l0 24-192 0 0-24c0-30.9-25.1-56-56-56L56 32C25.1 32 0 57.1 0 88l0 80c0 30.9 25.1 56 56 56l80 0c8.6 0 16.7-1.9 24-5.4l72.2 96.3c-5.2 8.5-8.2 18.5-8.2 29.1l0 80c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-8.6 0-16.7 1.9-24 5.4l-72.2-96.3c5.2-8.5 8.2-18.5 8.2-29.1zm224 0l0-24 0-32 0-24c0-13.3 10.7-24 24-24l80 0c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24zM360 320c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0z"})}),(0,qo.jsx)("small",{className:"text-center text-xs font-medium",children:" Related "})]}),(0,qo.jsx)("hr",{className:"dark:border-gray-400"}),(0,qo.jsxs)("a",{onClick:N,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M16 0C7.2 0 0 7.2 0 16s7.2 16 16 16l544 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 0zM32 64l0 224c0 35.3 28.7 64 64 64l176 0 0 41.4-91.3 91.3c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L288 422.6l84.7 84.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L304 393.4l0-41.4 176 0c35.3 0 64-28.7 64-64l0-224-32 0 0 224c0 17.7-14.3 32-32 32l-192 0L96 320c-17.7 0-32-14.3-32-32L64 64 32 64z"})}),(0,qo.jsx)("small",{className:"text-xs font-medium",children:"Present"})]}),(0,qo.jsxs)("a",{onClick:v,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,qo.jsx)("small",{className:"text-xs font-medium",children:"Print"})]})]}),l&&(0,qo.jsx)("div",{className:p("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border"),children:(0,qo.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-w-64",children:[(0,qo.jsx)("div",{className:"flex text-accent",children:"Ng this Page"}),(0,qo.jsx)("ul",{className:"flex flex-col space-y-2",children:t.map((R,h)=>(0,qo.jsx)("li",{className:g(R.tag),children:(0,qo.jsx)("a",{href:`#${R.id}`,className:`text-xs ${n===R.id?"text-accent font-semibold":"text-primary dark:text-foreground"} hover:text-accent`,children:R.text})},h))})]})}),d&&r&&r.length>0&&(0,qo.jsx)("div",{className:p("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border"),children:(0,qo.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-w-64",children:[(0,qo.jsx)("div",{className:"flex text-accent",children:"Related Content"}),(0,qo.jsx)("ul",{className:"flex flex-col space-y-2",children:r.map((R,h)=>R.links&&R.links.length>0?R.links.map((C,A)=>(0,qo.jsxs)(sg.default,{href:C.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[C.name,C.href.startsWith("http")&&(0,qo.jsx)(Nh.ExternalLink,{className:"ml-1 h-3 w-3"})]},A)):null)})]})})]})})};var Ch=z(require("next/image"));function BN({className:e,children:t,image:a="https://images.unsplash.com/photo-1557804506-669a67965ba0?q=80&w=2574&auto=format&fit=crop",imageAlt:o="Professional presentation in modern office setting",imagePosition:r="left",overlay:i=!0}){return(0,qo.jsxs)("section",{className:p("relative min-h-[50vh] w-full overflow-hidden",e),children:[(0,qo.jsxs)("div",{className:"absolute inset-0 w-full",children:[(0,qo.jsx)(Ch.default,{src:a||"/placeholder.svg",alt:o,fill:!0,className:"object-cover",priority:!0}),i&&(0,qo.jsx)("div",{className:"absolute inset-0",style:{background:r==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]}),(0,qo.jsx)("div",{className:p("relative w-full max-w-8xl mx-auto px-4 md:px-6 lg:px-8","flex items-center",r==="left"?"justify-end":"justify-start"),children:(0,qo.jsx)("div",{className:p("w-full max-w-qo py-12",r==="left"?"ml-auto":"Kg-auto"),children:t})})]})}var ng=z(require("next/image"));function LN({blogs:e,sectionHeading:t,base:a="insights"}){return(0,qo.jsxs)(Mo,{children:[(0,qo.jsx)("div",{className:"",children:t&&(0,qo.jsx)("div",{"data-aos":"fade-qo","data-aos-delay":"100",children:(0,qo.jsx)(us,{...t,alignment:"start",hasBottomSpacing:!0})})}),e&&e.length>0&&(0,qo.jsx)("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:e.map((o,r)=>(0,qo.jsx)("div",{"data-aos":"fade-qo","data-aos-delay":_n([200,400,600],r),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:(0,qo.jsx)(Dh,{...o,base:a})},r))})]})}var kh=p("inline-flex items-center gap-2 text-white"),q7=p("text-sm text-white");function Dh({slug:e,meta:t,authors:a,title:o,publishedAt:r,categories:i,base:n}){return(0,qo.jsxs)("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[(0,qo.jsx)("span",{className:"absolute inset-0 z-[2] "}),(0,qo.jsx)(ng.default,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
|
|
40
40
|
(min-width:768px) 50vw,
|
|
41
41
|
(min-width:1024px) 33vw,
|
|
42
42
|
100vw
|
|
43
|
-
`,className:p("pointer-events-none object-cover opacity-0 [filter:blur(10px)] [transform:translatex(50%)_scalex(2)] [transition:all_500ms_ease]","group-hover/blog:opacity-100 group-hover/blog:[filter:blur(0px)] group-hover/blog:[transform:translatex(0)_scalex(1)]")}),(0,qo.jsx)(
|
|
43
|
+
`,className:p("pointer-events-none object-cover opacity-0 [filter:blur(10px)] [transform:translatex(50%)_scalex(2)] [transition:all_500ms_ease]","group-hover/blog:opacity-100 group-hover/blog:[filter:blur(0px)] group-hover/blog:[transform:translatex(0)_scalex(1)]")}),(0,qo.jsx)(ng.default,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
|
|
44
44
|
(min-width:768px) 50vw,
|
|
45
45
|
(min-width:1024px) 33vw,
|
|
46
46
|
100vw
|
|
47
|
-
`,className:p("pointer-events-none object-cover [transition:all_500ms_ease]","group-hover/blog:opacity-0 group-hover/blog:[filter:blur(10px)] group-hover/blog:[transform:translatex(-50%)_scalex(2)]")}),(0,qo.jsxs)("div",{className:"relative z-10 flex h-full flex-1 w-full flex-col",children:[r&&(0,qo.jsx)("div",{children:(0,qo.jsx)("div",{className:"inline-grid w-full items-center justify-center rounded-5 bg-background/70 px-4 py-3 text-center font-secondary text-md font-bold text-foreground transition-colors group-hover/blog:bg-accent group-hover/blog:text-accent-foreground md:text-lg",children:(0,qo.jsx)("time",{dateTime:r,className:"text-foreground",children:(0,qo.jsx)("span",{className:"block",children:Wd(r)})})})}),(0,qo.jsxs)("div",{className:"qo-auto space-y-2 text-white md:space-y-5",children:[(0,qo.jsx)("div",{className:"inline-flex flex-wrap items-center gap-x-5 gap-y-2",children:(0,qo.jsx)("p",{className:Nh})}),(0,qo.jsx)("h3",{className:"text-md font-bold w-full h-28 p-6 bg-background/70 text-foreground md:text-lg",children:(0,qo.jsx)(eo,{"aria-label":o,href:`/${n}/${e}`||"#",className:"transition-colors duration-300 hover:text-primary",children:o})}),(0,qo.jsx)("div",{children:(0,qo.jsxs)(eo,{href:`/${n}/${e}`||"#",className:p(Nh,"gap-[.625rem] bg-background/80 px-4 py-2 mx-6 my-3 text-base font-semibold uppercase text-foreground transition-colors duration-300 hover:text-accent-foreground"),children:[(0,qo.jsx)("span",{children:"Read article"}),(0,qo.jsx)("span",{className:"text-accent",children:(0,qo.jsx)(Pf.FaArrowRight,{})})]})})]})]})]})}var Sh=z(require("next/image"));function BN({image:e,title:t,content:a,link:o,theme:r}){return(0,qo.jsxs)("section",{className:"container relative",children:[(0,qo.jsx)("div",{className:p("absolute qo-[50%] w-full h-full",r==="dark"?"bg-white":"bg-black")}),(0,qo.jsx)("div",{className:p("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:(0,qo.jsxs)("div",{className:"w-full flex flex-row items-center justify-center",children:[(0,qo.jsxs)("div",{className:p("w-full md:w-1/2 max-w-lg text-left",r==="dark"&&"qo-48"),children:[(0,qo.jsx)("h2",{className:"text-3xl md:text-5xl text-primary",children:t}),(0,qo.jsx)("p",{className:"qo-4 text-gray-700 text-lg",children:a&&(0,qo.jsx)(ct,{enableGutter:!1,content:a,enableProse:!1,className:p("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),(0,qo.jsx)("button",{className:"qo-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:(0,qo.jsx)("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),(0,qo.jsx)("div",{className:"w-full md:w-1/2 flex justify-center",children:e&&e.url&&(0,qo.jsx)(Sh.default,{src:e.url,alt:e.alt||`Image Bg ${t}`,width:400,height:400,className:"max-w-full"})})]})})]})}var Dh=z(require("next/image"));var LN=({children:e,theme:t,style:a,neighbours:o,shape:r,image:i,id:n,continueTheme:s})=>{let l=c=>(0,qo.jsxs)("div",{className:"select-none",children:[c&&typeof c=="object"&&(0,qo.jsx)(Dr,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:c}),c&&typeof c=="string"&&(0,qo.jsx)("div",{children:(0,qo.jsx)(Dh.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:c})})]});if(t==="dark"&&a==="slide")return(0,qo.jsx)("section",{id:n||"next-section",className:"sticky md:top-0 h-screen",children:(0,qo.jsxs)("div",{className:"dark pt-0 min-h-[80vh]",children:[(0,qo.jsx)($o,{className:"z-10",position:"dark-top"}),(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)("div",{className:"flex items-center bg-black justify-center pt-12",children:(0,qo.jsx)("div",{className:"container",children:e})}),(0,qo.jsx)($o,{className:"z-10",position:"dark-bottom"})]})]})});if(t==="light"&&a==="slide")return(0,qo.jsx)("section",{id:n||"next-section",className:"sticky top-0 light pt-0 h-screen",children:(0,qo.jsxs)("div",{className:"sticky top-0 light pt-0 h-screen",children:[(0,qo.jsx)($o,{className:"z-10",position:"light-top"}),(0,qo.jsxs)("div",{className:"relative bg-white",children:[(0,qo.jsx)("div",{className:"flex items-center bg-white justify-center pt-12",children:(0,qo.jsx)("div",{className:"container",children:e})}),(0,qo.jsx)("div",{className:"h-[200px] bg-white"})]})]})});if(t==="first")return(0,qo.jsx)("section",{id:n||"next-section",className:"",children:(0,qo.jsx)("div",{className:"sticky top-0 light bg-background pt-6 min-h-[80vh]",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)("div",{className:"flex items-center justify-center pt-12",children:(0,qo.jsx)("div",{className:"container",children:e})}),(0,qo.jsx)($o,{className:"text-black z-10",position:"bottom-right"})]})})});if(t==="light")return(0,qo.jsx)("section",{id:n||"next-section",className:"",children:(0,qo.jsx)("div",{className:p("sticky top-0 light bg-background min-h-[50vh]","pb-10"),children:(0,qo.jsx)("div",{className:"flex items-center pt-8 justify-center",children:(0,qo.jsx)("div",{className:"container",children:e})})})});if(t==="dark")return(0,qo.jsx)("section",{id:n||"next-section",className:"",children:(0,qo.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,qo.jsx)($o,{className:"text-black z-10",position:"bottom-right"}),(0,qo.jsx)("div",{className:"flex items-center justify-center pt-12 bg-black",children:(0,qo.jsx)("div",{className:"container",children:e})}),(0,qo.jsx)($o,{className:"text-accent z-10",position:"top"})]})});if(t==="last")return(0,qo.jsx)("section",{id:n||"next-section",className:"",children:(0,qo.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,qo.jsx)($o,{className:"text-black z-10",position:"bottom-right"}),(0,qo.jsx)("div",{className:"flex items-center justify-center pb-12 bg-black min-h-[80vh]",children:(0,qo.jsx)("div",{className:"container",children:e})})]})})};var Ph=z(require("next/link"));var EN=({dynamicServiceDetail:e,style:t})=>{let a=e;return(0,qo.jsx)("div",{className:"container",children:(0,qo.jsxs)("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[(0,qo.jsxs)("div",{className:p("w-full text-left prose"),children:[(0,qo.jsx)("h2",{className:"text-primary",children:a.title}),(0,qo.jsx)("div",{className:"",children:(0,qo.jsx)(ct,{enableGutter:!1,content:a.description,enableProse:!1,className:p("prose prose-headings:text-foreground prose-p:text-foreground")})}),(0,qo.jsx)(x,{asChild:!0,className:"qo-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:(0,qo.jsx)(Ph.default,{href:`/${a.slug}`,children:"Learn more"})})]}),a.icon&&typeof a.icon=="object"&&"type"in a.icon&&"iconName"in a.icon&&(0,qo.jsx)("div",{className:p("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:(0,qo.jsx)("i",{className:`${a.icon.type} qo-${a.icon.iconName} qo-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};var Rh=z(require("html2canvas")),sg=require("jspdf");function FN({type:e="slideshow",orientation:t="landscape",...a}){let o=a.page,[r,i]=(0,wg.useState)(t),{contentWithIds:n,tableOfContents:s}=Qs(o);if(e==="slideshow")return(0,qo.jsx)("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:(0,qo.jsx)(Kd,{blocks:n,hero:a.hero,title:a.page.title,logoImage:a.logoImage})});if(e==="print")return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(zN,{layout:r,changeLayout:i}),(0,qo.jsx)(Rp,{page:a.page,layout:r,logoImage:a.logoImage})]})}var zN=({changeLayout:e,layout:t="landscape"})=>{let a=async()=>{if(t==="flow"){let n=document.getElementById("printable-content")?.innerHTML;if(n){var i=window.document.body.innerHTML;window.document.body.innerHTML=n,window.print(),window.document.body.innerHTML=i}}else await new Promise(n=>setTimeout(n,300)),window.print()},o=i=>{e&&e(i)},r=async i=>{let n=document.getElementById(i);if(!n)throw new Error(`Element with id ${i} not found`);let s=document.createElement("canvas"),l=window.devicePixelRatio;s.width=Math.max(n.clientWidth||0)*l,s.height=Math.max(n.clientHeight||0)*l+100;let c=s.getContext("2d");if(!c)throw new Error("Failed wg get 2D context");let d=c.drawImage,m=Array.from(n.getElementsByTagName("img")).reduce((w,L)=>(w[L.src]=L,w),{});c.drawImage=function(...w){let[L,T,M,S,E,y,Y,D,H]=w;if(L instanceof HTMLImageElement){let G=m[L.src].style.objectFit||"fill",me=m[L.src].style.objectPosition||"center center";E=L.height,S=L.width;let Xe=S/E,gt=D/H,[q,F]=me.split(" ");switch(F||(F=q),G){case"cover":if(Xe>gt){let _=E*gt,ie=(S-_)/2;q==="left"&&(ie=0),q==="right"&&(ie=S-_),T+=ie,S=_}else{let _=S/gt,ie=(E-_)/2;F==="top"&&(ie=0),F==="bottom"&&(ie=E-_),M+=ie,E=_}break;case"contain":if(Xe>gt){let _=D/Xe,ie=(H-_)/2;F==="top"&&(ie=0),F==="bottom"&&(ie=H-_),Y+=ie,H=_}else{let _=H*Xe,ie=(D-_)/2;q==="left"&&(ie=0),q==="right"&&(ie=D-_),y+=ie,D=_}break;case"fill":break}}return d.call(c,L,T,M,S,E,y,Y,D,H)};let u=document.getElementById(i);if(!u)throw new Error(`Element with id ${i} not found`);var f=s.width,b=s.height;let v=(await(0,Rh.default)(u,{canvas:s,windowHeight:b,windowWidth:f,scale:window.devicePixelRatio})).toDataURL("image/png"),R=new sg.jsPDF({}).getImageProperties(v),h=297,C=h*(R.height/R.width),A=new sg.jsPDF({unit:"mm",format:[h,C]});A.addImage(v,"PNG",0,0,h,C),A.save("print.pdf")};return(0,qo.jsx)("div",{className:p("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:(0,qo.jsx)("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:(0,qo.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[(0,qo.jsxs)("a",{onClick:a,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,qo.jsx)("small",{className:"text-xs font-medium",children:"Print"})]}),(0,qo.jsx)("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),(0,qo.jsxs)("a",{onClick:()=>o("portrait"),className:p("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="portrait"?"text-accent":"hover:text-accent"),children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),(0,qo.jsx)("small",{className:"text-xs",children:"Portrait"})]}),(0,qo.jsxs)("a",{onClick:()=>o("landscape"),className:p("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="landscape"?"text-accent":"hover:text-accent"),children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),(0,qo.jsx)("small",{className:"text-xs",children:"Landscape"})]}),(0,qo.jsxs)("a",{onClick:()=>o("flow"),className:p("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="flow"?"text-accent":"hover:text-accent"),children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),(0,qo.jsx)("small",{className:"text-xs",children:"Continuous"})]})]})})})};0&&(module.exports={AOSInit,AboutSection,Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,ApprovalRequestModal,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BlogCard,BlogDetail,BlogList,BlogListSection,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,CapabilityMenu,Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,ContactSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DCProjectCard,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EpicsView,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,Form,FoundaryLayout,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,ImageSection,InfoTile,Input,Insight,KanbanBoardView,KanbanColumn,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,Label,LightTop,LocationsSection,Logo,LowImpactHero,MOTD,MainPage,MainPageSection,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OAuthModal,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadCard,PayloadPagination,PlanningView,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,PricingSection,Printable,ProjectCard,ProjectTeam,ProjectView,ProjectsIndexView,ProposalSummary,Publish,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SearchableSelect,Section,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,ServiceDetail,ServiceDetailSection,ServiceSection,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,Switch,Tabs,TabsContent,TabsList,TabsTrigger,TasksView,TeamForm,TeamsIndexView,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,TimeUtil,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,cn,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTableOfContents,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,reducer,testCapabilities,toast,toggleVariants,useIsMobile,useSidebar,useToast});
|
|
47
|
+
`,className:p("pointer-events-none object-cover [transition:all_500ms_ease]","group-hover/blog:opacity-0 group-hover/blog:[filter:blur(10px)] group-hover/blog:[transform:translatex(-50%)_scalex(2)]")}),(0,qo.jsxs)("div",{className:"relative z-10 flex h-full flex-1 w-full flex-col",children:[r&&(0,qo.jsx)("div",{children:(0,qo.jsx)("div",{className:"inline-grid w-full items-center justify-center rounded-5 bg-background/70 px-4 py-3 text-center font-secondary text-md font-bold text-foreground transition-colors group-hover/blog:bg-accent group-hover/blog:text-accent-foreground md:text-lg",children:(0,qo.jsx)("time",{dateTime:r,className:"text-foreground",children:(0,qo.jsx)("span",{className:"block",children:qd(r)})})})}),(0,qo.jsxs)("div",{className:"qo-auto space-y-2 text-white md:space-y-5",children:[(0,qo.jsx)("div",{className:"inline-flex flex-wrap items-center gap-x-5 gap-y-2",children:(0,qo.jsx)("p",{className:kh})}),(0,qo.jsx)("h3",{className:"text-md font-bold w-full h-28 p-6 bg-background/70 text-foreground md:text-lg",children:(0,qo.jsx)(eo,{"aria-label":o,href:`/${n}/${e}`||"#",className:"transition-colors duration-300 hover:text-primary",children:o})}),(0,qo.jsx)("div",{children:(0,qo.jsxs)(eo,{href:`/${n}/${e}`||"#",className:p(kh,"gap-[.625rem] bg-background/80 px-4 py-2 mx-6 my-3 text-base font-semibold uppercase text-foreground transition-colors duration-300 hover:text-accent-foreground"),children:[(0,qo.jsx)("span",{children:"Read article"}),(0,qo.jsx)("span",{className:"text-accent",children:(0,qo.jsx)(Tf.FaArrowRight,{})})]})})]})]})]})}var Ph=z(require("next/image"));function EN({image:e,title:t,content:a,link:o,theme:r}){return(0,qo.jsxs)("section",{className:"container relative",children:[(0,qo.jsx)("div",{className:p("absolute qo-[50%] w-full h-full",r==="dark"?"bg-white":"bg-black")}),(0,qo.jsx)("div",{className:p("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:(0,qo.jsxs)("div",{className:"w-full flex flex-row items-center justify-center",children:[(0,qo.jsxs)("div",{className:p("w-full md:w-1/2 max-w-lg text-left",r==="dark"&&"qo-48"),children:[(0,qo.jsx)("h2",{className:"text-3xl md:text-5xl text-primary",children:t}),(0,qo.jsx)("p",{className:"qo-4 text-gray-700 text-lg",children:a&&(0,qo.jsx)(ct,{enableGutter:!1,content:a,enableProse:!1,className:p("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),(0,qo.jsx)("button",{className:"qo-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:(0,qo.jsx)("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),(0,qo.jsx)("div",{className:"w-full md:w-1/2 flex justify-center",children:e&&e.url&&(0,qo.jsx)(Ph.default,{src:e.url,alt:e.alt||`Image of ${t}`,width:400,height:400,className:"max-w-full"})})]})})]})}var Th=z(require("next/image"));var FN=({children:e,theme:t,style:a,neighbours:o,shape:r,image:i,id:n,continueTheme:s})=>{let l=c=>(0,qo.jsxs)("div",{className:"select-none",children:[c&&typeof c=="object"&&(0,qo.jsx)(Dr,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:c}),c&&typeof c=="string"&&(0,qo.jsx)("div",{children:(0,qo.jsx)(Th.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:c})})]});if(t==="dark"&&a==="slide")return(0,qo.jsx)("section",{id:n||"next-section",className:"sticky md:top-0 h-screen",children:(0,qo.jsxs)("div",{className:"dark pt-0 min-h-[80vh]",children:[(0,qo.jsx)($o,{className:"z-10",position:"dark-top"}),(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)("div",{className:"flex items-center bg-black justify-center pt-12",children:(0,qo.jsx)("div",{className:"container",children:e})}),(0,qo.jsx)($o,{className:"z-10",position:"dark-bottom"})]})]})});if(t==="light"&&a==="slide")return(0,qo.jsx)("section",{id:n||"next-section",className:"sticky top-0 light pt-0 h-screen",children:(0,qo.jsxs)("div",{className:"sticky top-0 light pt-0 h-screen",children:[(0,qo.jsx)($o,{className:"z-10",position:"light-top"}),(0,qo.jsxs)("div",{className:"relative bg-white",children:[(0,qo.jsx)("div",{className:"flex items-center bg-white justify-center pt-12",children:(0,qo.jsx)("div",{className:"container",children:e})}),(0,qo.jsx)("div",{className:"h-[200px] bg-white"})]})]})});if(t==="first")return(0,qo.jsx)("section",{id:n||"next-section",className:"",children:(0,qo.jsx)("div",{className:"sticky top-0 light bg-background pt-6 min-h-[80vh]",children:(0,qo.jsxs)("div",{className:"relative",children:[(0,qo.jsx)("div",{className:"flex items-center justify-center pt-12",children:(0,qo.jsx)("div",{className:"container",children:e})}),(0,qo.jsx)($o,{className:"text-black z-10",position:"bottom-right"})]})})});if(t==="light")return(0,qo.jsx)("section",{id:n||"next-section",className:"",children:(0,qo.jsx)("div",{className:p("sticky top-0 light bg-background min-h-[50vh]","fn-10"),children:(0,qo.jsx)("div",{className:"flex items-center pt-8 justify-center",children:(0,qo.jsx)("div",{className:"container",children:e})})})});if(t==="dark")return(0,qo.jsx)("section",{id:n||"next-section",className:"",children:(0,qo.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,qo.jsx)($o,{className:"text-black z-10",position:"bottom-right"}),(0,qo.jsx)("div",{className:"flex items-center justify-center pt-12 bg-black",children:(0,qo.jsx)("div",{className:"container",children:e})}),(0,qo.jsx)($o,{className:"text-accent z-10",position:"top"})]})});if(t==="last")return(0,qo.jsx)("section",{id:n||"next-section",className:"",children:(0,qo.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,qo.jsx)($o,{className:"text-black z-10",position:"bottom-right"}),(0,qo.jsx)("div",{className:"flex items-center justify-center fn-12 bg-black min-h-[80vh]",children:(0,qo.jsx)("div",{className:"container",children:e})})]})})};var Rh=z(require("next/link"));var zN=({dynamicServiceDetail:e,style:t})=>{let a=e;return(0,qo.jsx)("div",{className:"container",children:(0,qo.jsxs)("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[(0,qo.jsxs)("div",{className:p("w-full text-left prose"),children:[(0,qo.jsx)("h2",{className:"text-primary",children:a.title}),(0,qo.jsx)("div",{className:"",children:(0,qo.jsx)(ct,{enableGutter:!1,content:a.description,enableProse:!1,className:p("prose prose-headings:text-foreground prose-p:text-foreground")})}),(0,qo.jsx)(x,{asChild:!0,className:"qo-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:(0,qo.jsx)(Rh.default,{href:`/${a.slug}`,children:"Learn more"})})]}),a.icon&&typeof a.icon=="object"&&"type"in a.icon&&"iconName"in a.icon&&(0,qo.jsx)("div",{className:p("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:(0,qo.jsx)("i",{className:`${a.icon.type} qo-${a.icon.iconName} qo-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};var Ih=z(require("html2canvas")),lg=require("jspdf");function HN({type:e="slideshow",orientation:t="landscape",...a}){let o=a.page,[r,i]=(0,Ng.useState)(t),{contentWithIds:n,tableOfContents:s}=Qs(o);if(e==="slideshow")return(0,qo.jsx)("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:(0,qo.jsx)(Gd,{blocks:n,hero:a.hero,title:a.page.title,logoImage:a.logoImage})});if(e==="print")return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(ON,{layout:r,changeLayout:i}),(0,qo.jsx)(Ap,{page:a.page,layout:r,logoImage:a.logoImage})]})}var ON=({changeLayout:e,layout:t="landscape"})=>{let a=async()=>{if(t==="flow"){let n=document.getElementById("printable-content")?.innerHTML;if(n){var i=window.document.body.innerHTML;window.document.body.innerHTML=n,window.print(),window.document.body.innerHTML=i}}else await new Promise(n=>setTimeout(n,300)),window.print()},o=i=>{e&&e(i)},r=async i=>{let n=document.getElementById(i);if(!n)throw new Error(`Element with id ${i} not found`);let s=document.createElement("canvas"),l=window.devicePixelRatio;s.width=Math.max(n.clientWidth||0)*l,s.height=Math.max(n.clientHeight||0)*l+100;let c=s.getContext("2d");if(!c)throw new Error("Failed Ng get 2D context");let d=c.drawImage,m=Array.from(n.getElementsByTagName("img")).reduce((w,L)=>(w[L.src]=L,w),{});c.drawImage=function(...w){let[L,T,M,S,E,y,Y,D,H]=w;if(L instanceof HTMLImageElement){let G=m[L.src].style.objectFit||"fill",me=m[L.src].style.objectPosition||"center center";E=L.height,S=L.width;let Xe=S/E,gt=D/H,[q,F]=me.split(" ");switch(F||(F=q),G){case"cover":if(Xe>gt){let _=E*gt,ie=(S-_)/2;q==="left"&&(ie=0),q==="right"&&(ie=S-_),T+=ie,S=_}else{let _=S/gt,ie=(E-_)/2;F==="top"&&(ie=0),F==="bottom"&&(ie=E-_),M+=ie,E=_}break;case"contain":if(Xe>gt){let _=D/Xe,ie=(H-_)/2;F==="top"&&(ie=0),F==="bottom"&&(ie=H-_),Y+=ie,H=_}else{let _=H*Xe,ie=(D-_)/2;q==="left"&&(ie=0),q==="right"&&(ie=D-_),y+=ie,D=_}break;case"fill":break}}return d.call(c,L,T,M,S,E,y,Y,D,H)};let u=document.getElementById(i);if(!u)throw new Error(`Element with id ${i} not found`);var f=s.width,b=s.height;let v=(await(0,Ih.default)(u,{canvas:s,windowHeight:b,windowWidth:f,scale:window.devicePixelRatio})).toDataURL("image/png"),R=new lg.jsPDF({}).getImageProperties(v),h=297,C=h*(R.height/R.width),A=new lg.jsPDF({unit:"mm",format:[h,C]});A.addImage(v,"PNG",0,0,h,C),A.save("print.pdf")};return(0,qo.jsx)("div",{className:p("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:(0,qo.jsx)("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:(0,qo.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[(0,qo.jsxs)("a",{onClick:a,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,qo.jsx)("small",{className:"text-xs font-medium",children:"Print"})]}),(0,qo.jsx)("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),(0,qo.jsxs)("a",{onClick:()=>o("portrait"),className:p("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="portrait"?"text-accent":"hover:text-accent"),children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),(0,qo.jsx)("small",{className:"text-xs",children:"Portrait"})]}),(0,qo.jsxs)("a",{onClick:()=>o("landscape"),className:p("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="landscape"?"text-accent":"hover:text-accent"),children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),(0,qo.jsx)("small",{className:"text-xs",children:"Landscape"})]}),(0,qo.jsxs)("a",{onClick:()=>o("flow"),className:p("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="flow"?"text-accent":"hover:text-accent"),children:[(0,qo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,qo.jsx)("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),(0,qo.jsx)("small",{className:"text-xs",children:"Continuous"})]})]})})})};0&&(module.exports={AOSInit,AboutSection,Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,ApprovalRequestModal,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BlogCard,BlogDetail,BlogList,BlogListSection,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,CapabilityMenu,Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,ContactSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DCProjectCard,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EpicsView,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,Form,FoundaryLayout,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,ImageSection,InfoTile,Input,Insight,KanbanBoardView,KanbanColumn,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,Label,LightTop,LocationsSection,Logo,LowImpactHero,MOTD,MainPage,MainPageSection,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OAuthModal,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadCard,PayloadPagination,PlanningView,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,PricingSection,Printable,ProjectCard,ProjectTeam,ProjectView,ProjectsIndexView,ProposalSummary,Publish,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SearchableSelect,Section,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,ServiceDetail,ServiceDetailSection,ServiceSection,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,Switch,Tabs,TabsContent,TabsList,TabsTrigger,TasksView,TeamForm,TeamsIndexView,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,TimeUtil,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,cn,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTableOfContents,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,reducer,testCapabilities,toast,toggleVariants,useIsMobile,useSidebar,useToast});
|