efficient-shell 8.35.0 → 8.38.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 (194) hide show
  1. package/README.md +11 -0
  2. package/dist/{Browser-ERZNOFN7.js → Browser-5TOAZTHJ.js} +14 -14
  3. package/dist/Calculator-I4P2BWR7.js +29 -0
  4. package/dist/CurrencyConverter-K2IIOVHM.js +21 -0
  5. package/dist/{Documents-POWS4L44.js → Documents-IYGZXCU2.js} +14 -14
  6. package/dist/Files-EMPEGBMQ.js +87 -0
  7. package/dist/Notepad-VYJZ2XA4.js +25 -0
  8. package/dist/PdfViewer-KJCJ6EPG.js +1 -0
  9. package/dist/{PomodoroTimer-GLYNCO4H.js → PomodoroTimer-BEVXP5KG.js} +28 -28
  10. package/dist/{Preview-WZDFVBNJ.js → Preview-AVQQI32Z.js} +36 -36
  11. package/dist/Sidebar-6I4FC5AK.js +43 -0
  12. package/dist/Spreadsheet-EM6OOJ6I.js +37 -0
  13. package/dist/Stock-YJNQMFSV.js +16 -0
  14. package/dist/{Weather-UKLNJ3VF.js → Weather-XDT4ZEHN.js} +19 -19
  15. package/dist/{WorldClock-OZ3I7D2M.js → WorldClock-7PTVRQ2A.js} +6 -6
  16. package/dist/ai/index.d.ts +118 -3
  17. package/dist/ai/index.js +53 -43
  18. package/dist/ai.css +1 -1
  19. package/dist/apps/index.js +1 -1
  20. package/dist/bin/media-host-check.js +1 -1
  21. package/dist/bin/ui-check.js +1 -1
  22. package/dist/{chunk-ZRHQGFO5.js → chunk-3CST4ZDP.js} +2 -2
  23. package/dist/chunk-454DAGYG.js +19 -0
  24. package/dist/{chunk-TRD22FC7.js → chunk-45S6M77O.js} +6 -6
  25. package/dist/chunk-4AJRHTTB.js +1 -0
  26. package/dist/chunk-4IVT244O.js +8 -0
  27. package/dist/{chunk-G2MJTE6X.js → chunk-4OFD6ICH.js} +10 -10
  28. package/dist/{chunk-5N5DBTTF.js → chunk-4SZDP3JF.js} +12 -12
  29. package/dist/{chunk-FMKTVZAO.js → chunk-4Y4PWKMM.js} +1 -1
  30. package/dist/{chunk-DIN3EFOM.js → chunk-5BZMSSOV.js} +8 -8
  31. package/dist/{chunk-64ZHCEZN.js → chunk-5TFTSYOD.js} +1 -1
  32. package/dist/{chunk-GK3QH63P.js → chunk-63EK6S3W.js} +1 -1
  33. package/dist/{chunk-ECCUEG3J.js → chunk-6BCFVOG7.js} +1 -1
  34. package/dist/{chunk-M2KV4WKR.js → chunk-6GWZ5UPX.js} +1 -1
  35. package/dist/{chunk-EBC4XFL2.js → chunk-6SMQNPWS.js} +1 -1
  36. package/dist/{chunk-EW6FRPFJ.js → chunk-6WWAQC5V.js} +1 -1
  37. package/dist/{chunk-TTY62G5D.js → chunk-7C56GLLI.js} +16 -16
  38. package/dist/{chunk-MICWRC72.js → chunk-7MSFHQAY.js} +7 -7
  39. package/dist/{chunk-XZL3HCWH.js → chunk-7OCNF4AI.js} +1 -1
  40. package/dist/chunk-AAW27HJY.js +3 -0
  41. package/dist/{chunk-WME5DFB6.js → chunk-BIJ7ADTZ.js} +1 -1
  42. package/dist/{chunk-SEXLHFMR.js → chunk-BMPBVI7P.js} +1 -1
  43. package/dist/{chunk-TOVHLONK.js → chunk-BT3XDH3L.js} +4 -4
  44. package/dist/{chunk-JVIOAZHW.js → chunk-BUGAWNOC.js} +4 -4
  45. package/dist/{chunk-R4C3GGCS.js → chunk-BVW5U7QQ.js} +3 -3
  46. package/dist/{chunk-AF7R2MV4.js → chunk-CKZ6ZDU5.js} +1 -1
  47. package/dist/{chunk-IHEEJO5S.js → chunk-CPK7JTN3.js} +1 -1
  48. package/dist/{chunk-EVB35JP5.js → chunk-DOCUM3K7.js} +1 -1
  49. package/dist/{chunk-FKZEGBLK.js → chunk-DXTKNHWG.js} +11 -11
  50. package/dist/{chunk-2U2GJCSP.js → chunk-EL2RLUT6.js} +7 -7
  51. package/dist/{chunk-4GVH4ZUH.js → chunk-ET2EF5CI.js} +1 -1
  52. package/dist/{chunk-MC43PRTL.js → chunk-EXWGPXOS.js} +1 -1
  53. package/dist/{chunk-2SHYR3RA.js → chunk-FSPFV4MI.js} +9 -4
  54. package/dist/{chunk-YBB56N6X.js → chunk-G63BCOQ6.js} +1 -1
  55. package/dist/{chunk-DG2WU3BU.js → chunk-GSBIJLTD.js} +2 -2
  56. package/dist/{chunk-ZXSMSVLU.js → chunk-I7HDD4IM.js} +1 -1
  57. package/dist/chunk-J47HXHSL.js +8 -0
  58. package/dist/{chunk-2WL3Q7VW.js → chunk-J7FZAOKT.js} +16 -16
  59. package/dist/{chunk-RB2F65YJ.js → chunk-JPRJQ6B7.js} +11 -11
  60. package/dist/{chunk-S4IW5OL3.js → chunk-K52WWA5G.js} +1 -1
  61. package/dist/{chunk-M2LLVSBR.js → chunk-KWX6NAOR.js} +1 -1
  62. package/dist/{chunk-OFKWTOXK.js → chunk-L7FDYGGF.js} +3 -3
  63. package/dist/{chunk-6ANFVX4M.js → chunk-L7IKTEOC.js} +11 -11
  64. package/dist/{chunk-EZY4CO4A.js → chunk-LGAN7DNC.js} +5 -5
  65. package/dist/{chunk-PCKYNZ5Y.js → chunk-LGLZTJ2W.js} +6 -6
  66. package/dist/{chunk-WKRFD4E4.js → chunk-LSISFKKS.js} +8 -8
  67. package/dist/{chunk-7ACSSYEZ.js → chunk-MEJK6PBN.js} +1 -1
  68. package/dist/{chunk-4RNF6MNW.js → chunk-MGXE75N5.js} +2 -2
  69. package/dist/{chunk-IUCIYWTT.js → chunk-NDO24PK6.js} +8 -8
  70. package/dist/{chunk-XDDTFV32.js → chunk-NESJOC3R.js} +1 -1
  71. package/dist/{chunk-BYCOB6WT.js → chunk-NGBT7AHL.js} +6 -6
  72. package/dist/chunk-NLWS7HMX.js +29 -0
  73. package/dist/chunk-O4Q475GF.js +1 -0
  74. package/dist/chunk-PCQPV6MS.js +6 -0
  75. package/dist/{chunk-CCPNMYCK.js → chunk-Q23EHOXW.js} +1 -1
  76. package/dist/{chunk-ACW3J77L.js → chunk-Q7HN6T3H.js} +1 -1
  77. package/dist/{chunk-NUSSZJF2.js → chunk-REVC6YPT.js} +5 -5
  78. package/dist/{chunk-2AHHM4SK.js → chunk-RJ4KZGAT.js} +56 -56
  79. package/dist/{chunk-EM6BEHAD.js → chunk-RWGSMZGS.js} +1 -1
  80. package/dist/{chunk-4MO375G3.js → chunk-S2OIRC5H.js} +3 -3
  81. package/dist/chunk-SG3ILR7W.js +4 -0
  82. package/dist/{chunk-FTKKGGOQ.js → chunk-SR4XAYLC.js} +1 -1
  83. package/dist/{chunk-RPJ2GC3K.js → chunk-SRKSGUGT.js} +20 -20
  84. package/dist/{chunk-2F7ZOMKK.js → chunk-SZIENHKR.js} +1 -1
  85. package/dist/{chunk-UZ3CZQA4.js → chunk-TGLHJS3M.js} +1 -1
  86. package/dist/{chunk-O2YAB6WK.js → chunk-TIQKDAON.js} +6 -6
  87. package/dist/{chunk-TANR67XF.js → chunk-TVJRENCQ.js} +9 -9
  88. package/dist/{chunk-SWHRP52Y.js → chunk-TZMJEOZA.js} +1 -1
  89. package/dist/{chunk-MY755PTJ.js → chunk-UZMZ2EDW.js} +1 -1
  90. package/dist/{chunk-S4J4B7LY.js → chunk-WCKZHEFC.js} +5 -5
  91. package/dist/{chunk-5OX6KXWY.js → chunk-WIW2547G.js} +1 -1
  92. package/dist/{chunk-AZU7YOES.js → chunk-WRORJNS5.js} +8 -8
  93. package/dist/{chunk-XB2YPUKR.js → chunk-XLD53X4P.js} +8 -8
  94. package/dist/{chunk-4HCRZHIX.js → chunk-XSPDPN5O.js} +1 -1
  95. package/dist/{chunk-TZHWF3P5.js → chunk-Y6IQYQYN.js} +2 -2
  96. package/dist/chunk-YALPQIBR.js +7 -0
  97. package/dist/{chunk-HAIMJAI4.js → chunk-ZCHBOAPA.js} +2 -2
  98. package/dist/{chunk-M2AIC7IK.js → chunk-ZEKM6HAA.js} +2 -2
  99. package/dist/{chunk-5YELPBUT.js → chunk-ZK2SULCA.js} +1 -1
  100. package/dist/{chunk-BHMUOWAE.js → chunk-ZSFUNXRD.js} +4 -4
  101. package/dist/{chunk-JDKRQG7X.js → chunk-ZWAVSUWT.js} +2 -2
  102. package/dist/data/ListLoadError.js +1 -1
  103. package/dist/format/index.js +1 -1
  104. package/dist/forms/BorderInput.js +1 -1
  105. package/dist/forms/BrandAssetEditor.js +1 -1
  106. package/dist/forms/Calendar.js +1 -1
  107. package/dist/forms/ColorPicker.js +1 -1
  108. package/dist/forms/ComposerAttachments.js +1 -1
  109. package/dist/forms/CornersInput.js +1 -1
  110. package/dist/forms/DatePicker.js +1 -1
  111. package/dist/forms/DateRangePicker.js +1 -1
  112. package/dist/forms/DisplayChips.js +1 -1
  113. package/dist/forms/FilePicker.js +1 -1
  114. package/dist/forms/IconPicker.js +1 -1
  115. package/dist/forms/InputNumber.js +1 -1
  116. package/dist/forms/LinkPicker.js +1 -1
  117. package/dist/forms/MediaLibrary.js +1 -1
  118. package/dist/forms/MediaUploadField.js +1 -1
  119. package/dist/forms/MediaUploadGrid.js +1 -1
  120. package/dist/forms/MediaUsedInList.js +1 -1
  121. package/dist/forms/PositionInput.js +1 -1
  122. package/dist/forms/Select.js +1 -1
  123. package/dist/forms/SidesInput.js +1 -1
  124. package/dist/forms/Slider.js +1 -1
  125. package/dist/forms/Snippet.js +1 -1
  126. package/dist/forms/SplitButton.js +1 -1
  127. package/dist/forms/TagInput.js +1 -1
  128. package/dist/forms/TextToolbar.js +1 -1
  129. package/dist/forms/WidthsBar.js +1 -1
  130. package/dist/forms/mediaLibraryMenu.js +1 -1
  131. package/dist/forms/textAlign.js +1 -1
  132. package/dist/icons/index.js +1 -1
  133. package/dist/index.js +169 -169
  134. package/dist/map/index.js +3 -3
  135. package/dist/markdown/index.js +1 -1
  136. package/dist/page-tabs/index.js +5 -5
  137. package/dist/pdf/index.js +1 -1
  138. package/dist/shell/Accordion.js +1 -1
  139. package/dist/shell/AppUpdateBanner.js +1 -1
  140. package/dist/shell/Banner.js +1 -1
  141. package/dist/shell/Breadcrumbs.js +1 -1
  142. package/dist/shell/ColoredBadge.js +1 -1
  143. package/dist/shell/ConfirmDialog.js +1 -1
  144. package/dist/shell/ContextMenu.js +1 -1
  145. package/dist/shell/Dialog.d.ts +2 -2
  146. package/dist/shell/Dialog.js +1 -1
  147. package/dist/shell/Drawer.d.ts +2 -2
  148. package/dist/shell/Drawer.js +1 -1
  149. package/dist/shell/DropdownMenu.js +1 -1
  150. package/dist/shell/EmptyState.js +1 -1
  151. package/dist/shell/HelpCenter.js +1 -1
  152. package/dist/shell/ImageLightbox.js +1 -1
  153. package/dist/shell/LanguageSelect.js +1 -1
  154. package/dist/shell/Markdown.js +1 -1
  155. package/dist/shell/PageHeader.js +1 -1
  156. package/dist/shell/PopupMenu.js +1 -1
  157. package/dist/shell/ProductionTimeline.js +1 -1
  158. package/dist/shell/Result.js +1 -1
  159. package/dist/shell/SearchableSelect.js +1 -1
  160. package/dist/shell/SettingReset.js +1 -1
  161. package/dist/shell/SettingRow.js +1 -1
  162. package/dist/shell/SidebarLayout.js +1 -1
  163. package/dist/shell/SidebarNav.js +1 -1
  164. package/dist/shell/SortableList.js +1 -1
  165. package/dist/shell/StepChain.js +1 -1
  166. package/dist/shell/Stepper.js +1 -1
  167. package/dist/shell/TopNav.js +1 -1
  168. package/dist/shell/Tree.js +1 -1
  169. package/dist/telemetry/index.js +1 -1
  170. package/dist/templates/ChatTemplate.js +1 -1
  171. package/dist/templates/CheckoutTemplate.js +1 -1
  172. package/dist/templates/DataTablePage.js +1 -1
  173. package/dist/templates/EmailTemplate.js +1 -1
  174. package/dist/templates/FormLayoutPage.js +1 -1
  175. package/dist/ui/index.js +1 -1
  176. package/dist/version.js +1 -1
  177. package/package.json +1 -1
  178. package/dist/Calculator-NXIOZMML.js +0 -29
  179. package/dist/CurrencyConverter-57WUTV4H.js +0 -21
  180. package/dist/Files-O44UH6ZF.js +0 -87
  181. package/dist/Notepad-66ZCGUHC.js +0 -25
  182. package/dist/PdfViewer-KSLOYXMD.js +0 -1
  183. package/dist/Sidebar-QQFJJWE2.js +0 -43
  184. package/dist/Spreadsheet-OYAVNRCT.js +0 -37
  185. package/dist/Stock-CIHUZOQS.js +0 -16
  186. package/dist/chunk-2PWZNFFP.js +0 -19
  187. package/dist/chunk-5FCEBKT2.js +0 -7
  188. package/dist/chunk-BZMZTPS6.js +0 -1
  189. package/dist/chunk-CAMLFCGY.js +0 -29
  190. package/dist/chunk-HMHL27AU.js +0 -6
  191. package/dist/chunk-JBQWR4SX.js +0 -8
  192. package/dist/chunk-NKZNPYDB.js +0 -3
  193. package/dist/chunk-QPWD5CCS.js +0 -8
  194. package/dist/chunk-TW6WYYBC.js +0 -3
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import"../chunk-KJRYEKQP.js";export{EmailTemplate}from"../chunk-4HCRZHIX.js";export{ErrorBoundary}from"../chunk-BSNWVZHW.js";export{ErrorPage}from"../chunk-IHQX4GYD.js";export{FormLayoutPage}from"../chunk-EM6BEHAD.js";export{GalleryTemplate}from"../chunk-TW7TA2AB.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-MVP6Q6KV.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-P42YNSKI.js";export{ChatTemplate}from"../chunk-CCPNMYCK.js";export{CheckoutTemplate}from"../chunk-7ACSSYEZ.js";export{DashboardTemplate}from"../chunk-L3G3YHVN.js";export{DataTablePage}from"../chunk-ZXSMSVLU.js";export{TopNav}from"../chunk-IHEEJO5S.js";export{Stepper}from"../chunk-ACW3J77L.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-SXSMIMFY.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-CZ25A5RS.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-PCKYNZ5Y.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-5YELPBUT.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-TOVHLONK.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-D2AUUIKG.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-6ANFVX4M.js";export{ResizeHandle}from"../chunk-KZHPX4FM.js";export{SettingReset}from"../chunk-WME5DFB6.js";export{SettingRow}from"../chunk-JVIOAZHW.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-EVB35JP5.js";export{MetricBar}from"../chunk-BI6ZLD4X.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-RYBJ6MMM.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-BOBUSE33.js";import"../chunk-SURSVJA2.js";export{TimelineTrack}from"../chunk-DZNG34DC.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-YDEIXM2A.js";export{PageHeader}from"../chunk-AF7R2MV4.js";export{EmptyValue}from"../chunk-64WSMLXG.js";export{FloatingBar}from"../chunk-EIUCHQI2.js";export{GlobalSearch,openGlobalSearch}from"../chunk-K7KQDPLW.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-IUCIYWTT.js";export{IconRail,IconRailButton}from"../chunk-UVUBZL7K.js";import"../chunk-FQEALPZJ.js";export{Divider}from"../chunk-DFOFEBYX.js";export{EditableGrid}from"../chunk-2RBWQVDC.js";export{Avatar,AvatarGroup}from"../chunk-MMFJBWJC.js";export{BudgetBar,budgetState}from"../chunk-MEYYQC43.js";export{Card,StatCard}from"../chunk-VU6VPKM3.js";export{ContainerFillChart}from"../chunk-EZ3BQ6PK.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-QQCHLRKG.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-4MO375G3.js";export{CountBadge}from"../chunk-MAOJENIB.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-FTKKGGOQ.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-5DFKPSJQ.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{TagInput}from"../chunk-JBQWR4SX.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-HMHL27AU.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-64ZHCEZN.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-2UXAI77F.js";export{WidthsBar}from"../chunk-MICWRC72.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-XDDTFV32.js";export{Slider,SliderGroup}from"../chunk-S4J4B7LY.js";export{Snippet}from"../chunk-NUSSZJF2.js";export{SplitButton_default as SplitButton}from"../chunk-NKZNPYDB.js";export{Switch_default as Switch}from"../chunk-BWIX3YIH.js";export{NumericKeypad}from"../chunk-SBHFEWR6.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-ET32NQHX.js";export{PositionInput}from"../chunk-YBB56N6X.js";export{RadioGroup}from"../chunk-TZSPJIP4.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{IconPicker}from"../chunk-R4C3GGCS.js";export{LinkPicker,TextLinkField}from"../chunk-DIN3EFOM.js";export{SearchableSelect}from"../chunk-5N5DBTTF.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary}from"../chunk-CAMLFCGY.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-2U2GJCSP.js";import"../chunk-3PGK3VFS.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-M2KV4WKR.js";export{ImageLightbox,lightboxKind}from"../chunk-O2YAB6WK.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-QPWD5CCS.js";export{Breadcrumbs}from"../chunk-EBC4XFL2.js";export{mediaLibraryMenu}from"../chunk-2F7ZOMKK.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-DFDDRKIJ.js";import"../chunk-5PY4H4ZJ.js";export{DropdownMenu}from"../chunk-5FCEBKT2.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-WKRFD4E4.js";export{MediaUsedInList}from"../chunk-GK3QH63P.js";export{NativeSelect,Select_default as Select}from"../chunk-2PWZNFFP.js";import"../chunk-EO5RLFRX.js";import"../chunk-XZL3HCWH.js";export{CornersInput}from"../chunk-ZRHQGFO5.js";export{DatePicker_default as DatePicker}from"../chunk-XB2YPUKR.js";export{DateRangePicker,toISODate}from"../chunk-RPJ2GC3K.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-OFHCDTJM.js";export{DisplayChips}from"../chunk-BHMUOWAE.js";export{FilePicker_default as FilePicker}from"../chunk-TANR67XF.js";export{FormErrorSummary}from"../chunk-4VLKDANH.js";export{BORDER_LINE_STYLES,BorderInput,borderSides,borderStartEach}from"../chunk-OFKWTOXK.js";export{BrandAssetEditor}from"../chunk-TRD22FC7.js";export{MediaUploadField}from"../chunk-EZY4CO4A.js";export{ImageFocusPoint}from"../chunk-GATKJSGL.js";export{FormField}from"../chunk-MVQBVPWP.js";export{Segmented}from"../chunk-N6DTTOB6.js";import"../chunk-4G5VLI7E.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar,fromKey as fromDateKey,toKey as toDateKey}from"../chunk-RB2F65YJ.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-G2MJTE6X.js";export{Popover}from"../chunk-RNBM5JZI.js";export{InputNumber_default as InputNumber}from"../chunk-HAIMJAI4.js";export{useInSettingRow,useSettingAuto,useSettingRowName}from"../chunk-L65BESIE.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-BYCOB6WT.js";export{mediaFileName}from"../chunk-FMKTVZAO.js";export{TransferProgress}from"../chunk-S7VSXUKS.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-YDYDR72S.js";export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{AlignmentGrid}from"../chunk-7DKPJUGU.js";export{DataTable}from"../chunk-2NMT3Y5H.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-D7FT2PXG.js";export{ListFooter}from"../chunk-Q3OCGLW7.js";export{ListLoadError}from"../chunk-M2LLVSBR.js";export{Pagination}from"../chunk-M5P6A7KS.js";export{WaterfallChart}from"../chunk-2C6IG7LG.js";export{SankeyChart}from"../chunk-CRLSG5AY.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-ZNCU3UIW.js";export{StatTile}from"../chunk-Y5T257HX.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-JPP7UWQA.js";export{TreemapChart}from"../chunk-6NMDKOQA.js";export{squarify}from"../chunk-46BYGPGD.js";export{HeatmapChart}from"../chunk-H33Z4ZIY.js";export{HistogramChart}from"../chunk-IFDW5QW6.js";export{Meter}from"../chunk-E5ALJIXV.js";export{PieChart}from"../chunk-NID6MGGC.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-DITCVBR7.js";export{RadialBarChart}from"../chunk-4CFOKYVR.js";export{RangeChart}from"../chunk-ZNXBKFV7.js";export{RankedBars}from"../chunk-WYN5KVU4.js";export{ChordChart}from"../chunk-DODH46ZQ.js";import"../chunk-CDRXZBVR.js";export{FunnelChart}from"../chunk-X6PPP6NX.js";export{StepChain,StepChainItem}from"../chunk-MC43PRTL.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-ECCUEG3J.js";export{Textarea_default as Textarea}from"../chunk-7PCI6AUU.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ContextMenu,useContextMenu}from"../chunk-JDKRQG7X.js";export{Banner}from"../chunk-MY755PTJ.js";import"../chunk-TZHWF3P5.js";export{Input_default as Input}from"../chunk-GX2GSDJP.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-PF3ANJFI.js";export{IconButton_default as IconButton}from"../chunk-4CANQ3B3.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-BKZGI76S.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{TimeSeriesChart}from"../chunk-WSPO4N72.js";export{ChartBrush}from"../chunk-EYKUKN32.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-BRHIRE4D.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-ETF7LAYZ.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-Y4MI6NRI.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-SEXLHFMR.js";import"../chunk-5A7MWTXX.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-Y53KNQKL.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-2WL3Q7VW.js";export{Dialog}from"../chunk-TW6WYYBC.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-4NXMMWL6.js";export{ColoredBadge}from"../chunk-4GVH4ZUH.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-D323R2FT.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{VERSION}from"../chunk-BZMZTPS6.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-FKZEGBLK.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";import"../chunk-QR4RM7PO.js";export{Button_default as Button}from"../chunk-4IU5BSVE.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7U4RWXJ.js";export{Icon}from"../chunk-2SHYR3RA.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";import"../chunk-VH6GB73Q.js";export{LoadingSpinner,SpinnerRing}from"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-6KO5VTL7.js";export{Tooltip}from"../chunk-22S6LG6D.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{BoxPlotChart}from"../chunk-37CCKGHU.js";export{CandlestickChart}from"../chunk-JUGPTBMS.js";export{ChartTooltip}from"../chunk-P5BOTIJU.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-DTJRIWFR.js";export{CartesianPlot}from"../chunk-I4VD5D43.js";import"../chunk-MG7A3R75.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
2
+ import"../chunk-KJRYEKQP.js";export{EmailTemplate}from"../chunk-XSPDPN5O.js";export{ErrorBoundary}from"../chunk-BSNWVZHW.js";export{ErrorPage}from"../chunk-IHQX4GYD.js";export{FormLayoutPage}from"../chunk-RWGSMZGS.js";export{GalleryTemplate}from"../chunk-TW7TA2AB.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-MVP6Q6KV.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-P42YNSKI.js";export{ChatTemplate}from"../chunk-Q23EHOXW.js";export{CheckoutTemplate}from"../chunk-MEJK6PBN.js";export{DashboardTemplate}from"../chunk-L3G3YHVN.js";export{DataTablePage}from"../chunk-I7HDD4IM.js";export{TopNav}from"../chunk-CPK7JTN3.js";export{Stepper}from"../chunk-Q7HN6T3H.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-SXSMIMFY.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-CZ25A5RS.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-LGLZTJ2W.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-ZK2SULCA.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-BT3XDH3L.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-D2AUUIKG.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-L7IKTEOC.js";export{ResizeHandle}from"../chunk-KZHPX4FM.js";export{SettingReset}from"../chunk-BIJ7ADTZ.js";export{SettingRow}from"../chunk-BUGAWNOC.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-DOCUM3K7.js";export{MetricBar}from"../chunk-BI6ZLD4X.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-RYBJ6MMM.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-BOBUSE33.js";import"../chunk-SURSVJA2.js";export{TimelineTrack}from"../chunk-DZNG34DC.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-YDEIXM2A.js";export{PageHeader}from"../chunk-CKZ6ZDU5.js";export{EmptyValue}from"../chunk-64WSMLXG.js";export{FloatingBar}from"../chunk-EIUCHQI2.js";export{GlobalSearch,openGlobalSearch}from"../chunk-K7KQDPLW.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-NDO24PK6.js";export{IconRail,IconRailButton}from"../chunk-UVUBZL7K.js";import"../chunk-FQEALPZJ.js";export{Divider}from"../chunk-DFOFEBYX.js";export{EditableGrid}from"../chunk-2RBWQVDC.js";export{Avatar,AvatarGroup}from"../chunk-MMFJBWJC.js";export{BudgetBar,budgetState}from"../chunk-MEYYQC43.js";export{Card,StatCard}from"../chunk-VU6VPKM3.js";export{ContainerFillChart}from"../chunk-EZ3BQ6PK.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-QQCHLRKG.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-S2OIRC5H.js";export{CountBadge}from"../chunk-MAOJENIB.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-SR4XAYLC.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-5DFKPSJQ.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{WidthsBar}from"../chunk-7MSFHQAY.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{Snippet}from"../chunk-REVC6YPT.js";export{SplitButton_default as SplitButton}from"../chunk-AAW27HJY.js";export{Switch_default as Switch}from"../chunk-BWIX3YIH.js";export{TagInput}from"../chunk-4IVT244O.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-PCQPV6MS.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-5TFTSYOD.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-2UXAI77F.js";export{PositionInput}from"../chunk-G63BCOQ6.js";export{RadioGroup}from"../chunk-TZSPJIP4.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-NESJOC3R.js";export{Slider,SliderGroup}from"../chunk-WCKZHEFC.js";export{LinkPicker,TextLinkField}from"../chunk-5BZMSSOV.js";export{SearchableSelect}from"../chunk-4SZDP3JF.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary}from"../chunk-NLWS7HMX.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-EL2RLUT6.js";import"../chunk-3PGK3VFS.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-6GWZ5UPX.js";export{ImageLightbox,lightboxKind}from"../chunk-TIQKDAON.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-J47HXHSL.js";export{Breadcrumbs}from"../chunk-6SMQNPWS.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{mediaLibraryMenu}from"../chunk-SZIENHKR.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-DFDDRKIJ.js";import"../chunk-5PY4H4ZJ.js";export{DropdownMenu}from"../chunk-YALPQIBR.js";export{NativeSelect,Select_default as Select}from"../chunk-454DAGYG.js";import"../chunk-EO5RLFRX.js";import"../chunk-7OCNF4AI.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-LSISFKKS.js";export{MediaUsedInList}from"../chunk-63EK6S3W.js";export{NumericKeypad}from"../chunk-SBHFEWR6.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-ET32NQHX.js";export{FilePicker_default as FilePicker}from"../chunk-TVJRENCQ.js";export{FormErrorSummary}from"../chunk-4VLKDANH.js";export{IconPicker}from"../chunk-BVW5U7QQ.js";export{CornersInput}from"../chunk-3CST4ZDP.js";export{DatePicker_default as DatePicker}from"../chunk-XLD53X4P.js";export{DateRangePicker,toISODate}from"../chunk-SRKSGUGT.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-OFHCDTJM.js";export{DisplayChips}from"../chunk-ZSFUNXRD.js";export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{AlignmentGrid}from"../chunk-7DKPJUGU.js";export{BORDER_LINE_STYLES,BorderInput,borderSides,borderStartEach}from"../chunk-L7FDYGGF.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-4OFD6ICH.js";export{Popover}from"../chunk-RNBM5JZI.js";export{InputNumber_default as InputNumber}from"../chunk-ZCHBOAPA.js";export{useInSettingRow,useSettingAuto,useSettingRowName}from"../chunk-L65BESIE.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{BrandAssetEditor}from"../chunk-45S6M77O.js";export{MediaUploadField}from"../chunk-LGAN7DNC.js";export{FormField}from"../chunk-MVQBVPWP.js";export{ImageFocusPoint}from"../chunk-GATKJSGL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{Segmented}from"../chunk-N6DTTOB6.js";import"../chunk-4G5VLI7E.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar,fromKey as fromDateKey,toKey as toDateKey}from"../chunk-JPRJQ6B7.js";export{DataTable}from"../chunk-2NMT3Y5H.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-D7FT2PXG.js";export{ListFooter}from"../chunk-Q3OCGLW7.js";export{ListLoadError}from"../chunk-KWX6NAOR.js";export{Pagination}from"../chunk-M5P6A7KS.js";export{WaterfallChart}from"../chunk-2C6IG7LG.js";export{SankeyChart}from"../chunk-CRLSG5AY.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-ZNCU3UIW.js";export{StatTile}from"../chunk-Y5T257HX.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-JPP7UWQA.js";export{TreemapChart}from"../chunk-6NMDKOQA.js";export{squarify}from"../chunk-46BYGPGD.js";export{HeatmapChart}from"../chunk-H33Z4ZIY.js";export{HistogramChart}from"../chunk-IFDW5QW6.js";export{Meter}from"../chunk-E5ALJIXV.js";export{PieChart}from"../chunk-NID6MGGC.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-DITCVBR7.js";export{RadialBarChart}from"../chunk-4CFOKYVR.js";export{RangeChart}from"../chunk-ZNXBKFV7.js";export{RankedBars}from"../chunk-WYN5KVU4.js";export{ChordChart}from"../chunk-DODH46ZQ.js";import"../chunk-CDRXZBVR.js";export{FunnelChart}from"../chunk-X6PPP6NX.js";export{StepChain,StepChainItem}from"../chunk-EXWGPXOS.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-6BCFVOG7.js";export{Textarea_default as Textarea}from"../chunk-7PCI6AUU.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ContextMenu,useContextMenu}from"../chunk-ZWAVSUWT.js";export{Banner}from"../chunk-UZMZ2EDW.js";import"../chunk-Y6IQYQYN.js";export{Input_default as Input}from"../chunk-GX2GSDJP.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-NGBT7AHL.js";export{IconButton_default as IconButton}from"../chunk-4CANQ3B3.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-PF3ANJFI.js";export{mediaFileName}from"../chunk-4Y4PWKMM.js";export{TransferProgress}from"../chunk-S7VSXUKS.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-YDYDR72S.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-BKZGI76S.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{TimeSeriesChart}from"../chunk-WSPO4N72.js";export{ChartBrush}from"../chunk-EYKUKN32.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-BRHIRE4D.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-ETF7LAYZ.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-Y4MI6NRI.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-BMPBVI7P.js";import"../chunk-5A7MWTXX.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-Y53KNQKL.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-J7FZAOKT.js";export{Dialog}from"../chunk-SG3ILR7W.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";import"../chunk-4AJRHTTB.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-4NXMMWL6.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ColoredBadge}from"../chunk-ET2EF5CI.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{VERSION}from"../chunk-O4Q475GF.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-DXTKNHWG.js";import"../chunk-QR4RM7PO.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-D323R2FT.js";export{Button_default as Button}from"../chunk-4IU5BSVE.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7U4RWXJ.js";import"../chunk-VH6GB73Q.js";export{Icon}from"../chunk-FSPFV4MI.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-6KO5VTL7.js";export{Tooltip}from"../chunk-22S6LG6D.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{BoxPlotChart}from"../chunk-37CCKGHU.js";export{CandlestickChart}from"../chunk-JUGPTBMS.js";export{ChartTooltip}from"../chunk-P5BOTIJU.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-DTJRIWFR.js";export{CartesianPlot}from"../chunk-I4VD5D43.js";import"../chunk-MG7A3R75.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export{APP_VERSION,VERSION}from"./chunk-BZMZTPS6.js";
1
+ export{APP_VERSION,VERSION}from"./chunk-O4Q475GF.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "8.35.0",
3
+ "version": "8.38.0",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,29 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-5OX6KXWY.js";import{useWidgetSettings as n}from"./chunk-2AHHM4SK.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-SEXLHFMR.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-EW6FRPFJ.js";import"./chunk-2WL3Q7VW.js";import"./chunk-TW6WYYBC.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-4GVH4ZUH.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-KC3EX26K.js";import"./chunk-FKZEGBLK.js";import"./chunk-5QFPTDQF.js";import"./chunk-QR4RM7PO.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import{Icon as r}from"./chunk-2SHYR3RA.js";import"./chunk-J75ZT2JQ.js";import"./chunk-VH6GB73Q.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as l,useEffect as o}from"react";import{jsxs as s,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[j,N]=c(!1),[y,x]=c(""),[f,C]=c([]),[v,$]=c(!1),[W,E]=c(()=>e(h)),[R,T]=c(!1),[S,w]=c(W),K=i(null);n(l(()=>{w({...W}),T(!0)},[W]));const F=l(e=>{x(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),L=l(()=>{k("0"),d(null),g(null),N(!1)},[]),D=l((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),G=l(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=D(p,t,b);k(String(e)),d(e),C(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),N(!0)},[m,p,b,j,D]),J=l(()=>{if(null===p||!b)return;const e=parseFloat(m),t=D(p,e,b),n=`${p} ${b} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,D]),U=l(()=>{k(e=>String(parseFloat(e)/100))},[]),A=l(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);o(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?F(e.key):"."===e.key?F("."):"+"===e.key?G("+"):"-"===e.key?G("-"):"*"===e.key?G("×"):"/"===e.key?(e.preventDefault(),G("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&K.current?.contains(e.target)&&e.preventDefault(),J()):"Escape"===e.key?L():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&U())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[F,G,J,L,U]);const Q="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",B=`${Q} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,H=`${Q} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,M=`${Q} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,V=`${Q} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return s(a,{children:[
3
- /* @__PURE__ */s("div",{ref:K,className:"flex flex-col h-full",style:{opacity:W.activeOpacity/100,backdropFilter:W.activeBlur>0?`blur(${W.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */s("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:f.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${j?"":m}`}),
6
- /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
- /* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
9
- /* @__PURE__ */s("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */u("button",{onClick:L,className:M,children:"AC"}),
11
- /* @__PURE__ */u("button",{onClick:A,className:M,children:"+/−"}),
12
- /* @__PURE__ */u("button",{onClick:U,className:M,children:"%"}),
13
- /* @__PURE__ */u("button",{onClick:()=>G("÷"),className:`${H} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */u("button",{onClick:()=>F("7"),className:B,children:"7"}),
15
- /* @__PURE__ */u("button",{onClick:()=>F("8"),className:B,children:"8"}),
16
- /* @__PURE__ */u("button",{onClick:()=>F("9"),className:B,children:"9"}),
17
- /* @__PURE__ */u("button",{onClick:()=>G("×"),className:`${H} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */u("button",{onClick:()=>F("4"),className:B,children:"4"}),
19
- /* @__PURE__ */u("button",{onClick:()=>F("5"),className:B,children:"5"}),
20
- /* @__PURE__ */u("button",{onClick:()=>F("6"),className:B,children:"6"}),
21
- /* @__PURE__ */u("button",{onClick:()=>G("-"),className:`${H} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */u("button",{onClick:()=>F("1"),className:B,children:"1"}),
23
- /* @__PURE__ */u("button",{onClick:()=>F("2"),className:B,children:"2"}),
24
- /* @__PURE__ */u("button",{onClick:()=>F("3"),className:B,children:"3"}),
25
- /* @__PURE__ */u("button",{onClick:()=>G("+"),className:`${H} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */u("button",{onClick:()=>F("0"),className:`${B} col-span-2`,children:"0"}),
27
- /* @__PURE__ */u("button",{onClick:()=>F("."),className:B,children:"."}),
28
- /* @__PURE__ */u("button",{onClick:J,className:V,children:"="})]})]}),
29
- /* @__PURE__ */u(t,{open:R,onClose:()=>T(!1),title:"Calculator Settings",appearance:S,onAppearanceChange:w,onSave:()=>{E(S),localStorage.setItem(h,JSON.stringify(S)),T(!1)}})]})}export{m as default};
@@ -1,21 +0,0 @@
1
- import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-5OX6KXWY.js";import{useWidgetSettings as r}from"./chunk-2AHHM4SK.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-SEXLHFMR.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-EW6FRPFJ.js";import"./chunk-2WL3Q7VW.js";import"./chunk-TW6WYYBC.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-4GVH4ZUH.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-KC3EX26K.js";import"./chunk-FKZEGBLK.js";import"./chunk-5QFPTDQF.js";import"./chunk-QR4RM7PO.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-2SHYR3RA.js";import"./chunk-J75ZT2JQ.js";import"./chunk-VH6GB73Q.js";import{LoadingSpinner as n}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as a,useEffect as o}from"react";import{jsxs as c,Fragment as i,jsx as l}from"react/jsx-runtime";var m=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function g(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function k(t,e){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[t]={rates:e,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function f(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var j={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function N(){const[u,d]=s(f),[N,y]=s(()=>t(h)),[x,b]=s({}),[S,D]=s(!1),[v,C]=s(!1),[R,U]=s([]),[J,W]=s(N),[K,B]=s("USD"),[G,L]=s("CNY");r(a(()=>{U([...u]),W({...N}),C(!0)},[u,N])),o(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){D(!0);const r={};for(const e of t){const t=g(e);if(t)r[e]=t;else try{const t=await fetch(`https://open.er-api.com/v6/latest/${e}`),n=await t.json();n.rates&&(r[e]=n.rates,k(e,n.rates))}catch{}}e&&(b(r),D(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
2
- return c(i,{children:[
3
- /* @__PURE__ */l("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${N.activeOpacity/100})`,backdropFilter:N.activeBlur>0?`blur(${N.activeBlur}px)`:void 0},children:/* @__PURE__ */c("div",{className:"px-4 py-3 space-y-1",children:[S&&/* @__PURE__ */l(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=x[t]?.[e];/* @__PURE__ */
4
- return c("button",{onClick:()=>{const t=u.map((t,e)=>e===r?[t[1],t[0]]:t);d(t),localStorage.setItem(p,JSON.stringify(t))},className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0 w-full hover:bg-gray-100 rounded transition-colors cursor-pointer",children:[
5
- /* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
6
- /* @__PURE__ */l("span",{className:"text-base",children:j[t]||""}),
7
- /* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:t}),
8
- /* @__PURE__ */l("svg",{className:"h-3 w-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */l("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}),
9
- /* @__PURE__ */l("span",{className:"text-base",children:j[e]||""}),
10
- /* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:e})]}),
11
- /* @__PURE__ */l("div",{className:"text-base font-mono font-semibold text-gray-900 tabular-nums",children:null!=n?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:4}):"—"})]},`${t}-${e}-${r}`)})]})}),
12
- /* @__PURE__ */l(e,{open:v,onClose:()=>C(!1),title:"Currency Settings",appearance:J,onAppearanceChange:W,onSave:()=>{if(0===R.length)return;const t=R.slice(0,4);d(t),y(J),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(J)),C(!1)},children:/* @__PURE__ */c("div",{children:[
13
- /* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Currency Pairs ",
14
- /* @__PURE__ */c("span",{className:"text-2xs font-normal text-gray-400",children:["(",R.length,"/",4,")"]})]}),
15
- /* @__PURE__ */l("div",{className:"space-y-1 mb-2",children:R.map(([t,e],r)=>/* @__PURE__ */c("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
16
- /* @__PURE__ */c("span",{className:"text-sm",children:[j[t]||""," ",t," → ",j[e]||""," ",e]}),
17
- /* @__PURE__ */l("button",{onClick:()=>U(t=>t.filter((t,e)=>e!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),R.length<4?/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
18
- /* @__PURE__ */l("select",{value:K,onChange:t=>B(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
19
- /* @__PURE__ */l("span",{className:"text-gray-400",children:"→"}),
20
- /* @__PURE__ */l("select",{value:G,onChange:t=>L(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
21
- /* @__PURE__ */l("button",{onClick:()=>{K!==G&&R.length<4&&U(t=>[...t,[K,G]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */c("p",{className:"text-2xs text-gray-400 italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{N as default};
@@ -1,87 +0,0 @@
1
- import{openPreviewFile as e}from"./chunk-ZTB6EMC7.js";import{SidebarLayout as t}from"./chunk-PCKYNZ5Y.js";import"./chunk-QWK6DRSN.js";import"./chunk-KZHPX4FM.js";import{Breadcrumbs as r}from"./chunk-EBC4XFL2.js";import{formatBytes as a}from"./chunk-X2S2XDZI.js";import"./chunk-5OTS2G3M.js";import"./chunk-36BRD5J3.js";import{getFilesDemoTree as n}from"./chunk-UZ3CZQA4.js";import{AboutApp as s}from"./chunk-4RNF6MNW.js";import{peekFilesViewRequest as i,consumeFilesViewRequest as o,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as c,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as m,FolderGlyph as h,DesktopItemMiniIcon as p,desktopItemTypeLabel as u}from"./chunk-DG2WU3BU.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{useWindowManager as f,WindowTitle as x}from"./chunk-2AHHM4SK.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-SEXLHFMR.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-EW6FRPFJ.js";import{confirm as g,prompt as y}from"./chunk-2WL3Q7VW.js";import"./chunk-TW6WYYBC.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{toast_default as b}from"./chunk-4NXMMWL6.js";import"./chunk-4GVH4ZUH.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-KC3EX26K.js";import"./chunk-BZMZTPS6.js";import"./chunk-FKZEGBLK.js";import"./chunk-5QFPTDQF.js";import"./chunk-QR4RM7PO.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import{Icon as k}from"./chunk-2SHYR3RA.js";import"./chunk-J75ZT2JQ.js";import"./chunk-VH6GB73Q.js";import{LoadingSpinner as N}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import{TH_ONE_LINE as w}from"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as v,useEffect as j,useSyncExternalStore as $,useRef as C,useCallback as D}from"react";import{jsxs as L,jsx as T,Fragment as R}from"react/jsx-runtime";var E="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",W={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function S(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function M(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function F(){const F=E.replace(/\/$/,""),P=null!==n(),[U,A]=v("/"),[O,I]=v([]),[K,B]=v([]),[V,H]=v(null),[J,G]=v(!0),[Q,Z]=v(!1),[X,z]=v(null),[Y,_]=v(!1),[q,ee]=v(()=>{const e=i();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});j(()=>{o()},[]);const[te,re]=v([]);j(()=>{const e=()=>{o(),ee("trash")},t=e=>{o();const t=e.detail?.folderId;t&&ee({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(c,t),()=>{window.removeEventListener(l,e),window.removeEventListener(c,t)}},[]);const ae=$(d,m,m),ne="object"==typeof q?q.desktopFolderId:null,se=ne?ae?.folders.find(e=>e.id===ne)??null:null,ie=ne&&ae?.itemsByFolder[ne]||[];j(()=>{ne&&ae&&!ae.folders.some(e=>e.id===ne)&&ee("files")},[ne,ae]);const oe=C(0),le=C(null),{openPage:ce,openEntity:de}=f(),me=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>ce(e)}):"page"===t.entityType?ce(t.entityId):de(t.entityType,t.entityId,null,t.label)},he=D((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),pe=D(async()=>{try{const e=await he(`${F}/api/quota`);if(e.ok){const t=await e.json();z({used:t.used,limit:t.limit})}}catch{}},[he,F]),ue=D(async e=>{if(H(null),P){const t=function(e){const t=n();if(!t)return[];let r=t;for(const t of e.split("/").filter(Boolean)){const e=r.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];r=e.children}return r.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return I(t),A(e),Z(!1),G(!1),void("/"===e&&B(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}G(!0);try{const t=await he(`${F}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Failed to list (${t.status})`)}const r=await t.json(),a=r.entries||[];I(a),A(r.path||e),Z(!1),"/"===(r.path||e)&&B(a.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){Z(!0)}finally{G(!1)}pe()},[he,F,pe,P]),fe=D(async()=>{if(P)return re([]),void G(!1);G(!0),H(null);try{const e=await he(`${F}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void b.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();re(t.entries||[]),Z(!1)}catch{Z(!0)}finally{G(!1)}pe()},[he,F,pe,P]);j(()=>{"files"===q?ue(U):"trash"===q&&fe()},[U,q]);const xe=async e=>{const t=S(U,e.name);try{const r=await he(`${F}/api/file?path=${encodeURIComponent(t)}`);if(!r.ok)return void b.error(`Download failed (${r.status})`);const a=await r.blob(),n=URL.createObjectURL(a),s=document.createElement("a");s.href=n,s.download=e.name,s.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){b.error(e?.message||"Download failed")}},ge=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const r=await he(`${F}/api/upload?path=${encodeURIComponent(U)}`,{method:"POST",body:t});if(!r.ok){const t=await r.json().catch(()=>({}));if(413===r.status){const r=Math.max(0,(t.limit||0)-(t.used||0));b.error(`Quota exceeded — ${a(r)} free, ${e.name} is ${a(t.attempted||e.size)}`)}else b.error(`Upload ${e.name}: ${t.error||r.status}`)}}catch(t){b.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}ue(U)},ye=()=>{oe.current=0,_(!1)};if(j(()=>{const e=()=>ye();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),Q)/* @__PURE__ */
2
- return L("div",{className:"flex flex-col h-full bg-white",children:[
3
- /* @__PURE__ */T(x,{title:"Files - offline"}),
4
- /* @__PURE__ */T("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */L("div",{className:"max-w-md",children:[
5
- /* @__PURE__ */T(k,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
6
- /* @__PURE__ */T("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
7
- /* @__PURE__ */L("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
8
- /* @__PURE__ */T("span",{className:"font-mono",children:F}),". Make sure the server is running — see ",
9
- /* @__PURE__ */T("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
10
- /* @__PURE__ */T("button",{onClick:()=>ue(U),className:"px-3 h-8 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})})]});const be="/"===U?[]:U.split("/").filter(Boolean),ke=X&&X.limit>0?Math.min(100,Math.round(X.used/X.limit*100)):0,Ne=ke>90?"bg-red-500":ke>75?"bg-amber-500":"bg-blue-500",we=[{label:"My files",onClick:()=>A("/")},...be.map((e,t)=>({label:e,onClick:()=>A("/"+be.slice(0,t+1).join("/"))}))],ve=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),je=e=>/* @__PURE__ */T("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */T("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),$e=/* @__PURE__ */L("nav",{className:"p-2",children:[
11
- /* @__PURE__ */T("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Locations"}),
12
- /* @__PURE__ */L("button",{onClick:()=>{ee("files"),A("/")},className:ve("files"===q&&"/"===U),children:[je("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),K.map(e=>/* @__PURE__ */L("button",{onClick:()=>{ee("files"),A("/"+e)},className:ve("files"===q&&U==="/"+e),children:[je("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
13
- /* @__PURE__ */T("span",{className:"truncate",children:e})]},e)),!P&&/* @__PURE__ */L("button",{onClick:()=>ee("trash"),className:ve("trash"===q),children:[je("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),ae&&ae.folders.length>0&&/* @__PURE__ */L(R,{children:[
14
- /* @__PURE__ */T("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Desktop"}),ae.folders.map(e=>/* @__PURE__ */L("button",{onClick:()=>ee({desktopFolderId:e.id}),className:ve(ne===e.id),children:[
15
- /* @__PURE__ */T(h,{className:"h-4 w-4 shrink-0 text-amber-500"}),
16
- /* @__PURE__ */T("span",{className:"truncate",children:e.name}),e.itemCount>0&&/* @__PURE__ */T("span",{className:"ml-auto text-2xs text-gray-400 tabular-nums",children:e.itemCount})]},e.id))]})]});/* @__PURE__ */
17
- return L("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{P||"object"==typeof q||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),oe.current++,Y||_(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{oe.current>0&&oe.current--,0===oe.current&&_(!1)},onDrop:e=>{e.preventDefault(),ye(),P||"object"==typeof q||e.dataTransfer.files?.length&&ge(e.dataTransfer.files)},children:[
18
- /* @__PURE__ */T(x,{title:se?`Files - ${se.name}`:"Files"+("/"===U?"":" - "+U)}),
19
- /* @__PURE__ */T(s,{app:"files"}),
20
- /* @__PURE__ */T("input",{ref:le,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ge(e.target.files),le.current&&(le.current.value="")}}),
21
- /* @__PURE__ */T("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */T(t,{sidebar:$e,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */L("div",{className:"flex h-full min-w-0 flex-col",children:[
22
- /* @__PURE__ */L("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */L(R,"files"===q?{children:[
23
- /* @__PURE__ */T("button",{onClick:()=>A(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}(U)),disabled:"/"===U,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */T(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
24
- /* @__PURE__ */T("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */T(r,{items:we,maxItems:5})}),
25
- /* @__PURE__ */T("button",{onClick:()=>ue(U),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */T(k,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!P&&/* @__PURE__ */L(R,{children:[
26
- /* @__PURE__ */L("button",{onClick:()=>ee("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
27
- /* @__PURE__ */T(k,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
28
- /* @__PURE__ */L("button",{onClick:async()=>{const e=await y({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void b.error("Folder names cannot contain slashes");const t=S(U,e),r=await he(`${F}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!r.ok){const e=await r.json().catch(()=>({}));return void b.error(e.error||`Create folder failed (${r.status})`)}ue(U)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
29
- /* @__PURE__ */T(k,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
30
- /* @__PURE__ */L("button",{onClick:()=>le.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
31
- /* @__PURE__ */T(k,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===q?{children:[
32
- /* @__PURE__ */T("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */T(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
33
- /* @__PURE__ */T("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
34
- /* @__PURE__ */T("button",{onClick:fe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */T(k,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
35
- /* @__PURE__ */T("button",{onClick:async()=>{if(0===te.length)return;if(!await g({title:"Empty trash",message:`${te.length} item${1===te.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await he(`${F}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void b.error(t.error||`Empty trash failed (${e.status})`)}fe()},disabled:0===te.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
36
- /* @__PURE__ */T("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */T(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
37
- /* @__PURE__ */T(h,{className:"h-4 w-4 text-amber-500 ml-1"}),
38
- /* @__PURE__ */T("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:se?.name??"Desktop folder"}),
39
- /* @__PURE__ */T("span",{className:"text-2xs text-gray-400 px-2",children:"Desktop shortcuts"})]}),X&&/* @__PURE__ */L(R,{children:[
40
- /* @__PURE__ */T("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
41
- /* @__PURE__ */L("div",{className:"flex items-center gap-2",title:`${a(X.used)} of ${a(X.limit)} used`,children:[
42
- /* @__PURE__ */T("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */T("div",{className:`h-full ${Ne} transition-all`,style:{width:`${ke}%`}})}),
43
- /* @__PURE__ */L("span",{className:"text-2xs text-gray-500 tabular-nums whitespace-nowrap",children:[a(X.used)," / ",a(X.limit)]})]})]})]}),
44
- /* @__PURE__ */T("div",{className:"flex-1 overflow-auto",children:"object"==typeof q?0===ie.length?/* @__PURE__ */T("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
45
- /* @__PURE__ */T("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
46
- /* @__PURE__ */T("th",{className:`${w} text-left font-medium px-3 h-8`,children:"Name"}),
47
- /* @__PURE__ */T("th",{className:`${w} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
48
- /* @__PURE__ */T("th",{className:`${w} w-56`})]})}),
49
- /* @__PURE__ */T("tbody",{children:ie.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
50
- return L("tr",{onClick:()=>H(t),onDoubleClick:()=>me(e),className:"cursor-default border-b border-gray-100 "+(V===t?"bg-blue-50":"hover:bg-gray-50"),children:[
51
- /* @__PURE__ */L("td",{className:"px-3 h-8 flex items-center gap-2",children:[
52
- /* @__PURE__ */T(p,{item:e}),
53
- /* @__PURE__ */T("span",{className:"truncate",title:e.label,children:e.label})]}),
54
- /* @__PURE__ */T("td",{className:"px-3 h-8 text-xs text-gray-500",children:u(e)}),
55
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
56
- /* @__PURE__ */T("button",{onClick:t=>{t.stopPropagation(),me(e)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Open"}),
57
- /* @__PURE__ */T("button",{onClick:t=>{t.stopPropagation(),ae?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Move to desktop"}),
58
- /* @__PURE__ */T("button",{onClick:t=>{t.stopPropagation(),ae?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"trash"===q?J&&0===te.length?/* @__PURE__ */T(N,{size:"sm",padding:"p-6",label:"Loading"}):0===te.length?/* @__PURE__ */T("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
59
- /* @__PURE__ */T("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
60
- /* @__PURE__ */T("th",{className:`${w} text-left font-medium px-3 h-8`,children:"Name"}),
61
- /* @__PURE__ */T("th",{className:`${w} text-left font-medium px-3 h-8`,children:"Original location"}),
62
- /* @__PURE__ */T("th",{className:`${w} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
63
- /* @__PURE__ */T("th",{className:`${w} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
64
- /* @__PURE__ */T("th",{className:`${w} w-44`})]})}),
65
- /* @__PURE__ */T("tbody",{children:te.map(e=>/* @__PURE__ */L("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
66
- /* @__PURE__ */L("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */T(k,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */T(k,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
67
- /* @__PURE__ */T("span",{className:"truncate",title:e.name,children:e.name})]}),
68
- /* @__PURE__ */T("td",{className:"px-3 h-8 text-gray-500 text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
69
- /* @__PURE__ */T("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:a(e.size)}),
70
- /* @__PURE__ */T("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:e.deletedAt?M(e.deletedAt):"—"}),
71
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
72
- /* @__PURE__ */T("button",{onClick:()=>(async e=>{const t=await he(`${F}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Restore failed (${t.status})`)}b.success(`Restored "${e.name}"`),fe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
73
- /* @__PURE__ */T("button",{onClick:()=>(async e=>{if(!await g({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await he(`${F}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Delete failed (${t.status})`)}fe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):J&&0===O.length?/* @__PURE__ */T(N,{size:"sm",padding:"p-6",label:"Loading"}):0===O.length?/* @__PURE__ */L("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!P&&/* @__PURE__ */L(R,{children:[" Drop files here or click ",
74
- /* @__PURE__ */T("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
75
- /* @__PURE__ */T("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
76
- /* @__PURE__ */T("th",{className:`${w} text-left font-medium px-3 h-8`,children:"Name"}),
77
- /* @__PURE__ */T("th",{className:`${w} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
78
- /* @__PURE__ */T("th",{className:`${w} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),
79
- /* @__PURE__ */T("th",{className:`${w} w-32`})]})}),
80
- /* @__PURE__ */T("tbody",{children:O.map(t=>/* @__PURE__ */L("tr",{onClick:()=>H(t.name),onDoubleClick:()=>{"folder"===t.kind?A(S(U,t.name)):(async t=>{if(P)return;const r=S(U,t.name),a=(t.name.split(".").pop()||"").toLowerCase(),n=W[a];n?await e({filePath:r,filename:t.name,kind:n,onStaged:e=>ce(e)}):xe(t)})(t)},className:"cursor-default border-b border-gray-100 "+(V===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
81
- /* @__PURE__ */L("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */T(k,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */T(k,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
82
- /* @__PURE__ */T("span",{className:"truncate",title:t.name,children:t.name})]}),
83
- /* @__PURE__ */T("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:"folder"===t.kind?"—":a(t.size)}),
84
- /* @__PURE__ */T("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:M(t.modifiedAt)}),
85
- /* @__PURE__ */T("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!P&&/* @__PURE__ */L(R,{children:["file"===t.kind&&/* @__PURE__ */T("button",{onClick:e=>{e.stopPropagation(),xe(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs",children:"Download"}),
86
- /* @__PURE__ */T("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await y({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void b.error("Names cannot contain slashes");const r=S(U,e.name),a=S(U,t),n=await he(`${F}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:r,to:a})});if(!n.ok){const e=await n.json().catch(()=>({}));return void b.error(e.error||`Rename failed (${n.status})`)}ue(U)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Rename"}),
87
- /* @__PURE__ */T("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await g({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=S(U,e.name),r=await he(`${F}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok){const e=await r.json().catch(()=>({}));return void b.error(e.error||`Delete failed (${r.status})`)}ue(U)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),Y&&/* @__PURE__ */T("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */T("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{F as default};
@@ -1,25 +0,0 @@
1
- import{getNumberingConfigs as e}from"./chunk-S4IW5OL3.js";import{SidebarLayout as t}from"./chunk-PCKYNZ5Y.js";import"./chunk-QWK6DRSN.js";import"./chunk-KZHPX4FM.js";import{timeAgo as r}from"./chunk-X2S2XDZI.js";import"./chunk-5OTS2G3M.js";import"./chunk-36BRD5J3.js";import{AboutApp as n}from"./chunk-4RNF6MNW.js";import{useWindowManager as o,client_default as i}from"./chunk-2AHHM4SK.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-SEXLHFMR.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-EW6FRPFJ.js";import"./chunk-2WL3Q7VW.js";import"./chunk-TW6WYYBC.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{toast_default as s}from"./chunk-4NXMMWL6.js";import"./chunk-4GVH4ZUH.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import{useShellPrefs as c}from"./chunk-KC3EX26K.js";import"./chunk-BZMZTPS6.js";import"./chunk-FKZEGBLK.js";import"./chunk-5QFPTDQF.js";import"./chunk-QR4RM7PO.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import{Icon as a}from"./chunk-2SHYR3RA.js";import"./chunk-J75ZT2JQ.js";import"./chunk-VH6GB73Q.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useRef as l,useEffect as p,useState as d,useCallback as m}from"react";import{useQuery as u}from"@tanstack/react-query";import{jsxs as h,Fragment as y,jsx as g}from"react/jsx-runtime";var x=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var k={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},b=/\[([ xX]?)\]/g;function f(){const{openEntity:f}=o(),{prefs:v,save:N}=c(),{data:j}=u({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),w=l({});p(()=>{if(!j)return;const e={};for(const t of j){const r=k[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}w.current=e},[j]);const T=v.notepad_notes||[],[_,W]=d(null),[C,S]=d(""),[R,$]=d(""),[K,D]=d("yellow"),[X,M]=d(!1),[O,U]=d(!1),G=l(null),L=l(),F=T.find(e=>e.id===_);p(()=>{if(!_&&T.length>0){const e=T[0];W(e.id),S(e.title),$(e.content),D(e.color)}},[T.length]);const J=m(e=>{N({notepad_notes:e})},[N]),P=m(()=>{if(!_||!X)return;const e=T.map(e=>e.id===_?{...e,title:C,content:R,color:K,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);J(e),M(!1)},[_,X,C,R,K,T,J]);p(()=>{if(X)return L.current&&clearTimeout(L.current),L.current=setTimeout(P,800),()=>{L.current&&clearTimeout(L.current)}},[X,P]),p(()=>()=>{X&&P()},[]);const Q=e=>{X&&P(),W(e.id),S(e.title),$(e.content),D(e.color),M(!1),U(!1)},E=e=>{const t=R.slice(0,e),r=R.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=R.slice(e+r[0].length);$(t+n+o),M(!0)},H=async(e,t)=>{const r=w.current[e];if(!r)return;const n=`${e}#${t}`;try{const{data:e}=await i.get(r.endpoint,{params:{search:n,page_size:1}}),t=(e?.results??e??[])[0];t?f(r.entityType,t.id,t,n):s.error(`${n} not found`)}catch{s.error(`Failed to look up ${n}`)}},V="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",Z=/* @__PURE__ */h(y,{children:[
2
- /* @__PURE__ */g("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */h("button",{onClick:()=>{X&&P();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!1,updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...T];J(t),W(e.id),S(""),$(""),D("yellow"),M(!1),U(!0),setTimeout(()=>G.current?.focus(),50)},className:"w-full flex items-center justify-center gap-2 rounded-lg bg-blue-600 text-white px-3 min-h-8 py-1 text-sm font-medium hover:bg-blue-700 transition-colors",children:[
3
- /* @__PURE__ */g(a,{name:"add",className:"h-4 w-4",strokeWidth:2}),"New Note"]})}),
4
- /* @__PURE__ */g("div",{className:"flex-1 overflow-y-auto",children:0===T.length?/* @__PURE__ */g("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):T.map(e=>{const t=(n=e.color,x.find(e=>e.key===n)||x[0]);var n;/* @__PURE__ */
5
- return h("button",{onClick:()=>Q(e),className:"w-full text-left px-3 py-3 border-b border-gray-100 transition-colors "+(_===e.id?"bg-blue-50":"hover:bg-gray-50"),children:[
6
- /* @__PURE__ */h("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */g("div",{className:`w-3 h-3 rounded-full shrink-0 ${t.dot}`}),
8
- /* @__PURE__ */g("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"}),e.sticky&&/* @__PURE__ */g(a,{name:"bookmark",look:"solid",className:"h-3 w-3 text-amber-500 shrink-0"})]}),
9
- /* @__PURE__ */g("p",{className:"text-xs text-gray-400 mt-0.5 truncate ml-5",children:e.content.replace(/\[[ xX]?\]/g,"").slice(0,60)||"Empty note"}),
10
- /* @__PURE__ */g("p",{className:"text-2xs text-gray-300 mt-0.5 ml-5",children:r(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
11
- return h("div",{className:"h-full",children:[
12
- /* @__PURE__ */g(n,{app:"notepad"}),
13
- /* @__PURE__ */g(t,{sidebar:Z,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:_?/* @__PURE__ */h("div",{className:"flex-1 flex flex-col min-w-0",children:[
14
- /* @__PURE__ */h("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
15
- /* @__PURE__ */g("input",{value:C,onChange:e=>{S(e.target.value),M(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
16
- /* @__PURE__ */g("div",{className:"flex gap-1",children:x.map(e=>/* @__PURE__ */g("button",{onClick:()=>{D(e.key),M(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${K===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
17
- /* @__PURE__ */g("button",{onClick:()=>(e=>{const t=T.map(t=>t.id===e?{...t,sticky:!t.sticky}:t);J(t);const r=t.find(t=>t.id===e);s.success(r?.sticky?"Pinned to desktop":"Removed from desktop")})(_),title:F?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(F?.sticky?"text-amber-500 hover:text-amber-600":"text-gray-300 hover:text-amber-400"),children:/* @__PURE__ */g(a,{name:"bookmark",className:"h-4 w-4",fill:F?.sticky?"currentColor":"none",strokeWidth:1.5})}),
18
- /* @__PURE__ */g("button",{onClick:()=>(e=>{const t=T.filter(t=>t.id!==e);if(J(t),_===e){const e=t[0];e?Q(e):(W(null),S(""),$(""))}})(_),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */g(a,{name:"trash",className:"h-4 w-4",strokeWidth:1.5})})]}),O?/* @__PURE__ */g("textarea",{ref:G,value:R,onChange:e=>{$(e.target.value),M(!0)},onBlur:()=>{U(!1),X&&P()},placeholder:V,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */g("div",{onClick:()=>{U(!0),setTimeout(()=>G.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:R?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],s=/([A-Z]{2,4})#(\d{4,6})/g;let c;for(;null!==(c=s.exec(e));){const e=c[1],t=c[2];if(w.current[e]){const n=c.index,o=c[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */g("button",{onClick:()=>H(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}b.lastIndex=0;let l=0;for(let e=0;e<r;e++)l+=t[e].length+1;for(;null!==(c=b.exec(e));){const e="x"===c[1]||"X"===c[1],t=c.index,n=l+t;i.push({idx:t,len:c[0].length,render:()=>/* @__PURE__ */g("button",{onClick:()=>E(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */g(a,{name:"check",className:"w-3 h-3",strokeWidth:3})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */g("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */g("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */g("span",{children:"​"},`empty-${r}`));const p=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
19
- return g("div",{className:p?"line-through text-gray-400":"",children:n},r)})})(R):/* @__PURE__ */g("p",{className:"text-gray-300 whitespace-pre-line",children:V})}),
20
- /* @__PURE__ */h("div",{className:"px-4 min-h-8 py-1 border-t border-gray-100 flex items-center gap-4 text-2xs text-gray-400",children:[
21
- /* @__PURE__ */g("span",{children:"[] checkbox"}),
22
- /* @__PURE__ */g("span",{children:"SO#35001 entity link"}),
23
- /* @__PURE__ */g("span",{className:"ml-auto",children:O?"Editing":"Click to edit"})]})]}):/* @__PURE__ */g("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */h("div",{className:"text-center text-gray-400",children:[
24
- /* @__PURE__ */g(a,{name:"page",className:"h-12 w-12 mx-auto mb-3 text-gray-300",strokeWidth:1}),
25
- /* @__PURE__ */g("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{f as default};
@@ -1 +0,0 @@
1
- export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-AZU7YOES.js";import"./chunk-4NXMMWL6.js";import"./chunk-K7U4RWXJ.js";import"./chunk-2SHYR3RA.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";
@@ -1,43 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,RAIL_WIDTH_KEY as n,toggleOpenSection as i,writeStored as l}from"./chunk-Y65MPP3M.js";import{ResizeHandle as o}from"./chunk-KZHPX4FM.js";import{openGlobalSearch as s}from"./chunk-K7KQDPLW.js";import{partitionNav as c,flyoutGroups as d,visibleSectionItems as m,rowsContainRoute as h,visibleNavChildren as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-4CANQ3B3.js";import{RAIL_MENU_GAP as g,navSections as f,startMenuCategories as y,TAB_STRIP_H as x,RAIL_COLLAPSED_INSET as k,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as C,navIcons as j,sectionIcons as w}from"./chunk-CY5N5OA3.js";import"./chunk-5A7MWTXX.js";import"./chunk-PKXQDCNR.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as W,PopupMenuLabel as z}from"./chunk-FKZEGBLK.js";import"./chunk-5QFPTDQF.js";import"./chunk-QR4RM7PO.js";import"./chunk-K7U4RWXJ.js";import{Icon as R}from"./chunk-2SHYR3RA.js";import"./chunk-J75ZT2JQ.js";import"./chunk-VH6GB73Q.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as $}from"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useMemo as A,useState as M,useRef as K,useEffect as I,isValidElement as H,cloneElement as Q}from"react";import{jsx as T,jsxs as D,Fragment as P}from"react/jsx-runtime";var B="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function J(e,t,a){const r=Math.max(8,a-t.bottom);return{left:e+g,bottom:r,maxHeight:a-r-8,overflowY:"auto"}}var G=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),O="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function U({open:e}){/* @__PURE__ */
2
- return T(R,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function _({dir:e}){/* @__PURE__ */
3
- return T(R,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function F({className:e}){/* @__PURE__ */
4
- return T(R,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var X=e=>.75+1.75*e+"rem";function Y({width:Y,collapsed:V,onToggleCollapsed:Z,onResize:E,onHome:q,onOpen:ee,activeRoute:te,profile:ae,user:re,onLogout:ne,onSwitchToDesktop:ie,onReportBug:le,onClose:oe,navSections:se=f,navIcons:ce=j,sectionIcons:de=w,categories:me=y,productName:he,productIcon:ue,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:ge=null,logoIsLight:fe=null}){const ye=$().layout,{hasAnyPerm:xe}=e(),ke=A(()=>c(se,me,xe),[se,me,xe]),[ve,Ne]=M(()=>t(a(r))),Ce=e=>Ne(t=>{const a=i(t,e);return l(r,JSON.stringify([...a])),a}),[je,we]=M(null),[Se,Le]=M(!1),We=K(null);I(()=>{V||we(null)},[V]);const ze=(e,t)=>{we(null),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Re=(e,t)=>{const a=t[e];/* @__PURE__ */
5
- return T("span",{className:O,"aria-hidden":"true",children:a&&H(a)?Q(a,{className:"size-[18px]"}):a})},$e=(e,t)=>{const a=u(e,xe),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=ve.has(n),l=!i&&h(a,te,xe);/* @__PURE__ */
6
- return D("div",{children:[
7
- /* @__PURE__ */D("button",{type:"button",onClick:()=>Ce(n),"aria-expanded":i,className:G(l,!1),style:t>0?{paddingLeft:X(t)}:void 0,children:[0===t&&Re(e.to,ce),
8
- /* @__PURE__ */T("span",{className:"min-w-0 flex-1 truncate",children:r}),
9
- /* @__PURE__ */T(U,{open:i})]}),i&&/* @__PURE__ */T("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>$e(e,t+1))}),e.dividerAfter&&/* @__PURE__ */T("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:X(t)},"aria-hidden":"true"})]},e.to)}const n=e.to===te;/* @__PURE__ */
10
- return D("div",{children:[
11
- /* @__PURE__ */D("button",{type:"button",onClick:t=>ze(e,t),onAuxClick:t=>{1===t.button&&ze(e,t)},"aria-current":n?"page":void 0,className:G(n,!1),style:t>0?{paddingLeft:X(t)}:void 0,children:[0===t&&Re(e.to,ce),
12
- /* @__PURE__ */T("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */T("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:X(t)},"aria-hidden":"true"})]},e.to)},Ae=(e,t)=>{const a=t?e.items:m(e,xe);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */T("span",{className:O,"aria-hidden":"true",children:e.icon}):Re(e.label,de),n=e.menuLabel??e.label,i=h(a,te,xe),l="dividerAfter"in e&&e.dividerAfter;if(V)/* @__PURE__ */
13
- return D("div",{children:[
14
- /* @__PURE__ */T("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":je?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();we(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:G(i||je?.label===e.label,!0),children:r}),l&&/* @__PURE__ */T("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const o=ve.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
- return D("div",{children:[
16
- /* @__PURE__ */D("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:G(!o&&i,!1),children:[r,
17
- /* @__PURE__ */T("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
- /* @__PURE__ */T(U,{open:o})]}),
19
- /* @__PURE__ */T("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&a.map(e=>$e(e,1))}),l&&/* @__PURE__ */T("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},Me=ae?.first_name?`${ae.first_name} ${ae.last_name||""}`.trim():re?.email||"",Ke=(ae?.first_name?.charAt(0)||re?.email?.charAt(0)||"?").toUpperCase(),Ie=ae?.avatar_url?/* @__PURE__ */T("img",{src:ae.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */T("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ke}),He=Se?We.current?.getBoundingClientRect():void 0,Qe=V?"":"px-3",Te=V?{paddingInline:k}:void 0,De=`${V?ye.expandSidebar:ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,Pe=q?{run:q,label:ye.goHome,title:ye.goHome}:oe?null:{run:Z,label:V?ye.expandSidebar:ye.collapseSidebar,title:De},Be=/* @__PURE__ */D(P,{children:[ue&&/* @__PURE__ */T(p,{src:ue,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:ge,isLight:fe,size:28,decorative:!0}),!V&&/* @__PURE__ */D("span",{className:"min-w-0 text-left leading-tight",children:[
20
- /* @__PURE__ */T("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:he??"Apps"}),pe&&/* @__PURE__ */T("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),Je=ke.erpSections.length>0||ke.systemSections.length>0||ke.virtualSections.length>0;/* @__PURE__ */
21
- return D("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:Y},children:[
22
- /* @__PURE__ */D("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(V?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:x},children:[Pe?/* @__PURE__ */T("button",{type:"button",onClick:Pe.run,"aria-label":Pe.label,title:Pe.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(V?"justify-center p-0.5":"-ml-1 p-1"),children:Be}):/* @__PURE__ */T("span",{className:"flex min-w-0 items-center gap-2",children:Be}),oe?/* @__PURE__ */T(b,{onClick:oe,"aria-label":ye.closeMenu,children:/* @__PURE__ */T(R,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!V&&/* @__PURE__ */T("button",{type:"button",onClick:Z,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */T(_,{dir:"left"})})]}),
23
- /* @__PURE__ */T("div",{className:`shrink-0 pt-3 ${Qe}`,style:Te,children:V?/* @__PURE__ */T("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${B?"⌘K":"Ctrl K"})`,className:G(!1,!0),children:/* @__PURE__ */T(F,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */D("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
24
- /* @__PURE__ */T(F,{className:"size-3.5 text-gray-500"}),
25
- /* @__PURE__ */T("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ye.search}),
26
- /* @__PURE__ */T("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:B?"⌘K":"Ctrl K"})]})}),
27
- /* @__PURE__ */D("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Qe} ${V?"space-y-1":"space-y-0.5"}`,style:Te,children:[V&&/* @__PURE__ */T("button",{type:"button",onClick:Z,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${B?"⌘":"Ctrl"} .)`,className:`${G(!1,!0)} mb-3`,children:/* @__PURE__ */T(_,{dir:"right"})}),ke.topItems.map(e=>{if(!V)return $e(e,0);const t=u(e,xe),a=e.to===te||h(t,te,xe),r=e.menuLabel??e.label;/* @__PURE__ */
28
- return D("div",{children:[
29
- /* @__PURE__ */T("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void ze(e,a);const r=a.currentTarget.getBoundingClientRect();we(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:G(a,!0),children:Re(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */T("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ke.topItems.length>0&&Je&&!ke.topItems[ke.topItems.length-1].dividerAfter&&/* @__PURE__ */T("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ke.erpSections.map(e=>Ae(e,!1)),ke.systemSections.map(e=>Ae(e,!1)),ke.virtualSections.map(e=>Ae(e,!0)),ke.footerSections.length>0&&/* @__PURE__ */T("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ke.footerSections.map(e=>Ae(e,!1))]}),
30
- /* @__PURE__ */T("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Qe}`,style:Te,children:/* @__PURE__ */D("button",{ref:We,type:"button",onClick:()=>Le(e=>!e),"aria-haspopup":"menu","aria-expanded":Se,"aria-label":V?ye.accountMenu(Me):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(V?"justify-center py-2":"px-2 py-2"),children:[Ie,!V&&/* @__PURE__ */D("span",{className:"min-w-0 flex-1 text-left",children:[
31
- /* @__PURE__ */T("span",{className:"block truncate text-sm font-semibold text-gray-800",children:Me}),re?.email&&Me!==re.email&&/* @__PURE__ */T("span",{className:"block truncate text-2xs text-gray-500",children:re.email})]})]})}),E&&!V&&!oe&&/* @__PURE__ */T(o,{side:"left",width:Y,onResize:E,min:C,max:N,defaultWidth:v,storageKey:n,label:ye.resizeSidebar}),Se&&He&&/* @__PURE__ */D(S,{portal:!0,minWidth:224,onClose:()=>Le(!1),style:J(Y,He,window.innerHeight),children:[V&&/* @__PURE__ */D("div",{className:"border-b border-gray-200 px-3 py-3",children:[
32
- /* @__PURE__ */T("p",{className:"truncate text-sm font-semibold text-gray-800",children:Me}),re?.email&&/* @__PURE__ */T("p",{className:"truncate text-xs text-gray-500",children:re.email})]}),
33
- /* @__PURE__ */D(L,{onClick:()=>{Le(!1),ee("/profile",!1)},children:[
34
- /* @__PURE__ */T(R,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ke.footerItems.map(e=>/* @__PURE__ */D(L,{onClick:()=>{Le(!1),ze(e)},children:[
35
- /* @__PURE__ */T("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),le&&/* @__PURE__ */D(L,{onClick:()=>{Le(!1),le()},children:[
36
- /* @__PURE__ */T(R,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
37
- /* @__PURE__ */T(W,{}),ie&&/* @__PURE__ */D(P,{children:[
38
- /* @__PURE__ */D(L,{onClick:()=>{Le(!1),ie()},children:[
39
- /* @__PURE__ */T(R,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
40
- /* @__PURE__ */T(W,{})]}),
41
- /* @__PURE__ */D(L,{danger:!0,onClick:()=>{Le(!1),ne()},children:[
42
- /* @__PURE__ */T(R,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),je&&V&&/* @__PURE__ */T(S,{portal:!0,minWidth:220,onClose:()=>we(null),style:{left:Y+g,top:Math.min(je.top,window.innerHeight-48*Math.min(je.items.length,10)-16)},children:d(je.items,xe).map((e,t)=>/* @__PURE__ */D("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */T(W,{}),e.heading&&/* @__PURE__ */T(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */D(L,{onClick:()=>ze(e),children:[Re(e.to,ce),
43
- /* @__PURE__ */T("span",{className:e.to===te?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{J as accountMenuPosition,Y as default};
@@ -1,37 +0,0 @@
1
- import{EditableGrid as e}from"./chunk-2RBWQVDC.js";import"./chunk-G6DKCCWH.js";import{AboutApp as t}from"./chunk-4RNF6MNW.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import{WindowTitle as a}from"./chunk-2AHHM4SK.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-SEXLHFMR.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-EW6FRPFJ.js";import"./chunk-2WL3Q7VW.js";import"./chunk-TW6WYYBC.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-4GVH4ZUH.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-KC3EX26K.js";import"./chunk-BZMZTPS6.js";import"./chunk-FKZEGBLK.js";import"./chunk-5QFPTDQF.js";import"./chunk-QR4RM7PO.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-2SHYR3RA.js";import"./chunk-J75ZT2JQ.js";import"./chunk-VH6GB73Q.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useRef as l,useState as s,useEffect as c,useCallback as i}from"react";import{jsxs as u,jsx as d,Fragment as h}from"react/jsx-runtime";var m="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p=10,x=30;function g(e){return e<26?m[e]:m[Math.floor(e/26)-1]+m[e%26]}function y(e){return Array.from({length:e},(e,t)=>({key:`col_${t}`,title:g(t),width:100}))}function b(e,t){return Array.from({length:e},()=>Array(t).fill(""))}function f(e){return{id:crypto.randomUUID(),name:e,columns:y(p),data:b(x,p),cellStyles:{}}}function v(e){return e.split("\n").map(e=>{if(e.includes("\t"))return e.split("\t").map(e=>e.trim());const t=[];let r="",n=!1;for(const o of e)'"'!==o?","!==o||n?r+=o:(t.push(r.trim()),r=""):n=!n;return t.push(r.trim()),t}).filter(e=>e.some(e=>e.trim()))}function k(e,t){const r=e.rows?e.rows.map(e=>e.map(e=>String(e??""))):v(e.csv??"");if(0===r.length)return null;const n=Math.max(p,r.reduce((e,t)=>Math.max(e,t.length),0)),o=r.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));return{id:crypto.randomUUID(),name:t,columns:y(n),data:o,cellStyles:{}}}function w(){const m=l(null),g=l(void 0);void 0===g.current&&(g.current=r());const w=l(g.current?.data??null),j=(()=>{const e=g.current;if(!e)return null;const t=k(e.data,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[C,N]=s(j?[j.sheet]:[f("Sheet 1")]),[S,M]=s(0),U=l([]),R=l(C),D=l(!1);c(()=>{D.current?D.current=!1:R.current!==C&&(U.current.push(R.current),U.current.length>50&&U.current.shift()),R.current=C},[C]);const E=i(()=>{const e=U.current.pop();e&&(D.current=!0,N(e))},[]);c(()=>{const e=e=>{if(!m.current?.contains(document.activeElement)&&!m.current?.matches(":focus-within"))return;(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("z"===e.key||"Z"===e.key)&&(e.preventDefault(),E())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E]);const[L,A]=s(j?.title??"Untitled"),[K,W]=s(()=>g.current?.data.onEmail),$=i(e=>{const t=k(e,"Sheet 1");t&&(N([t]),M(0),A(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),W(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==w.current&&$(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&$(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[F,B]=s(!1),[V,G]=s(null),[T,H]=s(""),Q=l(null),[J,I]=s("1"),[O,X]=s("10"),Z=C[S]||C[0],P=Z.data,Y=Z.columns,z=Z.cellStyles??{},[_,q]=s(null),[ee,te]=s(null),re=i(()=>{if(ee){const e=Math.min(ee.anchor.row,ee.end.row),t=Math.max(ee.anchor.row,ee.end.row),r=Math.min(ee.anchor.col,ee.end.col),n=Math.max(ee.anchor.col,ee.end.col),o=[];for(let a=e;a<=t;a++)for(let e=r;e<=n;e++)o.push({row:a,col:e});return o}return _?[_]:[]},[ee,_]),ne=i((e,t)=>{const r=re();0!==r.length&&N(n=>n.map((n,o)=>{if(o!==S)return n;const a={...n.cellStyles??{}},l=`${r[0].row}:${r[0].col}`,s=void 0!==t?t:!(a[l]??{})[e];for(const{row:t,col:n}of r){const r=`${t}:${n}`;a[r]={...a[r]??{},[e]:s}}return{...n,cellStyles:a}}))},[re,S]),oe=ee?{row:ee.anchor.row,col:ee.anchor.col}:_,ae=oe?z[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{N(t=>t.map((t,r)=>r===S?{...t,...e}:t))},[S]),ce=i(e=>{const t=e.reduce((e,t)=>Math.max(e,t.length),0);t!==Y.length?se({data:e,columns:y(t)}):se({data:e})},[se,Y.length]),ie=(e,t)=>{N(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),G(null)},ue=()=>P.filter(e=>e.some(e=>e.trim())).map(e=>e.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?`"${e.replace(/"/g,'""')}"`:e).join(",")).join("\n"),de=[];P.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=P.reduce((e,t)=>e+t.filter(e=>e.trim()).length,0);/* @__PURE__ */
2
- return u("div",{ref:m,className:"flex flex-col h-full",children:[
3
- /* @__PURE__ */d(a,{title:`${me=L||"Untitled",me.length>24?`${me.slice(0,23)}…`:me} - Spreadsheets`}),
4
- /* @__PURE__ */d(t,{app:"spreadsheet"}),
5
- /* @__PURE__ */u("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[F?/* @__PURE__ */d("input",{type:"text",value:L,onChange:e=>A(e.target.value),onBlur:()=>B(!1),onKeyDown:e=>{"Enter"===e.key&&B(!1)},autoFocus:!0,className:"text-sm font-medium text-gray-900 border border-gray-300 rounded px-2 py-0.5 w-40 focus:border-blue-500 focus:ring-blue-500"}):/* @__PURE__ */d("button",{onClick:()=>B(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:L||"Untitled"}),
6
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
7
- /* @__PURE__ */d("input",{ref:Q,type:"file",accept:".csv,.tsv,.txt,.xlsx,.xls,.ods",onChange:async e=>{const t=e.target.files?.[0];if(!t)return;const r=t.name.replace(/\.(csv|tsv|txt|xlsx|xls|ods)$/i,"");if(/\.(xlsx|xls|ods)$/i.test(t.name)){const e=new Uint8Array(await t.arrayBuffer()),n=await(import("xlsx")),o=n.read(e,{type:"array"}),a=o.SheetNames.map(e=>{const t=n.utils.sheet_to_json(o.Sheets[e],{header:1,defval:""}),r=Math.max(p,t.reduce((e,t)=>Math.max(e,t.length),0)),a=t.map(e=>{const t=e.map(e=>String(e??""));for(;t.length<r;)t.push("");return t});for(;a.length<x;)a.push(Array(r).fill(""));return{id:crypto.randomUUID(),name:e,columns:y(r),data:a}});N(a),M(0),A(r)}else{const e=v(await t.text());if(0===e.length)return;const n=Math.max(p,e.reduce((e,t)=>Math.max(e,t.length),0)),o=e.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));se({columns:y(n),data:o}),A(r)}Q.current&&(Q.current.value="")},className:"hidden"}),
8
- /* @__PURE__ */d("button",{onClick:()=>Q.current?.click(),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Open"}),
9
- /* @__PURE__ */d("button",{onClick:()=>{const e=new Blob([ue()],{type:"text/csv"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`${L||"spreadsheet"}.csv`,r.click(),URL.revokeObjectURL(t)},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save CSV"}),K&&/* @__PURE__ */d("button",{onClick:()=>K(ue(),`${L||"spreadsheet"}.csv`),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Email"}),
10
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
11
- /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
12
- /* @__PURE__ */d("input",{type:"number",min:"1",max:"50",value:J,onChange:e=>I(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
13
- /* @__PURE__ */d("button",{onClick:()=>(e=>{const t=Y.length+e;se({columns:y(t),data:P.map(t=>[...t,...Array(e).fill("")])})})(parseInt(J)||1),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Col"})]}),
14
- /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
15
- /* @__PURE__ */d("input",{type:"number",min:"1",max:"500",value:O,onChange:e=>X(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
16
- /* @__PURE__ */d("button",{onClick:()=>{return e=parseInt(O)||10,void se({data:[...P,...Array.from({length:e},()=>Array(Y.length).fill(""))]});var e},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Row"})]}),
17
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
18
- /* @__PURE__ */d("button",{onClick:()=>{se({columns:y(p),data:b(x,p)})},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Clear"}),
19
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
20
- /* @__PURE__ */u("div",{className:"flex items-center gap-0.5",title:le?"":"Click a cell first",children:[
21
- /* @__PURE__ */d("button",{onClick:()=>ne("bold"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors font-bold ${ae.bold?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"B"}),
22
- /* @__PURE__ */d("button",{onClick:()=>ne("italic"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors italic ${ae.italic?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"I"}),
23
- /* @__PURE__ */d("button",{onClick:()=>ne("underline"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors underline ${ae.underline?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"U"}),
24
- /* @__PURE__ */u("select",{value:ae.fontSize??"base",onChange:e=>ne("fontSize",e.target.value),disabled:!le,className:"ml-1 text-xs border border-gray-300 rounded px-1 py-0.5 bg-white disabled:opacity-40 disabled:cursor-not-allowed",children:[
25
- /* @__PURE__ */d("option",{value:"sm",children:"XS"}),
26
- /* @__PURE__ */d("option",{value:"base",children:"S"}),
27
- /* @__PURE__ */d("option",{value:"lg",children:"M"}),
28
- /* @__PURE__ */d("option",{value:"xl",children:"L"})]})]})]}),
29
- /* @__PURE__ */d("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */d(e,{columns:Y,data:P,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:z,onFocusChange:q,onSelectionChange:te,minRows:x,maxHeight:"100%"})}),
30
- /* @__PURE__ */u("div",{className:"flex items-center border-t border-gray-200 bg-gray-50 shrink-0",children:[
31
- /* @__PURE__ */u("div",{className:"flex items-center gap-0.5 px-1 py-1 overflow-x-auto flex-1 min-w-0",children:[C.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>M(t),onDoubleClick:()=>{G(t),H(e.name)},onContextMenu:e=>{e.preventDefault(),C.length>1&&(e=>{C.length<=1||(N(t=>t.filter((t,r)=>r!==e)),S>=e&&S>0&&M(S-1))})(t)},className:"px-3 py-1 text-xs font-medium rounded-b whitespace-nowrap transition-colors "+(t===S?"bg-white text-blue-700 border border-t-0 border-gray-300 -mt-px relative z-10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:V===t?/* @__PURE__ */d("input",{type:"text",value:T,onChange:e=>H(e.target.value),onBlur:()=>ie(t,T||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,T||e.name),"Escape"===r.key&&G(null)},onClick:e=>e.stopPropagation(),autoFocus:!0,className:"w-20 text-xs border border-blue-400 rounded px-1 py-0 focus:ring-0 focus:outline-none"}):e.name},e.id)),
32
- /* @__PURE__ */d("button",{onClick:()=>{const e=`Sheet ${C.length+1}`;N(t=>[...t,f(e)]),M(C.length)},className:"px-2 py-1 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded",title:"Add sheet",children:"+"})]}),
33
- /* @__PURE__ */u("div",{className:"flex items-center gap-4 px-3 py-1 text-xs text-gray-500 shrink-0 border-l border-gray-200",children:[
34
- /* @__PURE__ */u("span",{children:[he," cells"]}),de.length>0&&/* @__PURE__ */u(h,{children:[
35
- /* @__PURE__ */u("span",{children:["Sum: ",de.reduce((e,t)=>e+t,0).toLocaleString(void 0,{maximumFractionDigits:2})]}),
36
- /* @__PURE__ */u("span",{children:["Avg: ",(de.reduce((e,t)=>e+t,0)/de.length).toLocaleString(void 0,{maximumFractionDigits:2})]})]}),
37
- /* @__PURE__ */u("span",{children:[P.length," × ",Y.length]})]})]})]});var me}export{w as default};
@@ -1,16 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-5OX6KXWY.js";import{useWidgetSettings as r}from"./chunk-2AHHM4SK.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-SEXLHFMR.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-EW6FRPFJ.js";import"./chunk-2WL3Q7VW.js";import"./chunk-TW6WYYBC.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-4GVH4ZUH.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-KC3EX26K.js";import"./chunk-FKZEGBLK.js";import"./chunk-5QFPTDQF.js";import"./chunk-QR4RM7PO.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-2SHYR3RA.js";import"./chunk-J75ZT2JQ.js";import"./chunk-VH6GB73Q.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as n,useCallback as c}from"react";import{jsxs as a,Fragment as s,jsx as i}from"react/jsx-runtime";var o=["AAPL","MSFT","GOOGL","TSLA","NVDA"],m="stock_symbols",l="stock_appearance",h={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},p=Object.keys(h);function u(){try{const e=JSON.parse(localStorage.getItem(m)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return o}var d=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function g(){const[o,g]=n(u),[x,k]=n(()=>e(l)),[y,j]=n(!1),[b,N]=n([]),[f,v]=n(x),[A,S]=n(""),C=c(()=>{N([...o]),v({...x}),S(""),j(!0)},[o,x]);r(C);const D=()=>{const e=A.trim().toUpperCase();!e||b.includes(e)||b.length>=8||(N(t=>[...t,e]),S(""))},L=p.filter(e=>!b.includes(e));/* @__PURE__ */
2
- return a(s,{children:[
3
- /* @__PURE__ */i("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${x.activeOpacity/100})`,backdropFilter:x.activeBlur>0?`blur(${x.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3",children:0===o.length?/* @__PURE__ */i("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */i("div",{className:"space-y-0.5",children:o.map(e=>{const t=h[e],r=(t?.change??0)>=0,n=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
4
- return a("div",{className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0",children:[
5
- /* @__PURE__ */i("span",{className:"text-sm font-bold text-gray-800 tracking-tight",children:e}),t?/* @__PURE__ */a("div",{className:"flex flex-col items-end leading-tight",children:[
6
- /* @__PURE__ */i("span",{className:"text-sm font-mono font-semibold text-gray-900 tabular-nums",children:(c=t.price,`$${c.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`)}),
7
- /* @__PURE__ */a("span",{className:`text-2xs font-medium tabular-nums ${n}`,children:[r?"▲":"▼"," ",d(t.change)," (",d(t.changePct),"%)"]})]}):/* @__PURE__ */i("span",{className:"text-sm font-mono text-gray-400 tabular-nums",children:"—"})]},e);var c})})})}),
8
- /* @__PURE__ */i(t,{open:y,onClose:()=>j(!1),title:"Stock Settings",appearance:f,onAppearanceChange:v,onSave:()=>{const e=b.map(e=>e.toUpperCase()).slice(0,8);g(e),k(f),localStorage.setItem(m,JSON.stringify(e)),localStorage.setItem(l,JSON.stringify(f)),j(!1)},children:/* @__PURE__ */a("div",{children:[
9
- /* @__PURE__ */a("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Symbols ",
10
- /* @__PURE__ */a("span",{className:"text-2xs font-normal text-gray-400",children:["(",b.length,"/",8,")"]})]}),
11
- /* @__PURE__ */a("div",{className:"space-y-1 mb-2",children:[b.map((e,t)=>/* @__PURE__ */a("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
12
- /* @__PURE__ */i("span",{className:"text-sm font-semibold text-gray-700",children:e}),
13
- /* @__PURE__ */i("button",{onClick:()=>N(e=>e.filter((e,r)=>r!==t)),className:"text-red-400 hover:text-red-600",children:"×"})]},t)),0===b.length&&/* @__PURE__ */i("p",{className:"text-2xs text-gray-400 italic",children:"No symbols — add a ticker below."})]}),b.length<8?/* @__PURE__ */a("div",{className:"flex items-center gap-2",children:[
14
- /* @__PURE__ */i("input",{value:A,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&D()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
15
- /* @__PURE__ */i("button",{onClick:D,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */a("p",{className:"text-2xs text-gray-400 italic",children:["Max ",8," symbols — remove one to add another."]}),L.length>0&&b.length<8&&/* @__PURE__ */i("div",{className:"flex flex-wrap gap-2 mt-2",children:L.map(e=>/* @__PURE__ */i("button",{onClick:()=>N(t=>t.length<8?[...t,e]:t),className:"text-2xs font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:e},e))}),
16
- /* @__PURE__ */i("p",{className:"text-2xs text-gray-400 mt-2",children:"Demo prices — static sample data, no live feed."})]})})]})}export{g as default};