cortex-react-components 2.20.1 → 2.21.0

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.
Files changed (137) hide show
  1. package/dist/{chunk-D3YJZROI.mjs → chunk-252ULRSC.mjs} +1 -1
  2. package/dist/{chunk-MGSTQLZC.mjs → chunk-255P6K5W.mjs} +1 -1
  3. package/dist/{chunk-R33MOMFK.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  4. package/dist/{chunk-UPRS7OYQ.mjs → chunk-2UNIT7NC.mjs} +1 -1
  5. package/dist/{chunk-5PJLI46T.mjs → chunk-5COSGSOW.mjs} +1 -1
  6. package/dist/{chunk-CTC6WSB6.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  7. package/dist/{chunk-CCJJAUGB.mjs → chunk-5WVFEIMC.mjs} +1 -1
  8. package/dist/{chunk-HLTP3ZQN.mjs → chunk-67QPOSVV.mjs} +1 -1
  9. package/dist/{chunk-VDFRWGXR.mjs → chunk-6PS55VJZ.mjs} +1 -1
  10. package/dist/{chunk-3EGSOIRH.mjs → chunk-7GMAMIHM.mjs} +1 -1
  11. package/dist/chunk-A2RRQOKB.mjs +4 -0
  12. package/dist/{chunk-XYJ4S67W.mjs → chunk-B7AXSCTN.mjs} +1 -1
  13. package/dist/{chunk-OXKN6X62.mjs → chunk-CBIULUZQ.mjs} +1 -1
  14. package/dist/{chunk-ANCSWAD7.mjs → chunk-ERJXTG6X.mjs} +1 -1
  15. package/dist/{chunk-GO42W2BM.mjs → chunk-FKU4VQR6.mjs} +1 -1
  16. package/dist/{chunk-YPSUDHCJ.mjs → chunk-H3CJOE6S.mjs} +1 -1
  17. package/dist/{chunk-6EKGV4I2.mjs → chunk-HKGW6JI2.mjs} +1 -1
  18. package/dist/{chunk-W2LPR7SX.mjs → chunk-I6XKBCH4.mjs} +1 -1
  19. package/dist/{chunk-JNJJAJPI.mjs → chunk-IF3425JX.mjs} +1 -1
  20. package/dist/{chunk-MSFBSDB3.mjs → chunk-JPLBPV7J.mjs} +1 -1
  21. package/dist/{chunk-2YULWG5F.mjs → chunk-KLZDL7ZO.mjs} +1 -1
  22. package/dist/{chunk-QZIJTAPO.mjs → chunk-LBUC4M6L.mjs} +1 -1
  23. package/dist/{chunk-DX3G3FKT.mjs → chunk-LJOWXPWW.mjs} +1 -1
  24. package/dist/{chunk-RMZLEIRP.mjs → chunk-LJQPLE4S.mjs} +1 -1
  25. package/dist/{chunk-QILFMWE5.mjs → chunk-M7NV6EFH.mjs} +1 -1
  26. package/dist/{chunk-33CHGT4N.mjs → chunk-MXCW6SOT.mjs} +1 -1
  27. package/dist/{chunk-MFUZNS7C.mjs → chunk-N3B3XNV3.mjs} +1 -1
  28. package/dist/{chunk-EPJJKGCG.mjs → chunk-NC6UHRF5.mjs} +1 -1
  29. package/dist/{chunk-MEVSHOG4.mjs → chunk-NWISIJFD.mjs} +1 -1
  30. package/dist/{chunk-G27V7B6H.mjs → chunk-ONGM3ZJY.mjs} +1 -1
  31. package/dist/{chunk-UJITFLIZ.mjs → chunk-OV72K3OX.mjs} +1 -1
  32. package/dist/{chunk-YWRU7OE3.mjs → chunk-PK3OBSCB.mjs} +1 -1
  33. package/dist/{chunk-D6K6RO5P.mjs → chunk-R5P4ZICA.mjs} +1 -1
  34. package/dist/{chunk-LLP4EFT4.mjs → chunk-RQLUMNJE.mjs} +1 -1
  35. package/dist/chunk-TBLFTUKX.mjs +4 -0
  36. package/dist/{chunk-VQBOJHZF.mjs → chunk-YKG4FNS4.mjs} +1 -1
  37. package/dist/chunk-ZTEV75OU.mjs +4 -0
  38. package/dist/components/Blocks/Banner.mjs +1 -1
  39. package/dist/components/Blocks/CallToAction.mjs +1 -1
  40. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  41. package/dist/components/Blocks/Content.mjs +1 -1
  42. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  43. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  44. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  45. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  46. package/dist/components/Blocks/index.mjs +1 -1
  47. package/dist/components/Cards/ContentCard.mjs +1 -1
  48. package/dist/components/Cards/FeatureCard.mjs +1 -1
  49. package/dist/components/Cards/index.mjs +1 -1
  50. package/dist/components/Chat/ChatInterface.mjs +1 -1
  51. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  52. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  53. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  54. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  55. package/dist/components/Chat/demo-tests.mjs +1 -1
  56. package/dist/components/Chat/demo.mjs +1 -1
  57. package/dist/components/Chat/example-usage.mjs +1 -1
  58. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  59. package/dist/components/Chat/index.mjs +1 -1
  60. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  61. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  62. package/dist/components/DigitalColleagues/document-edit.d.ts +2 -2
  63. package/dist/components/DigitalColleagues/document-edit.js +0 -1
  64. package/dist/components/DigitalColleagues/index.mjs +1 -1
  65. package/dist/components/Foundary/Knowledge/add-knowledge-modal.js +1 -1
  66. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  67. package/dist/components/Foundary/MainPage.mjs +1 -1
  68. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  69. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  70. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  71. package/dist/components/Foundary/Views/KnowledgeView.d.ts +1 -1
  72. package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
  73. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  74. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  75. package/dist/components/Foundary/Views/index.js +1 -1
  76. package/dist/components/Foundary/Views/index.mjs +1 -1
  77. package/dist/components/Foundary/document-preview-examples.js +3 -3
  78. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  79. package/dist/components/Foundary/document-preview.d.ts +1 -1
  80. package/dist/components/Foundary/document-preview.js +1 -1
  81. package/dist/components/Foundary/document-preview.mjs +1 -1
  82. package/dist/components/Foundary/index.js +1 -1
  83. package/dist/components/Foundary/index.mjs +1 -1
  84. package/dist/components/Foundary/knowledge-browser.d.ts +1 -1
  85. package/dist/components/Foundary/knowledge-browser.js +1 -1
  86. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  87. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  88. package/dist/components/HeaderFooter/index.mjs +1 -1
  89. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  90. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  91. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  92. package/dist/components/Heros/RenderHero.mjs +1 -1
  93. package/dist/components/Heros/index.mjs +1 -1
  94. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  95. package/dist/components/Holidays/index.mjs +1 -1
  96. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  97. package/dist/components/Layouts/Print.mjs +1 -1
  98. package/dist/components/Layouts/SlideShow.mjs +1 -1
  99. package/dist/components/Layouts/index.mjs +1 -1
  100. package/dist/components/Payload/RichText/index.mjs +1 -1
  101. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  102. package/dist/components/Payload/index.mjs +1 -1
  103. package/dist/components/Projects/EpicsView.mjs +1 -1
  104. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  105. package/dist/components/Projects/ProjectPage.mjs +1 -1
  106. package/dist/components/Projects/ProjectView.mjs +1 -1
  107. package/dist/components/Projects/index.mjs +1 -1
  108. package/dist/components/dc-temp/index.mjs +1 -1
  109. package/dist/components/index.js +19 -19
  110. package/dist/components/index.mjs +1 -1
  111. package/dist/globals.css +1 -1
  112. package/dist/index.js +17 -17
  113. package/dist/index.mjs +1 -1
  114. package/dist/metafile-cjs.json +1 -1
  115. package/dist/metafile-esm.json +1 -1
  116. package/dist/pages/Blog.mjs +1 -1
  117. package/dist/pages/Documentation.mjs +1 -1
  118. package/dist/pages/IndexPage.mjs +1 -1
  119. package/dist/pages/Intranet.mjs +1 -1
  120. package/dist/pages/LandingPage.mjs +1 -1
  121. package/dist/pages/Page.mjs +1 -1
  122. package/dist/pages/Publish.mjs +1 -1
  123. package/dist/pages/Website.mjs +1 -1
  124. package/dist/sections/AboutSection.mjs +1 -1
  125. package/dist/sections/BlogDetail.mjs +1 -1
  126. package/dist/sections/BlogList.mjs +1 -1
  127. package/dist/sections/ContactSection.mjs +1 -1
  128. package/dist/sections/PageSections.mjs +1 -1
  129. package/dist/sections/PricingSection.mjs +1 -1
  130. package/dist/sections/ServiceDetail.mjs +1 -1
  131. package/dist/sections/ServiceDetailSection.mjs +1 -1
  132. package/dist/sections/ServiceSection.mjs +1 -1
  133. package/dist/sections/index.mjs +1 -1
  134. package/package.json +1 -1
  135. package/dist/chunk-4CHIFK3W.mjs +0 -4
  136. package/dist/chunk-PE5L5LZL.mjs +0 -4
  137. package/dist/chunk-V4W2JDQB.mjs +0 -4
@@ -1 +1 @@
1
- import{a as x}from"../../chunk-UPRS7OYQ.mjs";import{a as s}from"../../chunk-D3YJZROI.mjs";import{a as n}from"../../chunk-G27V7B6H.mjs";import{a as r}from"../../chunk-4CHIFK3W.mjs";import"../../chunk-W2LPR7SX.mjs";import"../../chunk-U2OXF7PJ.mjs";import"../../chunk-GAU24H4A.mjs";import"../../chunk-R4SE63GR.mjs";import{a as v}from"../../chunk-5PJLI46T.mjs";import"../../chunk-QOZ2O3FG.mjs";import{a as u}from"../../chunk-2R3MJSQ7.mjs";import{a as w}from"../../chunk-HSQAHQNP.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-CDVRH3MC.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-VDFRWGXR.mjs";import"../../chunk-LLP4EFT4.mjs";import"../../chunk-UM57PWI7.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-KZCIHFTM.mjs";import{a as t}from"../../chunk-NAGBKKTZ.mjs";import"../../chunk-JXQRVEQB.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-DXRAJQMA.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-VGWDYD6Z.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-EOR2BAI2.mjs";import{a as k}from"../../chunk-NDZ26EG6.mjs";import{a as c}from"../../chunk-CRAFZGCI.mjs";import{a as l}from"../../chunk-M2REXGQW.mjs";import{a as q}from"../../chunk-PE5L5LZL.mjs";import{a as m}from"../../chunk-CJ6APTVT.mjs";import"../../chunk-YRMNCHFO.mjs";import"../../chunk-I4GYQZGM.mjs";import{a as f}from"../../chunk-EZC3YWSQ.mjs";import{a as g}from"../../chunk-HB57GPGK.mjs";import{a as i}from"../../chunk-KKW3FINI.mjs";import{a as h}from"../../chunk-5HT2KC5I.mjs";import{a as j}from"../../chunk-FSCDCSVK.mjs";import{a as p}from"../../chunk-V4W2JDQB.mjs";import{a as o}from"../../chunk-TZCRIKIJ.mjs";import"../../chunk-N6CZEXLZ.mjs";import"../../chunk-M456UF2N.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import{a as b}from"../../chunk-JDMIQLAZ.mjs";import{a as d}from"../../chunk-6FHRZHAJ.mjs";import{a}from"../../chunk-KBEXWUKI.mjs";import{a as e}from"../../chunk-J4QINTHR.mjs";import"../../chunk-Y7H3EUBR.mjs";import"../../chunk-4WA47ZQA.mjs";import"../../chunk-NPVUICIF.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-O5P35LEY.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-55EX54R7.mjs";import"../../chunk-6C4WESLL.mjs";import"../../chunk-LAQ3QAUW.mjs";import"../../chunk-PDY7JYY3.mjs";import"../../chunk-L3BLBPSR.mjs";import"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-WU3JMLSC.mjs";import"../../chunk-BZAYEKYC.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as AppSidebarLeft,g as ColleagueCard,i as ColleagueForm,j as ColleagueTypeSelection,n as ColleaguesView,b as DashboardHeader,s as DashboardPage,k as DigitalColleagueClone,l as DigitalColleagueOptions,o as DocumentEdit,p as DocumentPreview,t as FileView,c as FoundaryLayout,q as KnowledgeBrowser,h as KnowledgeSearch,r as KnowledgeView,d as MainPage,e as ManagementSidebar,u as PlanningView,v as ProjectView,w as ProjectsIndexView,f as SearchableSelect,m as TeamForm,x as TeamsIndexView};
1
+ import{a as s}from"../../chunk-252ULRSC.mjs";import{a as n}from"../../chunk-ONGM3ZJY.mjs";import{a as r}from"../../chunk-TBLFTUKX.mjs";import"../../chunk-U2OXF7PJ.mjs";import{a as x}from"../../chunk-2UNIT7NC.mjs";import"../../chunk-I6XKBCH4.mjs";import"../../chunk-GAU24H4A.mjs";import{a as q}from"../../chunk-A2RRQOKB.mjs";import{a as m}from"../../chunk-CJ6APTVT.mjs";import"../../chunk-I4GYQZGM.mjs";import{a as j}from"../../chunk-FSCDCSVK.mjs";import{a as p}from"../../chunk-ZTEV75OU.mjs";import{a as o}from"../../chunk-TZCRIKIJ.mjs";import"../../chunk-N6CZEXLZ.mjs";import"../../chunk-M456UF2N.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import{a as k}from"../../chunk-NDZ26EG6.mjs";import{a as c}from"../../chunk-CRAFZGCI.mjs";import{a as l}from"../../chunk-M2REXGQW.mjs";import{a as b}from"../../chunk-JDMIQLAZ.mjs";import{a as d}from"../../chunk-6FHRZHAJ.mjs";import{a as e}from"../../chunk-J4QINTHR.mjs";import{a as g}from"../../chunk-HB57GPGK.mjs";import{a as i}from"../../chunk-KKW3FINI.mjs";import{a as h}from"../../chunk-5HT2KC5I.mjs";import{a}from"../../chunk-KBEXWUKI.mjs";import"../../chunk-R4SE63GR.mjs";import{a as w}from"../../chunk-HSQAHQNP.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-CDVRH3MC.mjs";import{a as v}from"../../chunk-5COSGSOW.mjs";import"../../chunk-QOZ2O3FG.mjs";import"../../chunk-6PS55VJZ.mjs";import"../../chunk-RQLUMNJE.mjs";import"../../chunk-UM57PWI7.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-KZCIHFTM.mjs";import{a as u}from"../../chunk-2R3MJSQ7.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-QC2UWZWL.mjs";import{a as t}from"../../chunk-NAGBKKTZ.mjs";import"../../chunk-JXQRVEQB.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-DXRAJQMA.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-VGWDYD6Z.mjs";import"../../chunk-Z22NSJMF.mjs";import{a as f}from"../../chunk-EZC3YWSQ.mjs";import"../../chunk-YRMNCHFO.mjs";import"../../chunk-EOR2BAI2.mjs";import"../../chunk-Y7H3EUBR.mjs";import"../../chunk-4WA47ZQA.mjs";import"../../chunk-NPVUICIF.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-O5P35LEY.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-55EX54R7.mjs";import"../../chunk-6C4WESLL.mjs";import"../../chunk-LAQ3QAUW.mjs";import"../../chunk-PDY7JYY3.mjs";import"../../chunk-L3BLBPSR.mjs";import"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-WU3JMLSC.mjs";import"../../chunk-BZAYEKYC.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as AppSidebarLeft,g as ColleagueCard,i as ColleagueForm,j as ColleagueTypeSelection,n as ColleaguesView,b as DashboardHeader,s as DashboardPage,k as DigitalColleagueClone,l as DigitalColleagueOptions,o as DocumentEdit,p as DocumentPreview,t as FileView,c as FoundaryLayout,q as KnowledgeBrowser,h as KnowledgeSearch,r as KnowledgeView,d as MainPage,e as ManagementSidebar,u as PlanningView,v as ProjectView,w as ProjectsIndexView,f as SearchableSelect,m as TeamForm,x as TeamsIndexView};
@@ -4,7 +4,7 @@ interface KnowledgeBrowserProps {
4
4
  menuConfig: KnowledgeMenuConfig;
5
5
  onDocumentClick?: (document: KnowledgeDocument) => void;
6
6
  onDocumentShare?: (document: KnowledgeDocument) => void;
7
- onDocumentUpdate?: (document: KnowledgeDocument) => void;
7
+ onDocumentUpdate?: (document: KnowledgeDocument) => Promise<boolean>;
8
8
  selectedDocumentId?: string;
9
9
  className?: string;
10
10
  editable?: boolean;
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use strict";"use client";var qo=Object.create;var Ue=Object.defineProperty;var Jo=Object.getOwnPropertyDescriptor;var Yo=Object.getOwnPropertyNames;var Qo=Object.getPrototypeOf,er=Object.prototype.hasOwnProperty;var tr=(e,t)=>{for(var o in t)Ue(e,o,{get:t[o],enumerable:!0})},Et=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Yo(t))!er.call(e,a)&&a!==o&&Ue(e,a,{get:()=>t[a],enumerable:!(r=Jo(t,a))||r.enumerable});return e};var W=(e,t,o)=>(o=e!=null?qo(Qo(e)):{},Et(t||!e||!e.__esModule?Ue(o,"default",{value:e,enumerable:!0}):o,e)),or=e=>Et(Ue({},"__esModule",{value:!0}),e);var ua={};tr(ua,{KnowledgeBrowser:()=>pa});module.exports=or(ua);var Ne=require("motion/react"),le=require("lucide-react"),ce=require("react");var Kt=W(require("react"));var Ut=require("clsx");var ot="-",rr=e=>{let t=nr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{let s=i.split(ot);return s[0]===""&&s.length!==1&&s.shift(),At(s,t)||ar(i)},getConflictingClassGroupIds:(i,s)=>{let u=o[i]||[];return s&&r[i]?[...u,...r[i]]:u}}},At=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?At(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(ot);return t.validators.find(({validator:i})=>i(n))?.classGroupId},Ht=/^\[(.+)\]$/,ar=e=>{if(Ht.test(e)){let t=Ht.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},nr=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return sr(Object.entries(e.classGroups),o).forEach(([n,i])=>{tt(i,r,n,t)}),r},tt=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:Lt(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(ir(a)){tt(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,i])=>{tt(i,Lt(t,n),o,r)})})},Lt=(e,t)=>{let o=e;return t.split(ot).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},ir=e=>e.isThemeGetter,sr=(e,t)=>t?e.map(([o,r])=>{let a=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,s])=>[t+i,s])):n);return[o,a]}):e,lr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(n,i)=>{o.set(n,i),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let i=o.get(n);if(i!==void 0)return i;if((i=r.get(n))!==void 0)return a(n,i),i},set(n,i){o.has(n)?o.set(n,i):a(n,i)}}},Ot="!",dr=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],n=t.length,i=s=>{let u=[],D=0,P=0,x;for(let f=0;f<s.length;f++){let h=s[f];if(D===0){if(h===a&&(r||s.slice(f,f+n)===t)){u.push(s.slice(P,f)),P=f+n;continue}if(h==="/"){x=f;continue}}h==="["?D++:h==="]"&&D--}let H=u.length===0?s:s.substring(P),g=H.startsWith(Ot),w=g?H.substring(1):H,L=x&&x>P?x-P:void 0;return{modifiers:u,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:L}};return o?s=>o({className:s,parseClassName:i}):i},cr=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},mr=e=>({cache:lr(e.cacheSize),parseClassName:dr(e),...rr(e)}),pr=/\s+/,ur=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],i=e.trim().split(pr),s="";for(let u=i.length-1;u>=0;u-=1){let D=i[u],{modifiers:P,hasImportantModifier:x,baseClassName:H,maybePostfixModifierPosition:g}=o(D),w=!!g,L=r(w?H.substring(0,g):H);if(!L){if(!w){s=D+(s.length>0?" "+s:s);continue}if(L=r(H),!L){s=D+(s.length>0?" "+s:s);continue}w=!1}let f=cr(P).join(":"),h=x?f+Ot:f,S=h+L;if(n.includes(S))continue;n.push(S);let M=a(L,w);for(let y=0;y<M.length;++y){let B=M[y];n.push(h+B)}s=D+(s.length>0?" "+s:s)}return s};function fr(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Vt(t))&&(r&&(r+=" "),r+=o);return r}var Vt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Vt(e[r]))&&(o&&(o+=" "),o+=t);return o};function gr(e,...t){let o,r,a,n=i;function i(u){let D=t.reduce((P,x)=>x(P),e());return o=mr(D),r=o.cache.get,a=o.cache.set,n=s,s(u)}function s(u){let D=r(u);if(D)return D;let P=ur(u,o);return a(u,P),P}return function(){return n(fr.apply(null,arguments))}}var O=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},zt=/^\[(?:([a-le-]+):)?(.+)\]$/i,hr=/^\$t+\/\$t+$/,br=new Set(["px","full","screen"]),vr=/^(\$t+(\.\$t+)?)?(xs|sm|md|lg|xl)$/,xr=/\$t+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yr=/^(inset_)?-?((\$t+)?\.?(\$t+)[a-le]+|0)_-?((\$t+)?\.?(\$t+)[a-le]+|0)/,Cr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=e=>Re(e)||br.has(e)||hr.test(e),be=e=>De(e,"length",Tr),Re=e=>!!e&&!Number.isNaN(Number(e)),et=e=>De(e,"number",Re),Te=e=>!!e&&Number.isInteger(Number(e)),Nr=e=>e.endsWith("%")&&Re(e.slice(0,-1)),N=e=>zt.test(e),ve=e=>vr.test(e),Rr=new Set(["length","size","percentage"]),Dr=e=>De(e,Rr,_t),Pr=e=>De(e,"position",_t),Sr=new Set(["image","url"]),Mr=e=>De(e,Sr,Er),kr=e=>De(e,"",Ir),Ie=()=>!0,De=(e,t,o)=>{let r=zt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Tr=e=>xr.test(e)&&!wr.test(e),_t=()=>!1,Ir=e=>yr.test(e),Er=e=>Cr.test(e);var Hr=()=>{let e=O("colors"),t=O("spacing"),o=O("blur"),r=O("brightness"),a=O("borderColor"),n=O("borderRadius"),i=O("borderSpacing"),s=O("borderWidth"),u=O("contrast"),D=O("grayscale"),P=O("hueRotate"),x=O("invert"),H=O("gap"),g=O("gradientColorStops"),w=O("gradientColorStopPositions"),L=O("inset"),f=O("margin"),h=O("opacity"),S=O("padding"),M=O("saturate"),y=O("scale"),B=O("sepia"),b=O("skew"),C=O("space"),k=O("translate"),J=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",N,t],E=()=>[N,t],me=()=>["",fe,be],de=()=>["auto",Re,N],p=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",N],It=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ue=()=>[Re,N];return{cacheSize:500,separator:":",theme:{colors:[Ie],spacing:[fe,be],blur:["none","",ve,N],brightness:ue(),borderColor:[e],borderRadius:["none","","full",ve,N],borderSpacing:E(),borderWidth:me(),contrast:ue(),grayscale:Q(),hueRotate:ue(),invert:Q(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[Nr,be],inset:Y(),margin:Y(),opacity:ue(),padding:E(),saturate:ue(),scale:ue(),sepia:Q(),skew:ue(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[ve]}],"break-after":[{"break-after":It()}],"break-before":[{"break-before":It()}],"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:[...p(),N]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-x":[{"inset-x":[L]}],"inset-y":[{"inset-y":[L]}],start:[{start:[L]}],end:[{end:[L]}],top:[{top:[L]}],right:[{right:[L]}],bottom:[{bottom:[L]}],left:[{left:[L]}],visibility:["visible","invisible","collapse"],le:[{le:["auto",Te,N]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Te,N]}],"grid-cols":[{"grid-cols":[Ie]}],"col-start-end":[{col:["auto",{span:["full",Te,N]},N]}],"col-start":[{"col-start":de()}],"col-end":[{"col-end":de()}],"grid-rows":[{"grid-rows":[Ie]}],"row-start-end":[{row:["auto",{span:[Te,N]},N]}],"row-start":[{"row-start":de()}],"row-end":[{"row-end":de()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[H]}],"gap-x":[{"gap-x":[H]}],"gap-y":[{"gap-y":[H]}],"justify-content":[{justify:["normal",...pe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...pe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...pe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],$t:[{$t:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],mt:[{mt:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[ve]},ve]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ve,be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",et]}],"font-family":[{font:[Ie]}],"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",N]}],"line-clamp":[{"line-clamp":["none",Re,et]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fe,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","le-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fe,be]}],"underline-offset":[{"underline-offset":["auto",fe,N]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],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",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...p(),Pr]}],"bg-repeat":[{bg:["le-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","$t","tl"]},Mr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-$t":[{"rounded-$t":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-$t":[{"rounded-$t":[n]}],"rounded-$t":[{"rounded-$t":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-$t":[{"border-$t":[s]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:_()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-$t":[{"border-$t":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[fe,N]}],"outline-w":[{outline:[fe,be]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[fe,be]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ve,kr]}],"shadow-color":[{shadow:[Ie]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ve,N]}],grayscale:[{grayscale:[D]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[x]}],saturate:[{saturate:[M]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[D]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:ue()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:ue()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Te,N]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],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","le-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","$t-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-$t":[{"scroll-$t":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fe,be,et]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],$t:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-$t","rounded-ss","rounded-$t","rounded-$t","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-$t","rounded-$t"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-$t":["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-$t"],"border-w-x":["border-w-r","border-w-$t"],"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-$t"],"border-color-x":["border-color-r","border-color-$t"],"border-color-y":["border-color-t","border-color-b"],"scroll-$t":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Bt=gr(Hr);function v(...e){return Bt((0,Ut.clsx)(e))}var $t=require("react/jsx-runtime"),ne=Kt.forwardRef(({className:e,type:t,...o},r)=>(0,$t.jsx)("input",{type:t,className:v("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:r,...o}));ne.displayName="Input";var rt=W(require("react")),re=W(require("@radix-ui/react-scroll-area"));var at=rt.forwardRef(({className:e,children:t,...o},r)=>(0,$t.jsxs)(re.Root,{ref:r,className:v("relative overflow-hidden",e),...o,children:[(0,$t.jsx)(re.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,$t.jsx)(Ft,{}),(0,$t.jsx)(re.Corner,{})]}));at.displayName=re.Root.displayName;var Ft=rt.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,$t.jsx)(re.ScrollAreaScrollbar,{ref:r,orientation:t,className:v("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-$t border-$t-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,$t.jsx)(re.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ft.displayName=re.ScrollAreaScrollbar.displayName;var Wt=require("@radix-ui/react-slot"),jt=require("class-variance-authority"),Gt=W(require("react")),Lr=(0,jt.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"}}}),ae=Gt.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...a},n)=>(0,$t.jsx)(e?Wt.Slot:"button",{className:v(Lr({className:t,size:o,variant:r})),ref:n,...a}));ae.displayName="Button";var Ee=W(require("react")),j=W(require("@radix-ui/react-dialog"));var Ke=j.Root;var nt=j.Portal;var $e=Ee.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(j.Overlay,{ref:o,className:v("fixed inset-0 le-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}));$e.displayName=j.Overlay.displayName;var it=Ee.forwardRef(({className:e,children:t,...o},r)=>(0,$t.jsxs)(nt,{children:[(0,$t.jsx)($e,{}),(0,$t.jsxs)(j.Content,{ref:r,className:v("fixed left-[50%] top-[50%] le-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-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,$t.jsxs)(j.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,$t.jsx)(le.$t,{className:"h-4 w-4"}),(0,$t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));it.displayName=j.Content.displayName;var st=({className:e,...t})=>(0,$t.jsx)("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});st.displayName="DialogHeader";var Ar=({className:e,...t})=>(0,$t.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ar.displayName="DialogFooter";var lt=Ee.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(j.Title,{ref:o,className:v("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName=j.Title.displayName;var Or=Ee.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(j.Description,{ref:o,className:v("text-sm text-muted-foreground",e),...t}));Or.displayName=j.Description.displayName;var Wo=W(require("@radix-ui/react-dialog"));var qt=W(require("react")),He=qt.forwardRef(({className:e,...t},o)=>(0,$t.jsx)("textarea",{className:v("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:o,...t}));He.displayName="Textarea";var T=W(require("@radix-ui/react-select")),we=W(require("react")),Yt=T.Root;var Qt=T.Value,dt=we.forwardRef(({children:e,className:t,...o},r)=>(0,$t.jsxs)(T.Trigger,{className:v("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:r,...o,children:[e,(0,$t.jsx)(T.Icon,{asChild:!0,children:(0,$t.jsx)(le.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));dt.displayName=T.Trigger.displayName;var eo=we.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(T.ScrollUpButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$t.jsx)(le.ChevronUp,{className:"h-4 w-4"})}));eo.displayName=T.ScrollUpButton.displayName;var to=we.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(T.ScrollDownButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$t.jsx)(le.ChevronDown,{className:"h-4 w-4"})}));to.displayName=T.ScrollDownButton.displayName;var ct=we.forwardRef(({children:e,className:t,position:o="popper",...r},a)=>(0,$t.jsx)(T.Portal,{children:(0,$t.jsxs)(T.Content,{className:v("relative le-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",o==="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:o,ref:a,...r,children:[(0,$t.jsx)(eo,{}),(0,$t.jsx)(T.Viewport,{className:v("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,$t.jsx)(to,{})]})}));ct.displayName=T.Content.displayName;var Vr=we.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(T.Label,{className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Vr.displayName=T.Label.displayName;var Fe=we.forwardRef(({children:e,className:t,...o},r)=>(0,$t.jsxs)(T.Item,{className:v("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(T.ItemIndicator,{children:(0,$t.jsx)(le.Check,{className:"h-4 w-4"})})}),(0,$t.jsx)(T.ItemText,{children:e})]}));Fe.displayName=T.Item.displayName;var zr=we.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(T.Separator,{className:v("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));zr.displayName=T.Separator.displayName;var oo=W(require("react")),mt=W(require("@radix-ui/react-label"));var _r=(0,jt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pt=oo.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(mt.Root,{ref:o,className:v(_r(),e),...t}));pt.displayName=mt.Root.displayName;var ft=({fieldName:e,value:t,label:o,multiline:r=!1,onSave:a,className:n="",disabled:i=!1})=>{let[s,u]=(0,ce.useState)(!1),[D,P]=(0,ce.useState)(""),x=()=>{i||(u(!0),P(t))},H=async()=>{D!==t&&await a(e,D),u(!1)},g=w=>{w.key==="Enter"&&!r||w.key==="Enter"&&w.ctrlKey&&r?H():w.key==="Escape"&&(u(!1),P(""))};return(0,$t.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,$t.jsx)(pt,{children:o}),s?r?(0,$t.jsx)(He,{value:D,onChange:w=>P(w.target.value),onBlur:H,onKeyDown:g,autoFocus:!0,rows:4,className:"resize-none"}):(0,$t.jsx)(ne,{value:D,onChange:w=>P(w.target.value),onBlur:H,onKeyPress:g,autoFocus:!0,className:"text-lg font-medium"}):(0,$t.jsxs)("div",{onClick:x,className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,$t.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!i&&(0,$t.jsx)(le.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Ho=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Lo=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Ao=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Oo=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Vo=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),zo=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),_o=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Ye=require("@payloadcms/richtext-lexical/lexical/list"),Bo=require("@payloadcms/richtext-lexical/lexical/rich-text"),Uo=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Io=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Be=require("@payloadcms/richtext-lexical/lexical/utils"),R=require("@payloadcms/richtext-lexical/lexical"),Dt=require("@payloadcms/richtext-lexical/lexical/selection");var bo=require("@radix-ui/react-dialog"),Ze=require("@payloadcms/richtext-lexical/client");var ht=W(require("bson-objectid"));var so=require("@payloadcms/ui");var io=W(require("react")),ie=W(require("@radix-ui/react-tooltip"));var We=ie.Provider,je=ie.Root,Ge=ie.Trigger,Le=io.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$t.jsx)(ie.Portal,{children:(0,$t.jsx)(ie.Content,{ref:r,sideOffset:t,className:v("le-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),...o})}));Le.displayName=ie.Content.displayName;var Br=e=>{let{data:{relationTo:t,value:o},nodeKey:r}=e,[a]=(0,Io.useLexicalComposerContext)(),[n,i]=(0,ce.useState)(""),[s,u]=(0,ce.useState)(""),[D,P]=(0,ce.useState)(""),x=async f=>{console.log("fetchMedia",f)};(0,ce.useEffect)(()=>{typeof o=="string"?o.length===24?x(o):(i(o||""),P(L(w())),u(g()||"")):typeof o=="object"&&(i(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),P(L(o.filesize)),u(o.mimeType?.split("/")[1]||""))},[]);let H=(0,ce.useCallback)(()=>{a.update(()=>{(0,R.$getNodeByKey)(r)?.remove()})},[a,r]),g=()=>{let f=e.data.value;return typeof f=="string"?f.split(";base64")[0]?.split("image/")[1]:""},w=()=>{let f=e.data.value;if(typeof f=="string"){let h=f.split(",")[1]?.length||0;return 4*Math.ceil(h/3)*.5624896334383812/1e3}return 0};function L(f){if(f>=1e6){let S=f/1e6;return`${S>=10?Math.round(S).toString():S.toFixed(1)} MB`}return`${Math.floor(f/1e3)} KB`}return(0,$t.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,$t.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,$t.jsxs)("div",{className:"flex gap-2 border-b border-b-slate-100/10",children:[(0,$t.jsx)("div",{className:"flex-1",children:e.data.value?(0,$t.jsx)("img",{className:"object-cover $t-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-to":t,src:n}):(0,$t.jsx)(so.File,{})}),(0,$t.jsx)(We,{children:(0,$t.jsxs)(je,{children:[(0,$t.jsxs)(Ge,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,$t.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,$t.jsx)("button",{onClick:f=>{f.preventDefault(),H()},className:"flex-1 flex justify-center items-center",children:(0,$t.jsx)(le.$t,{width:24,height:24,strokeWidth:1})})]}),(0,$t.jsx)(Le,{children:(0,$t.jsx)("span",{children:"Remove image"})})]})})]}),(0,$t.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,$t.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,$t.jsx)("span",{children:D})]})]})})},po=Br;function Ur(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:Pe({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var Ae=class extends Ze.UploadNode{static importDOM(){return{img:()=>({conversion:Ur,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new ht.default().toHexString(),t.version=3);let o={id:t.id??new ht.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},r=Pe(o);return r.setFormat?.(t.format),r}decorate(){return(0,$t.jsx)(po,{data:this.__data,nodeKey:this.getKey()})}};function Pe(e){return new Ae({data:e})}var Kr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$r=e=>Kr?(e||window).getSelection():null,rn=(0,R.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),bt=(0,R.createCommand)("INSERT_UPLOAD_COMMAND");function vo({activeEditor:e,onClose:t,isOpen:o=!1}){let r=(0,ce.useRef)(!1),[a,n]=(0,ce.useState)(!0),[i,s]=(0,ce.useState)(""),[u,D]=(0,ce.useState)(""),[P,x]=(0,ce.useState)(!1),[H,g]=(0,ce.useState)("left"),w=i==="",L=y=>{x(y.target.checked)},f=y=>{g(y.target.value)},h=y=>{let B=new FileReader;B.onload=function(){return typeof B.result=="string"&&s(B.result),""},y!==null&&y[0]&&B.readAsDataURL(y[0])};(0,ce.useEffect)(()=>{r.current=!1;let y=B=>{r.current=B.altKey};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[e]),(0,ce.useEffect)(()=>{a||t()},[a]),(0,ce.useEffect)(()=>{n(o)},[o]);let S=({editor:y,relationTo:B,replaceNodeKey:b,value:C})=>{if(b)y.update(()=>{let k=(0,R.$getNodeByKey)(b);k&&k.replace(Pe({id:"",fields:{},relationTo:"media",value:C}))});else{let k=y.dispatchCommand(bt,{fields:null,relationTo:"media",value:C})}},M=()=>{S({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:u,src:i,showCaption:P,position:H}.src}),n(!1),t()};return(0,$t.jsx)(Ke,{open:a,onOpenChange:y=>n(y),children:(0,$t.jsxs)(it,{children:[(0,$t.jsxs)(st,{children:[(0,$t.jsx)(lt,{children:"Upload Image"}),(0,$t.jsx)(bo.DialogDescription,{children:"Description"})]}),(0,$t.jsxs)("div",{className:"",children:[(0,$t.jsx)("div",{style:{marginBottom:"1em"},children:(0,$t.jsx)(ne,{type:"file",onChange:y=>h(y.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,$t.jsx)("div",{style:{marginBottom:"1em"},children:(0,$t.jsx)(ne,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:y=>D(y.currentTarget.value),value:u,"data-test-id":"image-modal-alt-text-input"})}),(0,$t.jsx)(ae,{"data-test-id":"image-modal-file-upload-btn",disabled:w,onClick:()=>M(),children:"Confirm"})]})]})})}function vt({captionsEnabled:e}){let[t]=(0,Io.useLexicalComposerContext)();return(0,ce.useEffect)(()=>{if(!t.hasNodes([Ze.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,Be.mergeRegister)(t.registerCommand(R.DRAGSTART_COMMAND,o=>Fr(o),R.COMMAND_PRIORITY_HIGH),t.registerCommand(R.DRAGOVER_COMMAND,o=>Wr(o),R.COMMAND_PRIORITY_LOW),t.registerCommand(R.DROP_COMMAND,o=>jr(o,t),R.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Fr(e){if(!xt())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","_"),!0):!1}function Wr(e){return xt()?(xo(e)||e.preventDefault(),!0):!1}function jr(e,t){let o=xt();if(!o)return!1;if(e.preventDefault(),xo(e)){let r=Gr(e);o.remove();let a=(0,R.$createRangeSelection)();r!=null&&a.applyDOMRange(r),(0,R.$setSelection)(a)}return!0}function xt(){let e=(0,R.$getSelection)();if(!(0,R.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,Ze.$isUploadNode)(o)?o:null}function xo(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}function Gr(e){let t,o=e.target,r=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,a=$r(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&a!==null)a.collapse(e.rangeParent,e.rangeOffset||0),t=a.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Zr=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),wo=Zr;var Xr=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),yo=Xr;var qr=()=>(0,$t.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,$t.jsx)("path",{$t:"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,$t.jsx)("path",{$t:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Co=qr;var Jr=()=>(0,$t.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,$t.jsx)("path",{$t:"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,$t.jsx)("path",{$t:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),No=Jr;var Yr=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),Ro=Yr;var Qr=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),Do=Qr;var Po=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),So=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),Mo=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),ko=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),To=()=>(0,$t.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,$t.jsx)("path",{$t:"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 he=W(require("react")),I=W(require("@radix-ui/react-dropdown-menu")),Se=require("@radix-ui/react-icons");var Xe=I.Root,qe=I.Trigger;var ea=he.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,$t.jsxs)(I.SubTrigger,{ref:a,className:v("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),...r,children:[o,(0,$t.jsx)(Se.ChevronRightIcon,{className:"ml-auto"})]}));ea.displayName=I.SubTrigger.displayName;var ta=he.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(I.SubContent,{ref:o,className:v("le-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}));ta.displayName=I.SubContent.displayName;var ze=he.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$t.jsx)(I.Portal,{children:(0,$t.jsx)(I.Content,{ref:r,sideOffset:t,className:v("le-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),...o})}));ze.displayName=I.Content.displayName;var _e=he.forwardRef(({className:e,inset:t,...o},r)=>(0,$t.jsx)(I.Item,{ref:r,className:v("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),...o}));_e.displayName=I.Item.displayName;var oa=he.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,$t.jsxs)(I.CheckboxItem,{ref:a,className:v("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-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:o,...r,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(I.ItemIndicator,{children:(0,$t.jsx)(Se.CheckIcon,{className:"h-4 w-4"})})}),t]}));oa.displayName=I.CheckboxItem.displayName;var ra=he.forwardRef(({className:e,children:t,...o},r)=>(0,$t.jsxs)(I.RadioItem,{ref:r,className:v("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(I.ItemIndicator,{children:(0,$t.jsx)(Se.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ra.displayName=I.RadioItem.displayName;var aa=he.forwardRef(({className:e,inset:t,...o},r)=>(0,$t.jsx)(I.Label,{ref:r,className:v("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));aa.displayName=I.Label.displayName;var na=he.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(I.Separator,{ref:o,className:v("-mx-1 my-1 h-px bg-muted",e),...t}));na.displayName=I.Separator.displayName;var ia=({className:e,...t})=>(0,$t.jsx)("span",{className:v("ml-auto text-xs tracking-widest opacity-60",e),...t});ia.displayName="DropdownMenuShortcut";var Rt=1;function sa(){return(0,$t.jsx)("span",{className:"border border-[#222222]"})}function Pt(){let[e]=(0,Io.useLexicalComposerContext)(),t=(0,$.useRef)(null),[o,r]=(0,$.useState)(!1),[a,n]=(0,$.useState)(!1),[i,s]=(0,$.useState)(!1),[u,D]=(0,$.useState)(!1),[P,x]=(0,$.useState)(!1),[H,g]=(0,$.useState)(!1),[w,L]=(0,$.useState)(!1),[f,h]=(0,$.useState)(!1),[S,M]=(0,$.useState)(!1),[y,B]=(0,$.useState)("left"),[b,C]=(0,$.useState)("p"),k=p=>{e.update(()=>{let _=(0,R.$getSelection)();(0,R.$isRangeSelection)(_)&&(p==="p"?(0,Dt.$setBlocksType)(_,()=>(0,R.$createParagraphNode)()):(0,Dt.$setBlocksType)(_,()=>(0,Bo.$createHeadingNode)(p)))})},J=(0,$.useCallback)(()=>{let p=(0,R.$getSelection)();if((0,R.$isRangeSelection)(p)){s(p.hasFormat("bold")),D(p.hasFormat("italic")),x(p.hasFormat("underline")),g(p.hasFormat("strikethrough")),L(p.hasFormat("subscript")),h(p.hasFormat("superscript"));let _=p.anchor.getNode(),F=_;for(;F&&!(0,R.$isParagraphNode)(F)&&F!==(0,R.$getRoot)();){let Q=F.getParent();Q&&(F=Q)}if(F){let Q=F.getFormatType();B(Q||"left")}let pe=_.getTopLevelElement()?.__tag;C(pe||"p")}},[]);(0,$.useEffect)(()=>(0,Be.mergeRegister)(e.registerUpdateListener(({editorState:p})=>{p.read(()=>{J()})}),e.registerCommand(R.SELECTION_CHANGE_COMMAND,(p,_)=>(J(),!1),Rt),e.registerCommand(R.CAN_UNDO_COMMAND,p=>(r(p),!1),Rt),e.registerCommand(R.CAN_REDO_COMMAND,p=>(n(p),!1),Rt),(0,Be.mergeRegister)(e.registerCommand(bt,p=>(e.update(()=>{let _=(0,R.$getSelection)()||(0,R.$getPreviousSelection)();if((0,R.$isRangeSelection)(_)){let F=Pe({id:p.id,fields:p.fields,relationTo:p.relationTo,value:p.value}),{focus:pe}=_,Q=pe.getNode();(0,Be.$insertNodeToNearestRoot)(F),(0,R.$isParagraphNode)(Q)&&!Q.__first&&Q.remove()}}),!0),R.COMMAND_PRIORITY_EDITOR))),[e,J]);let A=[[{label:"Undo",icon:(0,$t.jsx)(le.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(R.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,$t.jsx)(le.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(R.UNDO_COMMAND,void 0)},disabled:!a}],[{label:"Bold",icon:(0,$t.jsx)(wo,{}),onClick:()=>{e.dispatchCommand(R.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:i},{label:"Italic",icon:(0,$t.jsx)(yo,{}),onClick:()=>{e.dispatchCommand(R.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:u},{label:"Underline",icon:(0,$t.jsx)(Co,{}),onClick:()=>{e.dispatchCommand(R.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:P},{label:"Strikethrough",icon:(0,$t.jsx)(No,{}),onClick:()=>{e.dispatchCommand(R.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:H},{label:"Subscript",icon:(0,$t.jsx)(Ro,{}),onClick:()=>{e.dispatchCommand(R.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:w},{label:"Superscript",icon:(0,$t.jsx)(Do,{}),onClick:()=>{e.dispatchCommand(R.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:f}]],Y=[{label:"Left Align",direction:"left",icon:(0,$t.jsx)(le.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(R.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,$t.jsx)(le.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(R.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,$t.jsx)(le.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(R.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,$t.jsx)(le.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(R.FORMAT_ELEMENT_COMMAND,"justify")}}],me=[{label:"Normal Text",value:"p",icon:(0,$t.jsx)(Po,{}),onClick:()=>k("p")},{label:"Heading 1",value:"h1",icon:(0,$t.jsx)(So,{}),onClick:()=>k("h1")},{label:"Heading 2",value:"h2",icon:(0,$t.jsx)(Mo,{}),onClick:()=>k("h2")},{label:"Heading 3",value:"h3",icon:(0,$t.jsx)(ko,{}),onClick:()=>k("h3")},{label:"Heading 4",value:"h4",icon:(0,$t.jsx)(To,{}),onClick:()=>k("h4")},...[{label:"Unordered List",value:"ul",icon:(0,$t.jsx)(le.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ye.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,$t.jsx)(le.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ye.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],de=[{label:"Insert Image",icon:(0,$t.jsx)(le.ImageUp,{width:15,height:15}),onClick:()=>{M(!0)},disabled:!1}];return(0,$t.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,$t.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[A.map((p,_)=>(0,$t.jsxs)($.Fragment,{children:[(0,$t.jsx)("div",{className:"flex items-center gap-2",children:p.map((F,pe)=>(0,$t.jsx)("div",{role:"button","aria-disabled":F.disabled||!1,onClick:F.onClick,className:v("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]",F.active&&"bg-[#3c3c3c]"),"aria-label":F.label,children:(0,$t.jsx)(We,{children:(0,$t.jsxs)(je,{children:[(0,$t.jsx)(Ge,{className:"text-[#b5b5b5]",children:F.icon}),(0,$t.jsx)(Le,{children:(0,$t.jsx)("p",{children:F.label})})]})})},pe))}),(0,$t.jsx)(sa,{})]},`toolbar-option-${p.length}-${_}`)),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(qe,{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(p=>p.direction===y)?.icon,Y.find(p=>p.direction===y)?.label,(0,$t.jsx)(le.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:Y.map((p,_)=>(0,$t.jsxs)(_e,{onClick:p.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,$t.jsx)("span",{children:p.icon}),(0,$t.jsx)("span",{children:p.label})]},`${p.label}-${_}`))})]}),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(qe,{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:[me.find(p=>p.value===b)?.icon,me.find(p=>p.value===b)?.label,(0,$t.jsx)(le.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:me.map((p,_)=>(0,$t.jsxs)(_e,{onClick:p.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,$t.jsx)("span",{children:p.icon}),(0,$t.jsx)("span",{children:p.label})]},`heading-option-${p.label}-${_}`))})]}),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(qe,{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:[(0,$t.jsx)(le.Plus,{width:15,height:15}),(0,$t.jsx)(le.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:de.map((p,_)=>(0,$t.jsxs)(_e,{onClick:p.onClick,disabled:p.disabled,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,$t.jsx)("span",{children:p.icon}),(0,$t.jsx)("span",{children:p.label})]},_))})]}),S&&(0,$t.jsx)(vo,{activeEditor:e,onClose:()=>{M(!1)},isOpen:S})]})})}var la=({setValue:e,value:t,name:o,editable:r=!0})=>{let[a]=(0,Io.useLexicalComposerContext)(),n=i=>{i.read(()=>{let s=i.toJSON();e?.(()=>s)})};return(0,ce.useEffect)(()=>{a.setEditable(r)},[r]),(0,ce.useEffect)(()=>{t&&a.update(()=>{a.setEditorState(a.parseEditorState(t))})},[]),(0,$t.jsx)("div",{className:"w-full",children:(0,$t.jsxs)("div",{className:" ",children:[r&&(0,$t.jsx)(Pt,{}),(0,$t.jsxs)("div",{className:"px-4 my-4 border-$t border-[#222222]",children:[(0,$t.jsx)(zo.RichTextPlugin,{contentEditable:(0,$t.jsx)(Ao.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Oo.LexicalErrorBoundary}),r&&(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(Vo.HistoryPlugin,{}),(0,$t.jsx)(Ho.AutoFocusPlugin,{}),(0,$t.jsx)(_o.ListPlugin,{}),(0,$t.jsx)(Uo.OnChangePlugin,{onChange:n}),(0,$t.jsx)(vt,{})]})]})]})})},da=({setValue:e,value:t,name:o,editable:r=!0})=>(0,$t.jsx)(Lo.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Ye.ListNode,Ye.ListItemNode,Bo.HeadingNode,Ae],onError(n){throw console.error("Lexical error:",n),n},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,$t.jsx)(la,{value:t,setValue:e,name:o,editable:r})}),Qe=da;function $o({document:e,onSave:t,mode:o="edit",onCancel:r,availableDocuments:a=[],knowledgeContexts:n=[]}){let[i,s]=(0,ce.useState)({...e,updatedAt:new Date}),[u,D]=(0,ce.useState)(!1),[P,x]=(0,ce.useState)(i.richTextContent);(0,ce.useEffect)(()=>{s(e)},[e]);let H=b=>{switch(b){case"markdown":case"mdx":return(0,$t.jsx)(le.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,$t.jsx)(le.File,{className:"h-6 w-6 text-success"});case"text":return(0,$t.jsx)(le.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,$t.jsx)(le.File,{className:"h-6 w-6 text-muted-foreground"})}},g=b=>{switch(b){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"}},w=()=>{let b=new Set,C=new Set;return n.forEach(k=>{k.menuConfig.groupBy.forEach(J=>b.add(J))}),a.forEach(k=>{k.metadata&&Object.keys(k.metadata).forEach(J=>C.add(J))}),{contextKeys:Array.from(b).sort(),documentKeys:Array.from(C).sort(),allKeys:Array.from(new Set([...b,...C])).sort()}},L=b=>{let C=new Set;return a.forEach(k=>{k.metadata?.[b]&&C.add(String(k.metadata[b]))}),Array.from(C).sort()},f=w(),h=()=>{t({...i,richTextContent:P})},S=(b,C)=>{s(k=>({...k,metadata:{...k.metadata,[b]:C}}))},M=(b,C)=>{C==="__custom__"?S(b,""):S(b,C)},y=()=>{S("","")},B=b=>{s(C=>{let k={...C.metadata};return delete k[b],{...C,metadata:k}})};return(0,$t.jsxs)(Ne.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,$t.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,$t.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,$t.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,$t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$t.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,$t.jsx)("div",{className:"flex-1 min-w-0",children:(0,$t.jsx)(ft,{fieldName:"title",value:i.title,label:"",onSave:(b,C)=>s(k=>({...k,title:C})),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,$t.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${g(i.format)} flex-shrink-0 mt-1`,children:i.format.toUpperCase()})]}),(0,$t.jsx)("div",{className:"mt-2",children:(0,$t.jsx)(ft,{fieldName:"description",value:i.description||"Click to add description...",label:"",multiline:!0,onSave:(b,C)=>s(k=>({...k,description:C})),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,$t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,$t.jsxs)(ae,{variant:"ghost",size:"sm",onClick:()=>D(!u),className:"gap-2",children:[(0,$t.jsx)(le.Info,{className:"h-4 w-4"}),"Metadata",i.metadata&&Object.keys(i.metadata).length>0&&(0,$t.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(i.metadata).length}),u?(0,$t.jsx)(le.ChevronDown,{className:"h-4 w-4"}):(0,$t.jsx)(le.ChevronRight,{className:"h-4 w-4"})]}),(0,$t.jsxs)(ae,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,$t.jsx)(le.$t,{className:"h-4 w-4"}),"Cancel"]}),(0,$t.jsxs)(ae,{size:"sm",onClick:h,className:"gap-2",children:[(0,$t.jsx)(le.Save,{className:"h-4 w-4"}),"Save"]})]})]}),(0,$t.jsx)(Ne.motion.div,{initial:!1,animate:{height:u?"auto":0,opacity:u?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:(0,$t.jsxs)("div",{className:"pt-4 border-t border-border mt-4 h-screen max-h-full flex",children:[(0,$t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,$t.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,$t.jsx)(le.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,$t.jsxs)(ae,{type:"button",variant:"outline",size:"sm",onClick:y,className:"gap-1 h-8",children:[(0,$t.jsx)(le.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),(0,$t.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:i.metadata&&Object.keys(i.metadata).length>0?(0,$t.jsx)("div",{className:"space-y-2",children:Object.entries(i.metadata).map(([b,C],k)=>{let J=L(b);return(0,$t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,$t.jsx)(ne,{value:b,onChange:A=>{let Y=A.target.value||"",E=i.metadata?.[b];s(me=>{let de={...me.metadata};return delete de[b],Y&&(de[Y]=E||""),{...me,metadata:de}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${b}`}),(0,$t.jsx)("datalist",{id:`metadata-keys-${b}`,children:f.allKeys.map(A=>(0,$t.jsx)("option",{value:A},A))}),(0,$t.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),J.length>0?(0,$t.jsxs)(Yt,{value:String(C||""),onValueChange:A=>M(b,A),children:[(0,$t.jsx)(dt,{className:"flex-1 h-8 text-sm",children:(0,$t.jsx)(Qt,{placeholder:"Value"})}),(0,$t.jsxs)(ct,{children:[J.map(A=>(0,$t.jsx)(Fe,{value:A,children:A},A)),(0,$t.jsx)(Fe,{value:"__custom__",children:(0,$t.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,$t.jsx)(ne,{value:String(C||""),onChange:A=>S(b,A.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,$t.jsx)(ae,{type:"button",variant:"ghost",size:"sm",onClick:()=>B(b),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,$t.jsx)(le.$t,{className:"h-3 w-3"})})]},`metadata-key-${k}`)})}):(0,$t.jsxs)("div",{className:"text-center py-4",children:[(0,$t.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),(0,$t.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),(0,$t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,$t.jsx)("div",{className:"p-8 h-full max-h-full overflow-auto",children:i.format==="richText"?(0,$t.jsx)(Qe,{setValue:x,value:P,name:"richTextContent"}):(0,$t.jsx)(He,{value:i.content||"",onChange:b=>s(C=>({...C,content:b.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}var jo=W(require("react-markdown")),Go=W(require("remark-gfm"));var Zo=e=>(0,$t.jsx)(jo.default,{remarkPlugins:[Go.default],components:{h1:({children:t})=>(0,$t.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,$t.jsx)("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>(0,$t.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,$t.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,$t.jsx)("ol",{className:"list-decimal",children:t}),ul:({children:t})=>(0,$t.jsx)("ul",{className:"list-disc",children:t}),li:({children:t})=>(0,$t.jsx)("li",{className:"ml-4",children:t}),p:({children:t})=>(0,$t.jsx)("p",{className:"mb-4",children:t}),a:({children:t,href:o})=>(0,$t.jsx)("a",{href:o,className:"text-blue-500",children:t}),img:({src:t,alt:o})=>(0,$t.jsx)("img",{src:t,alt:o,className:"mb-4"}),blockquote:({children:t})=>(0,$t.jsx)("blockquote",{className:"border-$t-4 border-gray-300 pl-4 mb-4",children:t})},children:e}),Fo=e=>(0,$t.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),ca=e=>(0,$t.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e&&(0,$t.jsx)(Qe,{value:JSON.stringify(e),editable:!1,name:"richTextContent"})}),ma=e=>(0,$t.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,$t.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,$t.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,$t.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Zo(e)]});function Xo({document:e,onDocumentUpdate:t,editable:o=!0,mode:r="view",renderers:a,availableDocuments:n=[],knowledgeContexts:i=[]}){let[s,u]=(0,ce.useState)(!1),[D,P]=(0,ce.useState)(!1),[x,H]=(0,ce.useState)(e);(0,ce.useEffect)(()=>{H(e)},[e]);let g=M=>{switch(M){case"markdown":case"mdx":return(0,$t.jsx)(le.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,$t.jsx)(le.File,{className:"h-6 w-6 text-success"});case"text":return(0,$t.jsx)(le.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,$t.jsx)(le.File,{className:"h-6 w-6 text-muted-foreground"})}},w=M=>{switch(M){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"}},L=(M,y)=>{let B={markdown:Zo,mdx:ma,text:Fo},b=a?.[y]||B[y];if(y==="richText"&&typeof M=="object")return ca(M);if(b&&typeof M=="string")return b(M);if(typeof M=="string")return Fo(M)},f=M=>{u(!1),t?.(M),H(M)},h=()=>{u(!1)};return(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(Ke,{open:s||r==="create",onOpenChange:M=>!M&&h(),children:(0,$t.jsxs)(nt,{children:[(0,$t.jsx)($e,{}),(0,$t.jsx)(Wo.Content,{className:v("fixed inset-0 le-50 bg-background p-0 $t-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,$t.jsx)($o,{mode:r==="create"?"create":"edit",document:x,onSave:f,onCancel:h,availableDocuments:n,knowledgeContexts:i})})]})}),(0,$t.jsxs)(Ne.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,$t.jsxs)("div",{className:"border-b border-border bg-card p-8 pb-6",children:[(0,$t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,$t.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,$t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$t.jsxs)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[x.title,(0,$t.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${w(x.format)}`,children:x.format.toUpperCase()})]}),x.description&&(0,$t.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:x.description})]})}),(0,$t.jsxs)("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[x.metadata&&Object.keys(x.metadata).length>0&&(0,$t.jsxs)(ae,{variant:"ghost",size:"sm",onClick:()=>P(!D),className:"gap-2",children:[(0,$t.jsx)(le.Info,{className:"h-4 w-4"}),"Metadata",D?(0,$t.jsx)(le.ChevronDown,{className:"h-4 w-4"}):(0,$t.jsx)(le.ChevronRight,{className:"h-4 w-4"})]}),o&&(0,$t.jsxs)(ae,{variant:"outline",size:"sm",onClick:()=>u(!0),className:"gap-2",children:[(0,$t.jsx)(le.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),x.metadata&&Object.keys(x.metadata).length>0&&(0,$t.jsx)(Ne.motion.div,{initial:!1,animate:{height:D?"auto":0,opacity:D?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,$t.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,$t.jsxs)("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[(0,$t.jsx)(le.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,$t.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,$t.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(x.metadata).map(([M,y])=>(0,$t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,$t.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:M.replace(/([A-$t])/g," $1").trim()}),(0,$t.jsx)("span",{className:"text-foreground font-medium",children:String(y)})]},M))})})]})})]}),(0,$t.jsx)("div",{className:"flex-1 ",children:(0,$t.jsx)("div",{className:"py-4 h-full",children:(0,$t.jsx)("div",{className:"space-y-4",children:x.content||x.richTextContent?(0,$t.jsx)("div",{className:"relative",children:(0,$t.jsx)("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:L(x.format==="richText"?x.richTextContent:x.content,x.format)})}):(0,$t.jsxs)("div",{className:"text-center p-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,$t.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,$t.jsx)(le.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,$t.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,$t.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}function Tt({label:e,documents:t,children:o,level:r,onDocumentClick:a,selectedDocumentId:n,showDocumentCount:i=!0}){let[s,u]=(0,ce.useState)(r===0),D=o&&Object.keys(o).length>0,P=t.length+(o?Object.values(o).reduce((g,w)=>g+w.documents.length,0):0),x=g=>{switch(g){case"markdown":case"mdx":return(0,$t.jsx)(le.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return(0,$t.jsx)(le.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,$t.jsx)(le.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},H=g=>{let w=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return w[g%w.length]};return(0,$t.jsxs)("div",{className:"space-y-1",children:[(D||t.length>0)&&(0,$t.jsxs)(Ne.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${r*20}px`},onClick:()=>u(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,$t.jsx)("div",{className:`w-1 h-6 rounded-full ${H(r)}`}),(0,$t.jsx)(Ne.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,$t.jsx)(le.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,$t.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,$t.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,$t.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),i&&P>0&&(0,$t.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,$t.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:P})})]})]}),(0,$t.jsx)(Ne.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,$t.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((g,w)=>(0,$t.jsxs)(Ne.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:w*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${n===g.id?"bg-primary/10 border-$t-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${r*20+20}px`},onClick:()=>a?.(g),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,$t.jsx)("div",{className:"flex-shrink-0",children:x(g.format)}),(0,$t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$t.jsx)("p",{className:`text-sm truncate transition-colors ${n===g.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:g.title}),g.description&&(0,$t.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:g.description})]}),g.tags&&g.tags.length>0&&(0,$t.jsx)("div",{className:"flex-shrink-0",children:(0,$t.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:g.tags[0]})})]},g.id)),o&&Object.entries(o).map(([g,w])=>(0,$t.jsx)(Tt,{label:g,documents:w.documents,children:w.children,level:r+1,onDocumentClick:a,selectedDocumentId:n,showDocumentCount:i},g))]})})]})}function pa({documents:e,menuConfig:t,onDocumentClick:o,onDocumentShare:r,onDocumentUpdate:a,selectedDocumentId:n,className:i,editable:s=!0}){let[u,D]=(0,ce.useState)(""),[P,x]=(0,ce.useState)(null),[H,g]=(0,ce.useState)(e);(0,ce.useEffect)(()=>{g(e)},[e]);let w=(0,ce.useMemo)(()=>u?H.filter(h=>h.title.toLowerCase().includes(u.toLowerCase())||h.description?.toLowerCase().includes(u.toLowerCase())||h.tags?.some(S=>S.toLowerCase().includes(u.toLowerCase()))||Object.values(h.metadata||{}).some(S=>String(S).toLowerCase().includes(u.toLowerCase()))):H,[H,u]),L=(0,ce.useMemo)(()=>{let h=(S,M)=>{if(M.length===0)return{};let[y,...B]=M;return S.reduce((C,k)=>{let J=k.metadata?.[y]||"Uncategorized",A=String(J);if(C[A]||(C[A]={documents:[],children:{}}),B.length===0)C[A].documents.push(k);else{let Y=h([k],B),E=Object.keys(Y)[0];E&&(C[A].children||(C[A].children={}),C[A].children[E]?C[A].children[E].documents.push(...Y[E].documents):C[A].children[E]=Y[E])}return C},{})};return h(w,t.groupBy)},[w,t.groupBy]),f=h=>{x(h),o?.(h)};return(0,$t.jsxs)("div",{className:`flex h-full ${i||""}`,children:[(0,$t.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,$t.jsx)("div",{className:"p-6 border-b border-border",children:(0,$t.jsxs)("div",{className:"relative",children:[(0,$t.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,$t.jsx)(le.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,$t.jsx)(ne,{placeholder:"Search knowledge base...",value:u,onChange:h=>D(h.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,$t.jsx)(at,{className:"h-[calc(100%-100px)]",children:(0,$t.jsx)("div",{className:"p-4 space-y-3",children:t.groupBy.length===0?(0,$t.jsx)($t.Fragment,{children:(0,$t.jsx)(Tt,{label:"Document",documents:w,level:0,onDocumentClick:f,selectedDocumentId:n,showDocumentCount:t.showDocumentCount},"Document")}):(0,$t.jsxs)($t.Fragment,{children:[Object.entries(L).map(([h,S])=>(0,$t.jsx)(Tt,{label:h,documents:S.documents,children:S.children,level:0,onDocumentClick:f,selectedDocumentId:n,showDocumentCount:t.showDocumentCount},h)),Object.keys(L).length===0&&(0,$t.jsxs)(Ne.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,$t.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,$t.jsx)(le.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,$t.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,$t.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),(0,$t.jsx)("div",{className:"flex-1 bg-background overflow-scroll",children:P?(0,$t.jsx)(Xo,{document:P,onDocumentUpdate:a,editable:s}):(0,$t.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,$t.jsxs)(Ne.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,$t.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,$t.jsx)(le.FileText,{className:"h-10 w-10 text-primary"})}),(0,$t.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,$t.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}0&&(module.exports={KnowledgeBrowser});
4
+ "use strict";"use client";var Jo=Object.create;var Ue=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var Yo=Object.getOwnPropertyNames;var Qo=Object.getPrototypeOf,er=Object.prototype.hasOwnProperty;var tr=(e,t)=>{for(var o in t)Ue(e,o,{get:t[o],enumerable:!0})},Et=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Yo(t))!er.call(e,n)&&n!==o&&Ue(e,n,{get:()=>t[n],enumerable:!(r=qo(t,n))||r.enumerable});return e};var j=(e,t,o)=>(o=e!=null?Jo(Qo(e)):{},Et(t||!e||!e.__esModule?Ue(o,"default",{value:e,enumerable:!0}):o,e)),or=e=>Et(Ue({},"__esModule",{value:!0}),e);var fn={};tr(fn,{KnowledgeBrowser:()=>un});module.exports=or(fn);var Re=require("motion/react"),ce=require("lucide-react"),de=require("react");var Kt=j(require("react"));var Ut=require("clsx");var ot="-",rr=e=>{let t=ar(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{let s=i.split(ot);return s[0]===""&&s.length!==1&&s.shift(),At(s,t)||nr(i)},getConflictingClassGroupIds:(i,s)=>{let f=o[i]||[];return s&&r[i]?[...f,...r[i]]:f}}},At=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),n=r?At(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(ot);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Ht=/^\[(.+)\]$/,nr=e=>{if(Ht.test(e)){let t=Ht.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},ar=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return sr(Object.entries(e.classGroups),o).forEach(([a,i])=>{tt(i,r,a,t)}),r},tt=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:Lt(t,n);a.classGroupId=o;return}if(typeof n=="function"){if(ir(n)){tt(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([a,i])=>{tt(i,Lt(t,a),o,r)})})},Lt=(e,t)=>{let o=e;return t.split(ot).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},ir=e=>e.isThemeGetter,sr=(e,t)=>t?e.map(([o,r])=>{let n=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[o,n]}):e,lr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,n=(a,i)=>{o.set(a,i),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let i=o.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return n(a,i),i},set(a,i){o.has(a)?o.set(a,i):n(a,i)}}},Ot="!",dr=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,n=t[0],a=t.length,i=s=>{let f=[],S=0,R=0,g;for(let h=0;h<s.length;h++){let b=s[h];if(S===0){if(b===n&&(r||s.slice(h,h+a)===t)){f.push(s.slice(R,h)),R=h+a;continue}if(b==="/"){g=h;continue}}b==="["?S++:b==="]"&&S--}let I=f.length===0?s:s.substring(R),v=I.startsWith(Ot),x=v?I.substring(1):I,H=g&&g>R?g-R:void 0;return{modifiers:f,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:H}};return o?s=>o({className:s,parseClassName:i}):i},cr=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},mr=e=>({cache:lr(e.cacheSize),parseClassName:dr(e),...rr(e)}),pr=/\s+/,ur=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(pr),s="";for(let f=i.length-1;f>=0;f-=1){let S=i[f],{modifiers:R,hasImportantModifier:g,baseClassName:I,maybePostfixModifierPosition:v}=o(S),x=!!v,H=r(x?I.substring(0,v):I);if(!H){if(!x){s=S+(s.length>0?" "+s:s);continue}if(H=r(I),!H){s=S+(s.length>0?" "+s:s);continue}x=!1}let h=cr(R).join(":"),b=g?h+Ot:h,P=b+H;if(a.includes(P))continue;a.push(P);let F=n(H,x);for(let M=0;M<F.length;++M){let B=F[M];a.push(b+B)}s=S+(s.length>0?" "+s:s)}return s};function fr(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Vt(t))&&(r&&(r+=" "),r+=o);return r}var Vt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Vt(e[r]))&&(o&&(o+=" "),o+=t);return o};function gr(e,...t){let o,r,n,a=i;function i(f){let S=t.reduce((R,g)=>g(R),e());return o=mr(S),r=o.cache.get,n=o.cache.set,a=s,s(f)}function s(f){let S=r(f);if(S)return S;let R=ur(f,o);return n(f,R),R}return function(){return a(fr.apply(null,arguments))}}var O=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},zt=/^\[(?:([a-ce-]+):)?(.+)\]$/i,hr=/^\$t+\/\$t+$/,br=new Set(["px","full","screen"]),vr=/^(\$t+(\.\$t+)?)?(xs|sm|md|lg|xl)$/,xr=/\$t+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yr=/^(inset_)?-?((\$t+)?\.?(\$t+)[a-ce]+|0)_-?((\$t+)?\.?(\$t+)[a-ce]+|0)/,Cr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>De(e)||br.has(e)||hr.test(e),ve=e=>Pe(e,"length",Tr),De=e=>!!e&&!Number.isNaN(Number(e)),et=e=>Pe(e,"number",De),Te=e=>!!e&&Number.isInteger(Number(e)),Nr=e=>e.endsWith("%")&&De(e.slice(0,-1)),N=e=>zt.test(e),xe=e=>vr.test(e),Rr=new Set(["length","size","percentage"]),Dr=e=>Pe(e,Rr,_t),Pr=e=>Pe(e,"position",_t),Sr=new Set(["image","url"]),Mr=e=>Pe(e,Sr,Er),kr=e=>Pe(e,"",Ir),Ie=()=>!0,Pe=(e,t,o)=>{let r=zt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Tr=e=>xr.test(e)&&!wr.test(e),_t=()=>!1,Ir=e=>yr.test(e),Er=e=>Cr.test(e);var Hr=()=>{let e=O("colors"),t=O("spacing"),o=O("blur"),r=O("brightness"),n=O("borderColor"),a=O("borderRadius"),i=O("borderSpacing"),s=O("borderWidth"),f=O("contrast"),S=O("grayscale"),R=O("hueRotate"),g=O("invert"),I=O("gap"),v=O("gradientColorStops"),x=O("gradientColorStopPositions"),H=O("inset"),h=O("margin"),b=O("opacity"),P=O("padding"),F=O("saturate"),M=O("scale"),B=O("sepia"),w=O("skew"),C=O("space"),c=O("translate"),A=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",N,t],E=()=>[N,t],pe=()=>["",ge,ve],me=()=>["auto",De,N],u=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",N],It=()=>["auto","avoid","all","avoid-page","page","left","right","column"],fe=()=>[De,N];return{cacheSize:500,separator:":",theme:{colors:[Ie],spacing:[ge,ve],blur:["none","",xe,N],brightness:fe(),borderColor:[e],borderRadius:["none","","full",xe,N],borderSpacing:E(),borderWidth:pe(),contrast:fe(),grayscale:Q(),hueRotate:fe(),invert:Q(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[Nr,ve],inset:Y(),margin:Y(),opacity:fe(),padding:E(),saturate:fe(),scale:fe(),sepia:Q(),skew:fe(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[xe]}],"break-after":[{"break-after":It()}],"break-before":[{"break-before":It()}],"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:[...u(),N]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[H]}],"inset-x":[{"inset-x":[H]}],"inset-y":[{"inset-y":[H]}],start:[{start:[H]}],end:[{end:[H]}],top:[{top:[H]}],right:[{right:[H]}],bottom:[{bottom:[H]}],left:[{left:[H]}],visibility:["visible","invisible","collapse"],ce:[{ce:["auto",Te,N]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Te,N]}],"grid-cols":[{"grid-cols":[Ie]}],"col-start-end":[{col:["auto",{span:["full",Te,N]},N]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[Ie]}],"row-start-end":[{row:["auto",{span:[Te,N]},N]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[I]}],"gap-x":[{"gap-x":[I]}],"gap-y":[{"gap-y":[I]}],"justify-content":[{justify:["normal",...ue()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ue(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ue(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],$t:[{$t:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],$t:[{$t:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[xe]},xe]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xe,ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",et]}],"font-family":[{font:[Ie]}],"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",N]}],"line-clamp":[{"line-clamp":["none",De,et]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ge,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","$t-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ge,ve]}],"underline-offset":[{"underline-offset":["auto",ge,N]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],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",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...u(),Pr]}],"bg-repeat":[{bg:["$t-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","$t","tl"]},Mr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-$t":[{"rounded-$t":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-de":[{"rounded-de":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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-$t":[{"border-$t":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:_()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-$t":[{"border-$t":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[ge,N]}],"outline-w":[{outline:[ge,ve]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ge,ve]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xe,kr]}],"shadow-color":[{shadow:[Ie]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",xe,N]}],grayscale:[{grayscale:[S]}],"hue-rotate":[{"hue-rotate":[R]}],invert:[{invert:[g]}],saturate:[{saturate:[F]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:fe()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:fe()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Te,N]}],"translate-x":[{"translate-x":[c]}],"translate-y":[{"translate-y":[c]}],"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",N]}],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","$t-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-$t":[{"scroll-$t":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-$t":[{"scroll-$t":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ge,ve,et]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],$t:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],$t:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-$t","rounded-ss","rounded-se","rounded-de","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-de"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-$t":["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-$t"],"border-w-x":["border-w-r","border-w-$t"],"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-$t"],"border-color-x":["border-color-r","border-color-$t"],"border-color-y":["border-color-t","border-color-b"],"scroll-$t":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-$t":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Bt=gr(Hr);function y(...e){return Bt((0,Ut.clsx)(e))}var $t=require("react/jsx-runtime"),ie=Kt.forwardRef(({className:e,type:t,...o},r)=>(0,$t.jsx)("input",{type:t,className:y("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:r,...o}));ie.displayName="Input";var rt=j(require("react")),ne=j(require("@radix-ui/react-scroll-area"));var nt=rt.forwardRef(({className:e,children:t,...o},r)=>(0,$t.jsxs)(ne.Root,{ref:r,className:y("relative overflow-hidden",e),...o,children:[(0,$t.jsx)(ne.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,$t.jsx)(Ft,{}),(0,$t.jsx)(ne.Corner,{})]}));nt.displayName=ne.Root.displayName;var Ft=rt.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,$t.jsx)(ne.ScrollAreaScrollbar,{ref:r,orientation:t,className:y("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-$t border-$t-transparent $t-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent $t-[1px]",e),...o,children:(0,$t.jsx)(ne.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ft.displayName=ne.ScrollAreaScrollbar.displayName;var Wt=require("@radix-ui/react-slot"),jt=require("class-variance-authority"),Gt=j(require("react")),Lr=(0,jt.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"}}}),ae=Gt.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...n},a)=>(0,$t.jsx)(e?Wt.Slot:"button",{className:y(Lr({className:t,size:o,variant:r})),ref:a,...n}));ae.displayName="Button";var Ee=j(require("react")),G=j(require("@radix-ui/react-dialog"));var Ke=G.Root;var at=G.Portal;var $e=Ee.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(G.Overlay,{ref:o,className:y("fixed inset-0 ce-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}));$e.displayName=G.Overlay.displayName;var it=Ee.forwardRef(({className:e,children:t,...o},r)=>(0,$t.jsxs)(at,{children:[(0,$t.jsx)($e,{}),(0,$t.jsxs)(G.Content,{ref:r,className:y("fixed left-[50%] top-[50%] ce-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background $t-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-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,$t.jsxs)(G.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,$t.jsx)(ce.$t,{className:"h-4 w-4"}),(0,$t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));it.displayName=G.Content.displayName;var st=({className:e,...t})=>(0,$t.jsx)("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});st.displayName="DialogHeader";var Ar=({className:e,...t})=>(0,$t.jsx)("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ar.displayName="DialogFooter";var lt=Ee.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(G.Title,{ref:o,className:y("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName=G.Title.displayName;var Or=Ee.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(G.Description,{ref:o,className:y("text-sm text-muted-foreground",e),...t}));Or.displayName=G.Description.displayName;var Wo=j(require("@radix-ui/react-dialog"));var Jt=j(require("react")),He=Jt.forwardRef(({className:e,...t},o)=>(0,$t.jsx)("textarea",{className:y("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:o,...t}));He.displayName="Textarea";var k=j(require("@radix-ui/react-select")),ye=j(require("react")),Yt=k.Root;var Qt=k.Value,dt=ye.forwardRef(({children:e,className:t,...o},r)=>(0,$t.jsxs)(k.Trigger,{className:y("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:r,...o,children:[e,(0,$t.jsx)(k.Icon,{asChild:!0,children:(0,$t.jsx)(ce.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));dt.displayName=k.Trigger.displayName;var eo=ye.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(k.ScrollUpButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$t.jsx)(ce.ChevronUp,{className:"h-4 w-4"})}));eo.displayName=k.ScrollUpButton.displayName;var to=ye.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(k.ScrollDownButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,$t.jsx)(ce.ChevronDown,{className:"h-4 w-4"})}));to.displayName=k.ScrollDownButton.displayName;var ct=ye.forwardRef(({children:e,className:t,position:o="popper",...r},n)=>(0,$t.jsx)(k.Portal,{children:(0,$t.jsxs)(k.Content,{className:y("relative ce-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",o==="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:o,ref:n,...r,children:[(0,$t.jsx)(eo,{}),(0,$t.jsx)(k.Viewport,{className:y("$t-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,$t.jsx)(to,{})]})}));ct.displayName=k.Content.displayName;var Vr=ye.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(k.Label,{className:y("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Vr.displayName=k.Label.displayName;var Fe=ye.forwardRef(({children:e,className:t,...o},r)=>(0,$t.jsxs)(k.Item,{className:y("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...o,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(k.ItemIndicator,{children:(0,$t.jsx)(ce.Check,{className:"h-4 w-4"})})}),(0,$t.jsx)(k.ItemText,{children:e})]}));Fe.displayName=k.Item.displayName;var zr=ye.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(k.Separator,{className:y("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));zr.displayName=k.Separator.displayName;var oo=j(require("react")),mt=j(require("@radix-ui/react-label"));var _r=(0,jt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pt=oo.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(mt.Root,{ref:o,className:y(_r(),e),...t}));pt.displayName=mt.Root.displayName;var ft=({fieldName:e,value:t,label:o,multiline:r=!1,onSave:n,className:a="",disabled:i=!1})=>{let[s,f]=(0,de.useState)(!1),[S,R]=(0,de.useState)(""),g=()=>{i||(f(!0),R(t))},I=async()=>{S!==t&&await n(e,S),f(!1)},v=x=>{x.key==="Enter"&&!r||x.key==="Enter"&&x.ctrlKey&&r?I():x.key==="Escape"&&(f(!1),R(""))};return(0,$t.jsxs)("div",{className:`space-y-2 ${a}`,children:[(0,$t.jsx)(pt,{children:o}),s?r?(0,$t.jsx)(He,{value:S,onChange:x=>R(x.target.value),onBlur:I,onKeyDown:v,autoFocus:!0,rows:4,className:"resize-none"}):(0,$t.jsx)(ie,{value:S,onChange:x=>R(x.target.value),onBlur:I,onKeyPress:v,autoFocus:!0,className:"text-lg font-medium"}):(0,$t.jsxs)("div",{onClick:g,className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 $t-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,$t.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!i&&(0,$t.jsx)(ce.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Ho=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Lo=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Ao=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Oo=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Vo=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),zo=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),_o=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Ye=require("@payloadcms/richtext-lexical/lexical/list"),Bo=require("@payloadcms/richtext-lexical/lexical/rich-text"),Uo=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Io=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Be=require("@payloadcms/richtext-lexical/lexical/utils"),D=require("@payloadcms/richtext-lexical/lexical"),Dt=require("@payloadcms/richtext-lexical/lexical/selection");var bo=require("@radix-ui/react-dialog"),Ze=require("@payloadcms/richtext-lexical/client");var ht=j(require("bson-objectid"));var so=require("@payloadcms/ui");var io=j(require("react")),se=j(require("@radix-ui/react-tooltip"));var We=se.Provider,je=se.Root,Ge=se.Trigger,Le=io.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$t.jsx)(se.Portal,{children:(0,$t.jsx)(se.Content,{ref:r,sideOffset:t,className:y("ce-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),...o})}));Le.displayName=se.Content.displayName;var Br=e=>{let{data:{relationTo:t,value:o},nodeKey:r}=e,[n]=(0,Io.useLexicalComposerContext)(),[a,i]=(0,de.useState)(""),[s,f]=(0,de.useState)(""),[S,R]=(0,de.useState)(""),g=async h=>{console.log("fetchMedia",h)};(0,de.useEffect)(()=>{typeof o=="string"?o.length===24?g(o):(i(o||""),R(H(x())),f(v()||"")):typeof o=="object"&&(i(`${process.env.NEXT_PUBLIC_API_URL}${o.url}`||""),R(H(o.filesize)),f(o.mimeType?.split("/")[1]||""))},[]);let I=(0,de.useCallback)(()=>{n.update(()=>{(0,D.$getNodeByKey)(r)?.remove()})},[n,r]),v=()=>{let h=e.data.value;return typeof h=="string"?h.split(";base64")[0]?.split("image/")[1]:""},x=()=>{let h=e.data.value;if(typeof h=="string"){let b=h.split(",")[1]?.length||0;return 4*Math.ceil(b/3)*.5624896334383812/1e3}return 0};function H(h){if(h>=1e6){let P=h/1e6;return`${P>=10?Math.round(P).toString():P.toFixed(1)} MB`}return`${Math.floor(h/1e3)} KB`}return(0,$t.jsx)("div",{className:"my-2",contentEditable:!1,children:(0,$t.jsxs)("div",{className:"border border-slate-800 rounded-xl overflow-clip w-60 flex flex-col gap-2 bg-[#222222]",children:[(0,$t.jsxs)("div",{className:"flex gap-2 border-b border-b-slate-100/10",children:[(0,$t.jsx)("div",{className:"flex-1",children:e.data.value?(0,$t.jsx)("img",{className:"object-cover $t-0 w-full min-w-[115px] min-h-[105px]","data-lexical-upload-id":o,"data-lexical-upload-relation-to":t,src:a}):(0,$t.jsx)(so.File,{})}),(0,$t.jsx)(We,{children:(0,$t.jsxs)(je,{children:[(0,$t.jsxs)(Ge,{className:"flex-1 flex justify-center items-center text-[#b5b5b5]",children:[(0,$t.jsx)("span",{className:"font-medium text-sm",children:"Media"}),(0,$t.jsx)("button",{onClick:h=>{h.preventDefault(),I()},className:"flex-1 flex justify-center items-center",children:(0,$t.jsx)(ce.$t,{width:24,height:24,strokeWidth:1})})]}),(0,$t.jsx)(Le,{children:(0,$t.jsx)("span",{children:"Remove image"})})]})})]}),(0,$t.jsxs)("div",{className:"flex items-center justify-center gap-4 py-3 flex-1 text-xs font-bold",children:[(0,$t.jsx)("span",{className:"",children:s?.toLocaleUpperCase()}),(0,$t.jsx)("span",{children:S})]})]})})},po=Br;function Ur(e){if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let o=e.getAttribute("data-lexical-upload-id");if(o)return{node:Se({fields:{},relationTo:"media",value:o})}}return e.src.startsWith("file:///"),null}var Ae=class extends Ze.UploadNode{static importDOM(){return{img:()=>({conversion:Ur,priority:0})}}static importJSON(t){t.version===1&&t?.value?.id&&(t.value=t.value.id),t.version===2&&!t?.id&&(t.id=new ht.default().toHexString(),t.version=3);let o={id:t.id??new ht.default().toHexString(),fields:t.fields,relationTo:"media",value:t.value},r=Se(o);return r.setFormat?.(t.format),r}decorate(){return(0,$t.jsx)(po,{data:this.__data,nodeKey:this.getKey()})}};function Se(e){return new Ae({data:e})}var Kr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$r=e=>Kr?(e||window).getSelection():null,na=(0,D.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND"),bt=(0,D.createCommand)("INSERT_UPLOAD_COMMAND");function vo({activeEditor:e,onClose:t,isOpen:o=!1}){let r=(0,de.useRef)(!1),[n,a]=(0,de.useState)(!0),[i,s]=(0,de.useState)(""),[f,S]=(0,de.useState)(""),[R,g]=(0,de.useState)(!1),[I,v]=(0,de.useState)("left"),x=i==="",H=M=>{g(M.target.checked)},h=M=>{v(M.target.value)},b=M=>{let B=new FileReader;B.onload=function(){return typeof B.result=="string"&&s(B.result),""},M!==null&&M[0]&&B.readAsDataURL(M[0])};(0,de.useEffect)(()=>{r.current=!1;let M=B=>{r.current=B.altKey};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}},[e]),(0,de.useEffect)(()=>{n||t()},[n]),(0,de.useEffect)(()=>{a(o)},[o]);let P=({editor:M,relationTo:B,replaceNodeKey:w,value:C})=>{if(w)M.update(()=>{let c=(0,D.$getNodeByKey)(w);c&&c.replace(Se({id:"",fields:{},relationTo:"media",value:C}))});else{let c=M.dispatchCommand(bt,{fields:null,relationTo:"media",value:C})}},F=()=>{P({editor:e,relationTo:"media",replaceNodeKey:null,value:{altText:f,src:i,showCaption:R,position:I}.src}),a(!1),t()};return(0,$t.jsx)(Ke,{open:n,onOpenChange:M=>a(M),children:(0,$t.jsxs)(it,{children:[(0,$t.jsxs)(st,{children:[(0,$t.jsx)(lt,{children:"Upload Image"}),(0,$t.jsx)(bo.DialogDescription,{children:"Description"})]}),(0,$t.jsxs)("div",{className:"",children:[(0,$t.jsx)("div",{style:{marginBottom:"1em"},children:(0,$t.jsx)(ie,{type:"file",onChange:M=>b(M.target.files),accept:"image/*","data-test-id":"image-modal-file-upload"})}),(0,$t.jsx)("div",{style:{marginBottom:"1em"},children:(0,$t.jsx)(ie,{"aria-label":"Alt Text",placeholder:"Descriptive alternative text",onChange:M=>S(M.currentTarget.value),value:f,"data-test-id":"image-modal-alt-text-input"})}),(0,$t.jsx)(ae,{"data-test-id":"image-modal-file-upload-btn",disabled:x,onClick:()=>F(),children:"Confirm"})]})]})})}function vt({captionsEnabled:e}){let[t]=(0,Io.useLexicalComposerContext)();return(0,de.useEffect)(()=>{if(!t.hasNodes([Ze.UploadNode]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return(0,Be.mergeRegister)(t.registerCommand(D.DRAGSTART_COMMAND,o=>Fr(o),D.COMMAND_PRIORITY_HIGH),t.registerCommand(D.DRAGOVER_COMMAND,o=>Wr(o),D.COMMAND_PRIORITY_LOW),t.registerCommand(D.DROP_COMMAND,o=>jr(o,t),D.COMMAND_PRIORITY_HIGH))},[e,t]),null}function Fr(e){if(!xt())return!1;let o=e.dataTransfer;return o?(o.setData("text/plain","_"),!0):!1}function Wr(e){return xt()?(xo(e)||e.preventDefault(),!0):!1}function jr(e,t){let o=xt();if(!o)return!1;if(e.preventDefault(),xo(e)){let r=Gr(e);o.remove();let n=(0,D.$createRangeSelection)();r!=null&&n.applyDOMRange(r),(0,D.$setSelection)(n)}return!0}function xt(){let e=(0,D.$getSelection)();if(!(0,D.$isNodeSelection)(e))return null;let o=e.getNodes()[0];return(0,Ze.$isUploadNode)(o)?o:null}function xo(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.editor-image")&&t.parentElement&&t.parentElement.closest("div.ContentEditable__root"))}function Gr(e){let t,o=e.target,r=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,n=$r(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&n!==null)n.collapse(e.rangeParent,e.rangeOffset||0),t=n.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}var Zr=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),wo=Zr;var Xr=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),yo=Xr;var Jr=()=>(0,$t.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,$t.jsx)("path",{$t:"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,$t.jsx)("path",{$t:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Co=Jr;var qr=()=>(0,$t.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,$t.jsx)("path",{$t:"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,$t.jsx)("path",{$t:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),No=qr;var Yr=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),Ro=Yr;var Qr=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),Do=Qr;var Po=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),So=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),Mo=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),ko=()=>(0,$t.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,$t.jsx)("path",{$t:"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"})}),To=()=>(0,$t.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,$t.jsx)("path",{$t:"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 be=j(require("react")),T=j(require("@radix-ui/react-dropdown-menu")),Me=require("@radix-ui/react-icons");var Xe=T.Root,Je=T.Trigger;var en=be.forwardRef(({className:e,inset:t,children:o,...r},n)=>(0,$t.jsxs)(T.SubTrigger,{ref:n,className:y("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),...r,children:[o,(0,$t.jsx)(Me.ChevronRightIcon,{className:"ml-auto"})]}));en.displayName=T.SubTrigger.displayName;var tn=be.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(T.SubContent,{ref:o,className:y("ce-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover $t-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}));tn.displayName=T.SubContent.displayName;var ze=be.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,$t.jsx)(T.Portal,{children:(0,$t.jsx)(T.Content,{ref:r,sideOffset:t,className:y("ce-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover $t-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),...o})}));ze.displayName=T.Content.displayName;var _e=be.forwardRef(({className:e,inset:t,...o},r)=>(0,$t.jsx)(T.Item,{ref:r,className:y("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),...o}));_e.displayName=T.Item.displayName;var on=be.forwardRef(({className:e,children:t,checked:o,...r},n)=>(0,$t.jsxs)(T.CheckboxItem,{ref:n,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-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:o,...r,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(T.ItemIndicator,{children:(0,$t.jsx)(Me.CheckIcon,{className:"h-4 w-4"})})}),t]}));on.displayName=T.CheckboxItem.displayName;var rn=be.forwardRef(({className:e,children:t,...o},r)=>(0,$t.jsxs)(T.RadioItem,{ref:r,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,$t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$t.jsx)(T.ItemIndicator,{children:(0,$t.jsx)(Me.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));rn.displayName=T.RadioItem.displayName;var nn=be.forwardRef(({className:e,inset:t,...o},r)=>(0,$t.jsx)(T.Label,{ref:r,className:y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));nn.displayName=T.Label.displayName;var an=be.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(T.Separator,{ref:o,className:y("-mx-1 my-1 h-px bg-muted",e),...t}));an.displayName=T.Separator.displayName;var sn=({className:e,...t})=>(0,$t.jsx)("span",{className:y("ml-auto text-xs tracking-widest opacity-60",e),...t});sn.displayName="DropdownMenuShortcut";var Rt=1;function ln(){return(0,$t.jsx)("span",{className:"border border-[#222222]"})}function Pt(){let[e]=(0,Io.useLexicalComposerContext)(),t=(0,$.useRef)(null),[o,r]=(0,$.useState)(!1),[n,a]=(0,$.useState)(!1),[i,s]=(0,$.useState)(!1),[f,S]=(0,$.useState)(!1),[R,g]=(0,$.useState)(!1),[I,v]=(0,$.useState)(!1),[x,H]=(0,$.useState)(!1),[h,b]=(0,$.useState)(!1),[P,F]=(0,$.useState)(!1),[M,B]=(0,$.useState)("left"),[w,C]=(0,$.useState)("$t"),c=u=>{e.update(()=>{let _=(0,D.$getSelection)();(0,D.$isRangeSelection)(_)&&(u==="$t"?(0,Dt.$setBlocksType)(_,()=>(0,D.$createParagraphNode)()):(0,Dt.$setBlocksType)(_,()=>(0,Bo.$createHeadingNode)(u)))})},A=(0,$.useCallback)(()=>{let u=(0,D.$getSelection)();if((0,D.$isRangeSelection)(u)){s(u.hasFormat("bold")),S(u.hasFormat("italic")),g(u.hasFormat("underline")),v(u.hasFormat("strikethrough")),H(u.hasFormat("subscript")),b(u.hasFormat("superscript"));let _=u.anchor.getNode(),W=_;for(;W&&!(0,D.$isParagraphNode)(W)&&W!==(0,D.$getRoot)();){let Q=W.getParent();Q&&(W=Q)}if(W){let Q=W.getFormatType();B(Q||"left")}let ue=_.getTopLevelElement()?.__tag;C(ue||"$t")}},[]);(0,$.useEffect)(()=>(0,Be.mergeRegister)(e.registerUpdateListener(({editorState:u})=>{u.read(()=>{A()})}),e.registerCommand(D.SELECTION_CHANGE_COMMAND,(u,_)=>(A(),!1),Rt),e.registerCommand(D.CAN_UNDO_COMMAND,u=>(r(u),!1),Rt),e.registerCommand(D.CAN_REDO_COMMAND,u=>(a(u),!1),Rt),(0,Be.mergeRegister)(e.registerCommand(bt,u=>(e.update(()=>{let _=(0,D.$getSelection)()||(0,D.$getPreviousSelection)();if((0,D.$isRangeSelection)(_)){let W=Se({id:u.id,fields:u.fields,relationTo:u.relationTo,value:u.value}),{focus:ue}=_,Q=ue.getNode();(0,Be.$insertNodeToNearestRoot)(W),(0,D.$isParagraphNode)(Q)&&!Q.__first&&Q.remove()}}),!0),D.COMMAND_PRIORITY_EDITOR))),[e,A]);let L=[[{label:"Undo",icon:(0,$t.jsx)(ce.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(D.UNDO_COMMAND,void 0)},disabled:!o},{label:"Redo",icon:(0,$t.jsx)(ce.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(D.UNDO_COMMAND,void 0)},disabled:!n}],[{label:"Bold",icon:(0,$t.jsx)(wo,{}),onClick:()=>{e.dispatchCommand(D.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:i},{label:"Italic",icon:(0,$t.jsx)(yo,{}),onClick:()=>{e.dispatchCommand(D.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:f},{label:"Underline",icon:(0,$t.jsx)(Co,{}),onClick:()=>{e.dispatchCommand(D.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:R},{label:"Strikethrough",icon:(0,$t.jsx)(No,{}),onClick:()=>{e.dispatchCommand(D.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:I},{label:"Subscript",icon:(0,$t.jsx)(Ro,{}),onClick:()=>{e.dispatchCommand(D.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:x},{label:"Superscript",icon:(0,$t.jsx)(Do,{}),onClick:()=>{e.dispatchCommand(D.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:h}]],Y=[{label:"Left Align",direction:"left",icon:(0,$t.jsx)(ce.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(D.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,$t.jsx)(ce.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(D.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,$t.jsx)(ce.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(D.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,$t.jsx)(ce.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(D.FORMAT_ELEMENT_COMMAND,"justify")}}],pe=[{label:"Normal Text",value:"$t",icon:(0,$t.jsx)(Po,{}),onClick:()=>c("$t")},{label:"Heading 1",value:"h1",icon:(0,$t.jsx)(So,{}),onClick:()=>c("h1")},{label:"Heading 2",value:"h2",icon:(0,$t.jsx)(Mo,{}),onClick:()=>c("h2")},{label:"Heading 3",value:"h3",icon:(0,$t.jsx)(ko,{}),onClick:()=>c("h3")},{label:"Heading 4",value:"h4",icon:(0,$t.jsx)(To,{}),onClick:()=>c("h4")},...[{label:"Unordered List",value:"ul",icon:(0,$t.jsx)(ce.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ye.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,$t.jsx)(ce.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Ye.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],me=[{label:"Insert Image",icon:(0,$t.jsx)(ce.ImageUp,{width:15,height:15}),onClick:()=>{F(!0)},disabled:!1}];return(0,$t.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,$t.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[L.map((u,_)=>(0,$t.jsxs)($.Fragment,{children:[(0,$t.jsx)("div",{className:"flex items-center gap-2",children:u.map((W,ue)=>(0,$t.jsx)("div",{role:"button","aria-disabled":W.disabled||!1,onClick:W.onClick,className:y("$t-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]",W.active&&"bg-[#3c3c3c]"),"aria-label":W.label,children:(0,$t.jsx)(We,{children:(0,$t.jsxs)(je,{children:[(0,$t.jsx)(Ge,{className:"text-[#b5b5b5]",children:W.icon}),(0,$t.jsx)(Le,{children:(0,$t.jsx)("$t",{children:W.label})})]})})},ue))}),(0,$t.jsx)(ln,{})]},`toolbar-option-${u.length}-${_}`)),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(Je,{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(u=>u.direction===M)?.icon,Y.find(u=>u.direction===M)?.label,(0,$t.jsx)(ce.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:Y.map((u,_)=>(0,$t.jsxs)(_e,{onClick:u.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,$t.jsx)("span",{children:u.icon}),(0,$t.jsx)("span",{children:u.label})]},`${u.label}-${_}`))})]}),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(Je,{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:[pe.find(u=>u.value===w)?.icon,pe.find(u=>u.value===w)?.label,(0,$t.jsx)(ce.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:pe.map((u,_)=>(0,$t.jsxs)(_e,{onClick:u.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,$t.jsx)("span",{children:u.icon}),(0,$t.jsx)("span",{children:u.label})]},`heading-option-${u.label}-${_}`))})]}),(0,$t.jsxs)(Xe,{children:[(0,$t.jsxs)(Je,{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:[(0,$t.jsx)(ce.Plus,{width:15,height:15}),(0,$t.jsx)(ce.ChevronDown,{width:15,height:15})]}),(0,$t.jsx)(ze,{className:"bg-black hover:bg-black",children:me.map((u,_)=>(0,$t.jsxs)(_e,{onClick:u.onClick,disabled:u.disabled,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,$t.jsx)("span",{children:u.icon}),(0,$t.jsx)("span",{children:u.label})]},_))})]}),P&&(0,$t.jsx)(vo,{activeEditor:e,onClose:()=>{F(!1)},isOpen:P})]})})}var dn=({setValue:e,value:t,name:o,editable:r=!0})=>{let[n]=(0,Io.useLexicalComposerContext)(),a=i=>{i.read(()=>{let s=i.toJSON();e?.(()=>s)})};return(0,de.useEffect)(()=>{n.setEditable(r)},[r]),(0,de.useEffect)(()=>{t&&n.update(()=>{n.setEditorState(n.parseEditorState(t))})},[]),(0,$t.jsx)("div",{className:"w-full",children:(0,$t.jsxs)("div",{className:" ",children:[r&&(0,$t.jsx)(Pt,{}),(0,$t.jsxs)("div",{className:"px-4 my-4 border-$t border-[#222222]",children:[(0,$t.jsx)(zo.RichTextPlugin,{contentEditable:(0,$t.jsx)(Ao.ContentEditable,{name:o,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Oo.LexicalErrorBoundary}),r&&(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(Vo.HistoryPlugin,{}),(0,$t.jsx)(Ho.AutoFocusPlugin,{}),(0,$t.jsx)(_o.ListPlugin,{}),(0,$t.jsx)(Uo.OnChangePlugin,{onChange:a}),(0,$t.jsx)(vt,{})]})]})]})})},cn=({setValue:e,value:t,name:o,editable:r=!0})=>(0,$t.jsx)(Lo.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Ye.ListNode,Ye.ListItemNode,Bo.HeadingNode,Ae],onError(a){throw console.error("Lexical error:",a),a},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,$t.jsx)(dn,{value:t,setValue:e,name:o,editable:r})}),Qe=cn;function $o({document:e,onSave:t,mode:o="edit",onCancel:r,availableDocuments:n=[],knowledgeContexts:a=[]}){let[i,s]=(0,de.useState)({...e,updatedAt:new Date}),[f,S]=(0,de.useState)(!1),[R,g]=(0,de.useState)(i.richTextContent);(0,de.useEffect)(()=>{s(e)},[e]);let I=w=>{switch(w){case"markdown":case"mdx":return(0,$t.jsx)(ce.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,$t.jsx)(ce.File,{className:"h-6 w-6 text-success"});case"text":return(0,$t.jsx)(ce.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,$t.jsx)(ce.File,{className:"h-6 w-6 text-muted-foreground"})}},v=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"}},x=()=>{let w=new Set,C=new Set;return a.forEach(c=>{c.menuConfig.groupBy.forEach(A=>w.add(A))}),n.forEach(c=>{c.metadata&&Object.keys(c.metadata).forEach(A=>C.add(A))}),{contextKeys:Array.from(w).sort(),documentKeys:Array.from(C).sort(),allKeys:Array.from(new Set([...w,...C])).sort()}},H=w=>{let C=new Set;return n.forEach(c=>{c.metadata?.[w]&&C.add(String(c.metadata[w]))}),Array.from(C).sort()},h=x(),b=()=>{t({...i,richTextContent:R})},P=(w,C)=>{s(c=>({...c,metadata:{...c.metadata,[w]:C}}))},F=(w,C)=>{C==="__custom__"?P(w,""):P(w,C)},M=()=>{P("","")},B=w=>{s(C=>{let c={...C.metadata};return delete c[w],{...C,metadata:c}})};return(0,$t.jsxs)(Re.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,$t.jsxs)("div",{className:"border-b border-border bg-card $t-8 pb-6",children:[(0,$t.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,$t.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,$t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$t.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,$t.jsx)("div",{className:"flex-1 min-w-0",children:(0,$t.jsx)(ft,{fieldName:"title",value:i.title,label:"",onSave:(w,C)=>s(c=>({...c,title:C})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:$t-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,$t.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${v(i.format)} flex-shrink-0 mt-1`,children:i.format.toUpperCase()})]}),(0,$t.jsx)("div",{className:"mt-2",children:(0,$t.jsx)(ft,{fieldName:"description",value:i.description||"Click to add description...",label:"",multiline:!0,onSave:(w,C)=>s(c=>({...c,description:C})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:$t-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),(0,$t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,$t.jsxs)(ae,{variant:"ghost",size:"sm",onClick:()=>S(!f),className:"gap-2",children:[(0,$t.jsx)(ce.Info,{className:"h-4 w-4"}),"Metadata",i.metadata&&Object.keys(i.metadata).length>0&&(0,$t.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(i.metadata).length}),f?(0,$t.jsx)(ce.ChevronDown,{className:"h-4 w-4"}):(0,$t.jsx)(ce.ChevronRight,{className:"h-4 w-4"})]}),(0,$t.jsxs)(ae,{variant:"outline",size:"sm",onClick:r,className:"gap-2",children:[(0,$t.jsx)(ce.$t,{className:"h-4 w-4"}),"Cancel"]}),(0,$t.jsxs)(ae,{size:"sm",onClick:b,className:"gap-2",children:[(0,$t.jsx)(ce.Save,{className:"h-4 w-4"}),"Save"]})]})]}),(0,$t.jsx)(Re.motion.div,{initial:!1,animate:{height:f?"auto":0,opacity:f?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:(0,$t.jsxs)("div",{className:"pt-4 border-t border-border mt-4 h-screen max-h-full flex",children:[(0,$t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,$t.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,$t.jsx)(ce.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,$t.jsxs)(ae,{type:"button",variant:"outline",size:"sm",onClick:M,className:"gap-1 h-8",children:[(0,$t.jsx)(ce.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),(0,$t.jsx)("div",{className:"bg-muted rounded-lg $t-4 border border-border",children:i.metadata&&Object.keys(i.metadata).length>0?(0,$t.jsx)("div",{className:"space-y-2",children:Object.entries(i.metadata).map(([w,C],c)=>{let A=H(w);return(0,$t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,$t.jsx)(ie,{value:w,onChange:L=>{let Y=L.target.value||"",E=i.metadata?.[w];s(pe=>{let me={...pe.metadata};return delete me[w],Y&&(me[Y]=E||""),{...pe,metadata:me}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${w}`}),(0,$t.jsx)("datalist",{id:`metadata-keys-${w}`,children:h.allKeys.map(L=>(0,$t.jsx)("option",{value:L},L))}),(0,$t.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),A.length>0?(0,$t.jsxs)(Yt,{value:String(C||""),onValueChange:L=>F(w,L),children:[(0,$t.jsx)(dt,{className:"flex-1 h-8 text-sm",children:(0,$t.jsx)(Qt,{placeholder:"Value"})}),(0,$t.jsxs)(ct,{children:[A.map(L=>(0,$t.jsx)(Fe,{value:L,children:L},L)),(0,$t.jsx)(Fe,{value:"__custom__",children:(0,$t.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,$t.jsx)(ie,{value:String(C||""),onChange:L=>P(w,L.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,$t.jsx)(ae,{type:"button",variant:"ghost",size:"sm",onClick:()=>B(w),className:"h-8 w-8 $t-0 text-muted-foreground hover:text-destructive",children:(0,$t.jsx)(ce.$t,{className:"h-3 w-3"})})]},`metadata-key-${c}`)})}):(0,$t.jsxs)("div",{className:"text-center py-4",children:[(0,$t.jsx)("$t",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),(0,$t.jsx)("$t",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),(0,$t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,$t.jsx)("div",{className:"$t-8 h-full max-h-full overflow-auto",children:i.format==="richText"?(0,$t.jsx)(Qe,{setValue:g,value:R,name:"richTextContent"}):(0,$t.jsx)(He,{value:i.content||"",onChange:w=>s(C=>({...C,content:w.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}var jo=j(require("react-markdown")),Go=j(require("remark-gfm"));var Zo=e=>(0,$t.jsx)(jo.default,{remarkPlugins:[Go.default],components:{h1:({children:t})=>(0,$t.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,$t.jsx)("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>(0,$t.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,$t.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,$t.jsx)("ol",{className:"list-decimal",children:t}),ul:({children:t})=>(0,$t.jsx)("ul",{className:"list-disc",children:t}),li:({children:t})=>(0,$t.jsx)("li",{className:"ml-4",children:t}),$t:({children:t})=>(0,$t.jsx)("$t",{className:"mb-4",children:t}),a:({children:t,href:o})=>(0,$t.jsx)("a",{href:o,className:"text-blue-500",children:t}),img:({src:t,alt:o})=>(0,$t.jsx)("img",{src:t,alt:o,className:"mb-4"}),blockquote:({children:t})=>(0,$t.jsx)("blockquote",{className:"border-$t-4 border-gray-300 pl-4 mb-4",children:t})},children:e}),Fo=e=>(0,$t.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),mn=e=>(0,$t.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e&&(0,$t.jsx)(Qe,{value:JSON.stringify(e),editable:!1,name:"richTextContent"},JSON.stringify(e))}),pn=e=>(0,$t.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,$t.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg $t-4 mb-4",children:(0,$t.jsxs)("$t",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,$t.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Zo(e)]});function Xo({document:e,onDocumentUpdate:t,editable:o=!0,mode:r="view",renderers:n,availableDocuments:a=[],knowledgeContexts:i=[]}){let[s,f]=(0,de.useState)(!1),[S,R]=(0,de.useState)(!1),[g,I]=(0,de.useState)(e),[v,x]=(0,de.useState)(!1),H=(0,de.useRef)(null),h=g.format==="richText"?g.richTextContent:g.content,b=(0,de.useMemo)(()=>`${g.format}:${JSON.stringify(h)}`,[g.format,h]);(0,de.useEffect)(()=>{I(e)},[e]);let P=c=>{switch(c){case"markdown":case"mdx":return(0,$t.jsx)(ce.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,$t.jsx)(ce.File,{className:"h-6 w-6 text-success"});case"text":return(0,$t.jsx)(ce.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,$t.jsx)(ce.File,{className:"h-6 w-6 text-muted-foreground"})}},F=c=>{switch(c){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"}},M=(c,A)=>{let L={markdown:Zo,mdx:pn,text:Fo},Y=n?.[A]||L[A];if(A==="richText"&&typeof c=="object")return mn(c);if(Y&&typeof c=="string")return Y(c);if(typeof c=="string")return Fo(c)},B=async c=>{x(!0),H.current=g,(0,de.startTransition)(()=>{I({...c,richTextContent:c.richTextContent?structuredClone(c.richTextContent):void 0})});try{let A=await t?.(c);if(x(!1),!A)throw new Error("save failed");f(!1)}catch{H.current&&(0,de.startTransition)(()=>I(H.current))}},w=()=>{f(!1)};return(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(Ke,{open:s||r==="create",onOpenChange:c=>!c&&w(),children:(0,$t.jsxs)(at,{children:[(0,$t.jsx)($e,{}),(0,$t.jsxs)(Wo.Content,{className:y("fixed inset-0 ce-50 bg-background $t-0 $t-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:[v&&(0,$t.jsx)("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center",children:(0,$t.jsx)(ce.Loader2,{className:"h-8 w-8 animate-spin text-primary"})}),(0,$t.jsx)($o,{mode:r==="create"?"create":"edit",document:g,onSave:B,onCancel:w,availableDocuments:a,knowledgeContexts:i})]})]})}),(0,$t.jsxs)(Re.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,$t.jsxs)("div",{className:"border-b border-border bg-card $t-8 pb-6",children:[(0,$t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,$t.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,$t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$t.jsxs)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[g.title,(0,$t.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${F(g.format)}`,children:g.format.toUpperCase()})]}),g.description&&(0,$t.jsx)("$t",{className:"text-muted-foreground text-lg leading-relaxed",children:g.description})]})}),(0,$t.jsxs)("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[g.metadata&&Object.keys(g.metadata).length>0&&(0,$t.jsxs)(ae,{variant:"ghost",size:"sm",onClick:()=>R(!S),className:"gap-2",children:[(0,$t.jsx)(ce.Info,{className:"h-4 w-4"}),"Metadata",S?(0,$t.jsx)(ce.ChevronDown,{className:"h-4 w-4"}):(0,$t.jsx)(ce.ChevronRight,{className:"h-4 w-4"})]}),o&&(0,$t.jsxs)(ae,{variant:"outline",size:"sm",onClick:()=>f(!0),className:"gap-2",children:[(0,$t.jsx)(ce.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),g.metadata&&Object.keys(g.metadata).length>0&&(0,$t.jsx)(Re.motion.div,{initial:!1,animate:{height:S?"auto":0,opacity:S?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,$t.jsxs)("div",{className:"pt-4 border-t border-border mt-4",children:[(0,$t.jsxs)("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[(0,$t.jsx)(ce.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,$t.jsx)("div",{className:"bg-muted rounded-lg $t-4 border border-border",children:(0,$t.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(g.metadata).map(([c,A])=>(0,$t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,$t.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:c.replace(/([A-$t])/g," $1").trim()}),(0,$t.jsx)("span",{className:"text-foreground font-medium",children:String(A)})]},c))})})]})})]}),(0,$t.jsx)("div",{className:"flex-1 ",children:(0,$t.jsx)("div",{className:"py-4 h-full",children:(0,$t.jsx)("div",{className:"space-y-4",children:g.content||g.richTextContent?(0,$t.jsx)("div",{className:"relative",children:(0,$t.jsx)("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:M(g.format==="richText"?g.richTextContent:g.content,g.format)})},b):(0,$t.jsxs)("div",{className:"text-center $t-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,$t.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,$t.jsx)(ce.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,$t.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,$t.jsx)("$t",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}function Tt({label:e,documents:t,children:o,level:r,onDocumentClick:n,selectedDocumentId:a,showDocumentCount:i=!0}){let[s,f]=(0,de.useState)(r===0),S=o&&Object.keys(o).length>0,R=t.length+(o?Object.values(o).reduce((v,x)=>v+x.documents.length,0):0),g=v=>{switch(v){case"markdown":case"mdx":return(0,$t.jsx)(ce.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return(0,$t.jsx)(ce.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,$t.jsx)(ce.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},I=v=>{let x=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return x[v%x.length]};return(0,$t.jsxs)("div",{className:"space-y-1",children:[(S||t.length>0)&&(0,$t.jsxs)(Re.motion.div,{className:`group flex items-center gap-3 $t-3 rounded-xl cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${r*20}px`},onClick:()=>f(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,$t.jsx)("div",{className:`w-1 h-6 rounded-full ${I(r)}`}),(0,$t.jsx)(Re.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,$t.jsx)(ce.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,$t.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,$t.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,$t.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),i&&R>0&&(0,$t.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,$t.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:R})})]})]}),(0,$t.jsx)(Re.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,$t.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((v,x)=>(0,$t.jsxs)(Re.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:x*.05,duration:.2},className:`group flex items-center gap-3 $t-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${a===v.id?"bg-primary/10 border-$t-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${r*20+20}px`},onClick:()=>n?.(v),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,$t.jsx)("div",{className:"flex-shrink-0",children:g(v.format)}),(0,$t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$t.jsx)("$t",{className:`text-sm truncate transition-colors ${a===v.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:v.title}),v.description&&(0,$t.jsx)("$t",{className:"text-xs text-muted-foreground truncate mt-0.5",children:v.description})]}),v.tags&&v.tags.length>0&&(0,$t.jsx)("div",{className:"flex-shrink-0",children:(0,$t.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:v.tags[0]})})]},v.id)),o&&Object.entries(o).map(([v,x])=>(0,$t.jsx)(Tt,{label:v,documents:x.documents,children:x.children,level:r+1,onDocumentClick:n,selectedDocumentId:a,showDocumentCount:i},v))]})})]})}function un({documents:e,menuConfig:t,onDocumentClick:o,onDocumentShare:r,onDocumentUpdate:n,selectedDocumentId:a,className:i,editable:s=!0}){let[f,S]=(0,de.useState)(""),[R,g]=(0,de.useState)(null),[I,v]=(0,de.useState)(e);(0,de.useEffect)(()=>{v(e)},[e]),(0,de.useEffect)(()=>{if(R?.id){let b=I.find(P=>P.id===R.id);b&&g(b)}},[I]);let x=(0,de.useMemo)(()=>f?I.filter(b=>b.title.toLowerCase().includes(f.toLowerCase())||b.description?.toLowerCase().includes(f.toLowerCase())||b.tags?.some(P=>P.toLowerCase().includes(f.toLowerCase()))||Object.values(b.metadata||{}).some(P=>String(P).toLowerCase().includes(f.toLowerCase()))):I,[I,f]),H=(0,de.useMemo)(()=>{let b=(P,F)=>{if(F.length===0)return{};let[M,...B]=F;return P.reduce((C,c)=>{let A=c.metadata?.[M]||"Uncategorized",L=String(A);if(C[L]||(C[L]={documents:[],children:{}}),B.length===0)C[L].documents.push(c);else{let Y=b([c],B),E=Object.keys(Y)[0];E&&(C[L].children||(C[L].children={}),C[L].children[E]?C[L].children[E].documents.push(...Y[E].documents):C[L].children[E]=Y[E])}return C},{})};return b(x,t.groupBy)},[x,t.groupBy]),h=b=>{g(b),o?.(b)};return(0,$t.jsxs)("div",{className:`flex h-full ${i||""}`,children:[(0,$t.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,$t.jsx)("div",{className:"$t-6 border-b border-border",children:(0,$t.jsxs)("div",{className:"relative",children:[(0,$t.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,$t.jsx)(ce.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,$t.jsx)(ie,{placeholder:"Search knowledge base...",value:f,onChange:b=>S(b.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,$t.jsx)(nt,{className:"h-[calc(100%-100px)]",children:(0,$t.jsx)("div",{className:"$t-4 space-y-3",children:t.groupBy.length===0?(0,$t.jsx)($t.Fragment,{children:(0,$t.jsx)(Tt,{label:"Document",documents:x,level:0,onDocumentClick:h,selectedDocumentId:a,showDocumentCount:t.showDocumentCount},"Document")}):(0,$t.jsxs)($t.Fragment,{children:[Object.entries(H).map(([b,P])=>(0,$t.jsx)(Tt,{label:b,documents:P.documents,children:P.children,level:0,onDocumentClick:h,selectedDocumentId:a,showDocumentCount:t.showDocumentCount},b)),Object.keys(H).length===0&&(0,$t.jsxs)(Re.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,$t.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,$t.jsx)(ce.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,$t.jsx)("$t",{className:"text-sm font-medium",children:"No documents found"}),(0,$t.jsx)("$t",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),(0,$t.jsx)("div",{className:"flex-1 bg-background overflow-scroll",children:R?(0,$t.jsx)(Xo,{document:R,onDocumentUpdate:n,editable:s}):(0,$t.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,$t.jsxs)(Re.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,$t.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,$t.jsx)(ce.FileText,{className:"h-10 w-10 text-primary"})}),(0,$t.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,$t.jsx)("$t",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}0&&(module.exports={KnowledgeBrowser});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-PE5L5LZL.mjs";import"../../chunk-V4W2JDQB.mjs";import"../../chunk-TZCRIKIJ.mjs";import"../../chunk-N6CZEXLZ.mjs";import"../../chunk-M456UF2N.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as KnowledgeBrowser};
2
+ "use strict";import{a}from"../../chunk-A2RRQOKB.mjs";import"../../chunk-ZTEV75OU.mjs";import"../../chunk-TZCRIKIJ.mjs";import"../../chunk-N6CZEXLZ.mjs";import"../../chunk-M456UF2N.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as KnowledgeBrowser};
@@ -1 +1 @@
1
- import{a}from"../../chunk-QILFMWE5.mjs";import"../../chunk-MFUZNS7C.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-SRUG246N.mjs";import"../../chunk-4CU7D3X2.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-LVK4QE5D.mjs";import"../../chunk-NSMXJCXE.mjs";import"../../chunk-LKGCU7H6.mjs";import"../../chunk-5WV5ZFEP.mjs";import"../../chunk-KX2NCNCS.mjs";import"../../chunk-LEC6GEWS.mjs";import"../../chunk-X3JZSN3W.mjs";import"../../chunk-XGIYNUGC.mjs";import"../../chunk-2BR55L74.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-LXZAOORS.mjs";import"../../chunk-MGYV46AJ.mjs";import"../../chunk-CGDLOY7W.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-BG7QXNV5.mjs";import"../../chunk-BVFUCOCP.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as SectionHeading};
1
+ import{a}from"../../chunk-M7NV6EFH.mjs";import"../../chunk-N3B3XNV3.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-SRUG246N.mjs";import"../../chunk-4CU7D3X2.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-LVK4QE5D.mjs";import"../../chunk-NSMXJCXE.mjs";import"../../chunk-LKGCU7H6.mjs";import"../../chunk-5WV5ZFEP.mjs";import"../../chunk-KX2NCNCS.mjs";import"../../chunk-LEC6GEWS.mjs";import"../../chunk-XGIYNUGC.mjs";import"../../chunk-X3JZSN3W.mjs";import"../../chunk-2BR55L74.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-LXZAOORS.mjs";import"../../chunk-MGYV46AJ.mjs";import"../../chunk-CGDLOY7W.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-BG7QXNV5.mjs";import"../../chunk-BVFUCOCP.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as SectionHeading};
@@ -1 +1 @@
1
- import{a as h}from"../../chunk-22LHS2J6.mjs";import{a}from"../../chunk-IC2ABKAM.mjs";import{a as b}from"../../chunk-FHMQVAKQ.mjs";import"../../chunk-55EX54R7.mjs";import{a as f}from"../../chunk-6C4WESLL.mjs";import{a as g}from"../../chunk-LAQ3QAUW.mjs";import{a as e}from"../../chunk-PDY7JYY3.mjs";import{a as d}from"../../chunk-L3BLBPSR.mjs";import{a as c}from"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{c as BrandLogo,f as Footer,g as Header,d as HeaderDesktop,e as HeaderMobile,h as RelatedPagesMenu,a as SimpleHeader,b as VideoHeader};
1
+ import{a as h}from"../../chunk-22LHS2J6.mjs";import{a}from"../../chunk-IC2ABKAM.mjs";import{a as b}from"../../chunk-FHMQVAKQ.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-55EX54R7.mjs";import{a as f}from"../../chunk-6C4WESLL.mjs";import{a as g}from"../../chunk-LAQ3QAUW.mjs";import{a as e}from"../../chunk-PDY7JYY3.mjs";import{a as d}from"../../chunk-L3BLBPSR.mjs";import{a as c}from"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{c as BrandLogo,f as Footer,g as Header,d as HeaderDesktop,e as HeaderMobile,h as RelatedPagesMenu,a as SimpleHeader,b as VideoHeader};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../../chunk-MGSTQLZC.mjs";import"../../../chunk-MFUZNS7C.mjs";import"../../../chunk-O5BAW5XQ.mjs";import"../../../chunk-2QZUKVBA.mjs";import"../../../chunk-SRUG246N.mjs";import"../../../chunk-4CU7D3X2.mjs";import"../../../chunk-JYL3XIJX.mjs";import"../../../chunk-LVK4QE5D.mjs";import"../../../chunk-NSMXJCXE.mjs";import"../../../chunk-LKGCU7H6.mjs";import"../../../chunk-5WV5ZFEP.mjs";import"../../../chunk-KX2NCNCS.mjs";import"../../../chunk-LEC6GEWS.mjs";import"../../../chunk-X3JZSN3W.mjs";import"../../../chunk-XGIYNUGC.mjs";import"../../../chunk-2BR55L74.mjs";import"../../../chunk-TEB67NCD.mjs";import"../../../chunk-KFCSVEI6.mjs";import"../../../chunk-LXZAOORS.mjs";import"../../../chunk-MGYV46AJ.mjs";import"../../../chunk-CGDLOY7W.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-BG7QXNV5.mjs";import"../../../chunk-BVFUCOCP.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-WISCWNL2.mjs";import"../../../chunk-FVM5SQT2.mjs";import"../../../chunk-EGEO3FNE.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as HighImpactHero};
2
+ "use strict";import{a}from"../../../chunk-255P6K5W.mjs";import"../../../chunk-N3B3XNV3.mjs";import"../../../chunk-O5BAW5XQ.mjs";import"../../../chunk-2QZUKVBA.mjs";import"../../../chunk-SRUG246N.mjs";import"../../../chunk-4CU7D3X2.mjs";import"../../../chunk-JYL3XIJX.mjs";import"../../../chunk-LVK4QE5D.mjs";import"../../../chunk-NSMXJCXE.mjs";import"../../../chunk-LKGCU7H6.mjs";import"../../../chunk-5WV5ZFEP.mjs";import"../../../chunk-KX2NCNCS.mjs";import"../../../chunk-LEC6GEWS.mjs";import"../../../chunk-XGIYNUGC.mjs";import"../../../chunk-X3JZSN3W.mjs";import"../../../chunk-2BR55L74.mjs";import"../../../chunk-TEB67NCD.mjs";import"../../../chunk-KFCSVEI6.mjs";import"../../../chunk-LXZAOORS.mjs";import"../../../chunk-MGYV46AJ.mjs";import"../../../chunk-CGDLOY7W.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-BG7QXNV5.mjs";import"../../../chunk-BVFUCOCP.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-WISCWNL2.mjs";import"../../../chunk-FVM5SQT2.mjs";import"../../../chunk-EGEO3FNE.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as HighImpactHero};
@@ -1 +1 @@
1
- import{a}from"../../../chunk-6EKGV4I2.mjs";import"../../../chunk-MFUZNS7C.mjs";import"../../../chunk-O5BAW5XQ.mjs";import"../../../chunk-2QZUKVBA.mjs";import"../../../chunk-SRUG246N.mjs";import"../../../chunk-4CU7D3X2.mjs";import"../../../chunk-JYL3XIJX.mjs";import"../../../chunk-LVK4QE5D.mjs";import"../../../chunk-NSMXJCXE.mjs";import"../../../chunk-LKGCU7H6.mjs";import"../../../chunk-5WV5ZFEP.mjs";import"../../../chunk-KX2NCNCS.mjs";import"../../../chunk-LEC6GEWS.mjs";import"../../../chunk-X3JZSN3W.mjs";import"../../../chunk-XGIYNUGC.mjs";import"../../../chunk-2BR55L74.mjs";import"../../../chunk-TEB67NCD.mjs";import"../../../chunk-KFCSVEI6.mjs";import"../../../chunk-LXZAOORS.mjs";import"../../../chunk-MGYV46AJ.mjs";import"../../../chunk-CGDLOY7W.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-BG7QXNV5.mjs";import"../../../chunk-BVFUCOCP.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-WISCWNL2.mjs";import"../../../chunk-FVM5SQT2.mjs";import"../../../chunk-EGEO3FNE.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as LowImpactHero};
1
+ import{a}from"../../../chunk-HKGW6JI2.mjs";import"../../../chunk-N3B3XNV3.mjs";import"../../../chunk-O5BAW5XQ.mjs";import"../../../chunk-2QZUKVBA.mjs";import"../../../chunk-SRUG246N.mjs";import"../../../chunk-4CU7D3X2.mjs";import"../../../chunk-JYL3XIJX.mjs";import"../../../chunk-LVK4QE5D.mjs";import"../../../chunk-NSMXJCXE.mjs";import"../../../chunk-LKGCU7H6.mjs";import"../../../chunk-5WV5ZFEP.mjs";import"../../../chunk-KX2NCNCS.mjs";import"../../../chunk-LEC6GEWS.mjs";import"../../../chunk-XGIYNUGC.mjs";import"../../../chunk-X3JZSN3W.mjs";import"../../../chunk-2BR55L74.mjs";import"../../../chunk-TEB67NCD.mjs";import"../../../chunk-KFCSVEI6.mjs";import"../../../chunk-LXZAOORS.mjs";import"../../../chunk-MGYV46AJ.mjs";import"../../../chunk-CGDLOY7W.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-BG7QXNV5.mjs";import"../../../chunk-BVFUCOCP.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-WISCWNL2.mjs";import"../../../chunk-FVM5SQT2.mjs";import"../../../chunk-EGEO3FNE.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as LowImpactHero};