efficient-shell 13.25.0 → 14.0.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 (269) hide show
  1. package/README.md +8 -4
  2. package/dist/{Browser-W2WVSAEN.js → Browser-FYVRNXOL.js} +13 -13
  3. package/dist/Calculator-7CY2CRGB.js +29 -0
  4. package/dist/{CurrencyConverter-VH4UVYLO.js → CurrencyConverter-FXWM3DBQ.js} +9 -9
  5. package/dist/{Files-6QZFFGSH.js → Files-VDQYQSDZ.js} +85 -85
  6. package/dist/{Notepad-YU4HIJD2.js → Notepad-J3Z3CYEC.js} +9 -9
  7. package/dist/PomodoroTimer-RPGWT26T.js +91 -0
  8. package/dist/{Preview-H7N2MMAI.js → Preview-ISEPDV3A.js} +37 -37
  9. package/dist/Sidebar-2TYZENQL.js +44 -0
  10. package/dist/{Stock-YL732PKW.js → Stock-TUPZORQN.js} +4 -4
  11. package/dist/{Weather-3CBRXNNM.js → Weather-URCO6JML.js} +23 -23
  12. package/dist/{WorldClock-LONNWCRG.js → WorldClock-EBBUWG5L.js} +6 -6
  13. package/dist/ai/index.js +92 -92
  14. package/dist/apps/index.js +1 -1
  15. package/dist/bin/browser-check.js +1 -1
  16. package/dist/bin/media-host-check.js +1 -1
  17. package/dist/bin/ui-check.js +1 -1
  18. package/dist/charts/ChordChart.js +1 -1
  19. package/dist/charts/FlowChart.js +1 -1
  20. package/dist/charts/RadarChart.js +1 -1
  21. package/dist/charts/SankeyChart.js +1 -1
  22. package/dist/charts/SpecChart.js +1 -1
  23. package/dist/charts/SunburstChart.js +1 -1
  24. package/dist/charts/TreemapChart.js +1 -1
  25. package/dist/{chunk-XVMCSUAV.js → chunk-22SVN2ZM.js} +1 -1
  26. package/dist/{chunk-ZDFMYAQB.js → chunk-24BF22NF.js} +1 -1
  27. package/dist/{chunk-JIJZBM25.js → chunk-2RLWGWOU.js} +13 -13
  28. package/dist/{chunk-VP2IQJUD.js → chunk-2SOGTOUQ.js} +4 -4
  29. package/dist/{chunk-4VFEPP2W.js → chunk-2XDO7FZC.js} +13 -13
  30. package/dist/{chunk-SLEA47VA.js → chunk-3L7BEEBW.js} +1 -1
  31. package/dist/{chunk-GZRNOIEE.js → chunk-3ZJAQSFS.js} +3 -3
  32. package/dist/{chunk-BQQEQCSK.js → chunk-47BGAQWD.js} +1 -1
  33. package/dist/{chunk-7AVPMO4F.js → chunk-4BRVZAIW.js} +1 -1
  34. package/dist/chunk-4DNPUG3T.js +7 -0
  35. package/dist/{chunk-VKZC3NPM.js → chunk-5O4HMXPQ.js} +2 -2
  36. package/dist/{chunk-JLSXDYS4.js → chunk-5SQHRDFC.js} +2 -2
  37. package/dist/{chunk-LQIHBIXG.js → chunk-6AYAB5FN.js} +5 -5
  38. package/dist/{chunk-VGUB7LPF.js → chunk-6IP4Q3AT.js} +52 -52
  39. package/dist/{chunk-527WMFTR.js → chunk-6RU2PGQK.js} +1 -1
  40. package/dist/{chunk-UVPDEGIA.js → chunk-6X32SWQI.js} +1 -1
  41. package/dist/{chunk-A5FC4LR7.js → chunk-7D2QZ6JA.js} +1 -1
  42. package/dist/{chunk-77N3REYY.js → chunk-7KNVO46D.js} +2 -2
  43. package/dist/{chunk-2YHS5E27.js → chunk-7OVMWXFM.js} +1 -1
  44. package/dist/{chunk-LC2UF3AA.js → chunk-7WF6LFOJ.js} +1 -1
  45. package/dist/{chunk-IJG4UEKF.js → chunk-A3VLZZHJ.js} +8 -8
  46. package/dist/{chunk-LG6NDTHZ.js → chunk-AH5MLH54.js} +1 -1
  47. package/dist/chunk-AJPQJ7TC.js +6 -0
  48. package/dist/{chunk-TNALBYLY.js → chunk-ALZHFQRX.js} +1 -1
  49. package/dist/{chunk-S5MTTJ3F.js → chunk-AZZ4NO2D.js} +12 -12
  50. package/dist/{chunk-P4VOUPRF.js → chunk-CHDGSJLV.js} +6 -6
  51. package/dist/{chunk-VY6OQRZA.js → chunk-CJ4OEY3T.js} +1 -1
  52. package/dist/{chunk-Q36KB5RQ.js → chunk-CXEELIRW.js} +11 -11
  53. package/dist/{chunk-MZ3JADHG.js → chunk-DBBOD5QW.js} +1 -1
  54. package/dist/chunk-DBQNYJZ6.js +1 -0
  55. package/dist/{chunk-65BW43PF.js → chunk-DNPAYNNU.js} +1 -1
  56. package/dist/{chunk-TTRLYWP4.js → chunk-DO6P6LYU.js} +1 -1
  57. package/dist/chunk-DOJSWVBX.js +6 -0
  58. package/dist/chunk-DTFX624I.js +8 -0
  59. package/dist/chunk-E57C7NBA.js +2 -0
  60. package/dist/{chunk-D5PXRJHA.js → chunk-EBODRYXS.js} +14 -14
  61. package/dist/{chunk-YDJ5IZOU.js → chunk-EDRELF6L.js} +1 -1
  62. package/dist/{chunk-M3HTP2N6.js → chunk-EHNW3UNC.js} +6 -6
  63. package/dist/{chunk-AH2NEKEN.js → chunk-EHSK43WG.js} +8 -8
  64. package/dist/{chunk-VMAIZU5S.js → chunk-EN3GYSCE.js} +1 -1
  65. package/dist/{chunk-TTYTOLVV.js → chunk-EOYKUV2U.js} +1 -1
  66. package/dist/chunk-FFPIT2LB.js +3 -0
  67. package/dist/{chunk-TD3ZQD5R.js → chunk-G3TC2GIA.js} +1 -1
  68. package/dist/{chunk-UQV4TSWB.js → chunk-GTZML3V3.js} +1 -1
  69. package/dist/{chunk-JYR4V4AG.js → chunk-GUUBFQ6L.js} +2 -2
  70. package/dist/{chunk-K42FXX7J.js → chunk-GVAVIYE6.js} +1 -1
  71. package/dist/{chunk-2Y4AH7NC.js → chunk-GY7MJTIZ.js} +1 -1
  72. package/dist/{chunk-XYXCZIJY.js → chunk-HAEZUUDT.js} +3 -3
  73. package/dist/{chunk-J5W63XNR.js → chunk-HTBACICQ.js} +6 -6
  74. package/dist/{chunk-5URXJCNC.js → chunk-HX5QSQ2C.js} +1 -1
  75. package/dist/{chunk-VLBLDSA6.js → chunk-I7WAOKU2.js} +2 -2
  76. package/dist/{chunk-LLDGRPLF.js → chunk-ION3XGLN.js} +1 -1
  77. package/dist/{chunk-EXDSYFHB.js → chunk-ISWTJBOA.js} +1 -1
  78. package/dist/{chunk-BUFAJJDZ.js → chunk-IVEM2BPC.js} +1 -1
  79. package/dist/{chunk-D4432YRW.js → chunk-IZ6D4KGR.js} +1 -1
  80. package/dist/{chunk-KC2EQCBE.js → chunk-JPVD3VS7.js} +6 -6
  81. package/dist/{chunk-C7Z3ZMJH.js → chunk-KE7P74XM.js} +13 -13
  82. package/dist/chunk-KEFNQEXZ.js +1 -0
  83. package/dist/{chunk-DUEEAP4Y.js → chunk-LPL7BWGG.js} +1 -1
  84. package/dist/{chunk-JVENCUUG.js → chunk-LRMDLZMM.js} +4 -4
  85. package/dist/chunk-M5IZ7QLQ.js +7 -0
  86. package/dist/{chunk-MCLVTQSF.js → chunk-MEDOESQD.js} +8 -8
  87. package/dist/chunk-MEP6CZJ3.js +2 -0
  88. package/dist/{chunk-ZYKY4Z7R.js → chunk-MKHOXO5O.js} +1 -1
  89. package/dist/chunk-MNZAAQLH.js +15 -0
  90. package/dist/{chunk-DTRJLQWO.js → chunk-MPC3CHAO.js} +1 -1
  91. package/dist/{chunk-7PAZO65L.js → chunk-MXRF5YVN.js} +5 -5
  92. package/dist/{chunk-NWS5G7FE.js → chunk-MYH5H43C.js} +1 -1
  93. package/dist/{chunk-5OHFBS2B.js → chunk-NC5FIFAY.js} +1 -1
  94. package/dist/chunk-NDCS4COQ.js +11 -0
  95. package/dist/{chunk-IJ4JX6WP.js → chunk-NHALP3MW.js} +4 -4
  96. package/dist/{chunk-R5WBDXI2.js → chunk-OYQWBJ37.js} +1 -1
  97. package/dist/{chunk-UU42O5ON.js → chunk-P3XXFQG5.js} +1 -1
  98. package/dist/{chunk-YBE66FBR.js → chunk-P5J7G7OV.js} +1 -1
  99. package/dist/{chunk-4L5YRMJ4.js → chunk-PEA5Y6DD.js} +9 -9
  100. package/dist/{chunk-DPFEQQQU.js → chunk-POBVGDZP.js} +1 -1
  101. package/dist/{chunk-RFWBNKKB.js → chunk-PPHGBEJA.js} +10 -10
  102. package/dist/{chunk-IMH5H47S.js → chunk-PTLVNC3V.js} +6 -6
  103. package/dist/chunk-PU2GJVMG.js +1 -0
  104. package/dist/{chunk-TJG76Y7I.js → chunk-PWERFHOU.js} +9 -9
  105. package/dist/{chunk-ZFWCTHR4.js → chunk-PWON7O3N.js} +6 -6
  106. package/dist/{chunk-6MFKKTCE.js → chunk-Q7FPGOUY.js} +24 -24
  107. package/dist/{chunk-M4REKOGO.js → chunk-QCLKRFL4.js} +5 -5
  108. package/dist/{chunk-N4LMFGRI.js → chunk-R36VZ35L.js} +6 -6
  109. package/dist/{chunk-CCZHSISF.js → chunk-REFPTKRD.js} +2 -2
  110. package/dist/{chunk-THAPVKEJ.js → chunk-RTK77DMP.js} +11 -11
  111. package/dist/{chunk-PWOVSR7N.js → chunk-RXCBSQA2.js} +2 -2
  112. package/dist/{chunk-JDLJ7DHV.js → chunk-S4RFJTGR.js} +1 -1
  113. package/dist/{chunk-D5HFWOW7.js → chunk-SP4S4HUJ.js} +16 -16
  114. package/dist/{chunk-P73ZJ6QR.js → chunk-T46I4YOI.js} +1 -1
  115. package/dist/{chunk-VY3UA6AR.js → chunk-TAHHZGRH.js} +1 -1
  116. package/dist/{chunk-FBZUEZK7.js → chunk-TTD2M6RF.js} +1 -1
  117. package/dist/{chunk-AAJSE5HA.js → chunk-U6W3OU2X.js} +1 -1
  118. package/dist/{chunk-RB3BMRNA.js → chunk-U75MSD4F.js} +1 -1
  119. package/dist/{chunk-XC2GUCTG.js → chunk-UGA5NGW4.js} +1 -1
  120. package/dist/chunk-UZESZ3EB.js +1 -0
  121. package/dist/chunk-VUBDHFG5.js +4 -0
  122. package/dist/{chunk-K4KUGKWP.js → chunk-W4IH3BE3.js} +21 -21
  123. package/dist/{chunk-B5KX7PDG.js → chunk-W6REY3SV.js} +3 -3
  124. package/dist/{chunk-WZWSFYXJ.js → chunk-WBUAO7T7.js} +1 -1
  125. package/dist/{chunk-P6H2B635.js → chunk-WNFZYTWW.js} +9 -9
  126. package/dist/{chunk-HPKQYUQT.js → chunk-WYAKASF3.js} +1 -1
  127. package/dist/{chunk-C5OPAULN.js → chunk-XGEN76DG.js} +1 -1
  128. package/dist/{chunk-ZKILZFUI.js → chunk-XIX72C7K.js} +1 -1
  129. package/dist/{chunk-3AUN7JSM.js → chunk-XJK6VNXV.js} +1 -1
  130. package/dist/{chunk-26KHYLJN.js → chunk-XLPUIGMO.js} +1 -1
  131. package/dist/{chunk-VQBKRBBR.js → chunk-XNKNX5L3.js} +1 -1
  132. package/dist/chunk-Y2M5PP2C.js +28 -0
  133. package/dist/{chunk-66NJCU4W.js → chunk-Y5RTVKMB.js} +8 -8
  134. package/dist/{chunk-JXJNQHPY.js → chunk-Y5YVKUM4.js} +19 -19
  135. package/dist/{chunk-5CHJA4RL.js → chunk-Y6FULJWJ.js} +7 -7
  136. package/dist/chunk-Y7D2CZ4H.js +13 -0
  137. package/dist/chunk-YTLUSBDY.js +14 -0
  138. package/dist/{chunk-2YUAR2EH.js → chunk-YX3JD6PA.js} +5 -5
  139. package/dist/{chunk-3WUVYXCF.js → chunk-ZA6ANC2D.js} +5 -5
  140. package/dist/{chunk-5ZOYYL46.js → chunk-ZEGCKIAL.js} +3 -3
  141. package/dist/chunk-ZSVU44OB.js +6 -0
  142. package/dist/data/DataTable.js +1 -1
  143. package/dist/data/EntityList.js +1 -1
  144. package/dist/data/Gantt.js +1 -1
  145. package/dist/data/Kanban.js +1 -1
  146. package/dist/data/ListLoadError.js +1 -1
  147. package/dist/data/ResizableTable.js +1 -1
  148. package/dist/data/statusColumn.js +1 -1
  149. package/dist/data/useColumnConfig.js +1 -1
  150. package/dist/data/useSort.js +1 -1
  151. package/dist/format/index.js +1 -1
  152. package/dist/forms/AlignmentGrid.js +1 -1
  153. package/dist/forms/BorderInput.js +1 -1
  154. package/dist/forms/BrandAssetEditor.js +1 -1
  155. package/dist/forms/Button.js +1 -1
  156. package/dist/forms/Calendar.js +1 -1
  157. package/dist/forms/ColorPicker.js +1 -1
  158. package/dist/forms/ComposerAttachments.js +1 -1
  159. package/dist/forms/CornersInput.js +1 -1
  160. package/dist/forms/DatePicker.js +1 -1
  161. package/dist/forms/DateRangePicker.js +1 -1
  162. package/dist/forms/DisplayChips.js +1 -1
  163. package/dist/forms/FilePicker.js +1 -1
  164. package/dist/forms/IconButton.js +1 -1
  165. package/dist/forms/IconPicker.js +1 -1
  166. package/dist/forms/Input.js +1 -1
  167. package/dist/forms/InputNumber.js +1 -1
  168. package/dist/forms/LinkPicker.js +1 -1
  169. package/dist/forms/MediaLibrary.js +1 -1
  170. package/dist/forms/MediaUploadField.js +1 -1
  171. package/dist/forms/MediaUploadGrid.js +1 -1
  172. package/dist/forms/MediaUsedInList.js +1 -1
  173. package/dist/forms/NumericKeypad.js +1 -1
  174. package/dist/forms/PictureTiles.js +1 -1
  175. package/dist/forms/PositionInput.js +1 -1
  176. package/dist/forms/RenameField.js +1 -1
  177. package/dist/forms/Segmented.js +1 -1
  178. package/dist/forms/Select.js +1 -1
  179. package/dist/forms/SidesInput.js +1 -1
  180. package/dist/forms/Slider.js +1 -1
  181. package/dist/forms/Snippet.js +1 -1
  182. package/dist/forms/SplitButton.js +1 -1
  183. package/dist/forms/TagInput.js +1 -1
  184. package/dist/forms/TextToolbar.js +1 -1
  185. package/dist/forms/UnitMenu.js +1 -1
  186. package/dist/forms/WidthsBar.js +1 -1
  187. package/dist/forms/dropdownPosition.js +1 -1
  188. package/dist/hooks/index.d.ts +15 -14
  189. package/dist/hooks/index.js +1 -1
  190. package/dist/hooks/useTheme.js +1 -1
  191. package/dist/icons/index.js +1 -1
  192. package/dist/index.d.ts +43 -2
  193. package/dist/index.js +126 -126
  194. package/dist/map/index.js +5 -5
  195. package/dist/markdown/index.js +1 -1
  196. package/dist/page-tabs/index.js +5 -5
  197. package/dist/shell/AppUpdateBanner.js +1 -1
  198. package/dist/shell/ColoredBadge.js +1 -1
  199. package/dist/shell/ConfirmDialog.js +1 -1
  200. package/dist/shell/ContextMenu.js +1 -1
  201. package/dist/shell/Dialog.js +1 -1
  202. package/dist/shell/Drawer.js +1 -1
  203. package/dist/shell/DropdownMenu.js +1 -1
  204. package/dist/shell/EditableGrid.js +1 -1
  205. package/dist/shell/FloatingBar.js +1 -1
  206. package/dist/shell/GlobalSearch.js +1 -1
  207. package/dist/shell/HelpCenter.js +1 -1
  208. package/dist/shell/IconRail.js +1 -1
  209. package/dist/shell/ImageLightbox.js +1 -1
  210. package/dist/shell/ItemCount.js +1 -1
  211. package/dist/shell/Kbd.js +1 -1
  212. package/dist/shell/LanguageSelect.js +1 -1
  213. package/dist/shell/Markdown.js +1 -1
  214. package/dist/shell/MilestoneTimeline.js +1 -1
  215. package/dist/shell/Popover.js +1 -1
  216. package/dist/shell/PopupMenu.js +1 -1
  217. package/dist/shell/ProductionTimeline.js +1 -1
  218. package/dist/shell/ResizeHandle.js +1 -1
  219. package/dist/shell/SearchableSelect.js +1 -1
  220. package/dist/shell/SettingReset.js +1 -1
  221. package/dist/shell/SettingRow.js +1 -1
  222. package/dist/shell/ShellPrefs.js +1 -1
  223. package/dist/shell/SidebarLayout.js +1 -1
  224. package/dist/shell/SidebarNav.js +1 -1
  225. package/dist/shell/SortableList.js +1 -1
  226. package/dist/shell/StatusBadge.js +1 -1
  227. package/dist/shell/Tabs.js +1 -1
  228. package/dist/shell/TimelineTrack.js +1 -1
  229. package/dist/shell/Tooltip.js +1 -1
  230. package/dist/shell/TopNav.js +1 -1
  231. package/dist/shell/TransferProgress.js +1 -1
  232. package/dist/shell/Tree.js +1 -1
  233. package/dist/shell/discardGuard.js +1 -1
  234. package/dist/telemetry/index.js +1 -1
  235. package/dist/templates/AuthScreen.js +1 -1
  236. package/dist/templates/ChatTemplate.js +1 -1
  237. package/dist/templates/CheckoutTemplate.js +1 -1
  238. package/dist/templates/DashboardTemplate.js +1 -1
  239. package/dist/templates/DataTablePage.js +1 -1
  240. package/dist/templates/EmailTemplate.js +1 -1
  241. package/dist/templates/ErrorBoundary.js +1 -1
  242. package/dist/templates/FormLayoutPage.js +1 -1
  243. package/dist/templates/GalleryTemplate.js +1 -1
  244. package/dist/ui/index.js +1 -1
  245. package/dist/version.js +1 -1
  246. package/package.json +1 -1
  247. package/dist/Calculator-PKAM5ERT.js +0 -29
  248. package/dist/PomodoroTimer-PBSAKRX5.js +0 -91
  249. package/dist/Sidebar-HAIHWIJD.js +0 -44
  250. package/dist/chunk-2AEYVQ2R.js +0 -2
  251. package/dist/chunk-3GJVTK4H.js +0 -11
  252. package/dist/chunk-3TD3GH53.js +0 -7
  253. package/dist/chunk-44ERJYNW.js +0 -6
  254. package/dist/chunk-AAFPAQXH.js +0 -13
  255. package/dist/chunk-EX3DARI3.js +0 -7
  256. package/dist/chunk-F2RAIGCG.js +0 -6
  257. package/dist/chunk-FLQXMCB3.js +0 -8
  258. package/dist/chunk-N6PMH6DU.js +0 -6
  259. package/dist/chunk-O5ZBRG2G.js +0 -1
  260. package/dist/chunk-PP3WUT2G.js +0 -15
  261. package/dist/chunk-PWX64YBI.js +0 -28
  262. package/dist/chunk-RJVIKGHJ.js +0 -4
  263. package/dist/chunk-SRI2D23Y.js +0 -14
  264. package/dist/chunk-UTISUEO4.js +0 -2
  265. package/dist/chunk-UVHXVSB2.js +0 -1
  266. package/dist/chunk-WCCS4VFE.js +0 -1
  267. package/dist/chunk-ZDXRSY2Y.js +0 -1
  268. package/dist/chunk-ZISKHQZY.js +0 -3
  269. /package/dist/{chunk-4BYJABCX.js → chunk-5YTZBYG4.js} +0 -0
@@ -0,0 +1,44 @@
1
+ import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as i,toggleOpenSection as a,writeStored as o}from"./chunk-AQH6MAYK.js";import{ResizeHandle as l}from"./chunk-5SQHRDFC.js";import{openGlobalSearch as s}from"./chunk-EHNW3UNC.js";import{partitionNav as c,visibleNavChildren as d,visibleSectionItems as m,rowsContainRoute as u}from"./chunk-HGOWQO63.js";import{BrandMark as h}from"./chunk-MI67DI3H.js";import{RAIL_MENU_GAP as p,navSections as b,startMenuCategories as f,RAIL_W as g,TAB_STRIP_H as x,RAIL_COLLAPSED_INSET as k,RAIL_MAX_W as y,RAIL_MIN_W as v,navIcons as N,sectionIcons as j}from"./chunk-4LXCCZDM.js";import"./chunk-5A7MWTXX.js";import{CloseButton as w}from"./chunk-AH5MLH54.js";import"./chunk-DBQNYJZ6.js";import"./chunk-2QY5BJLA.js";import"./chunk-MYH5H43C.js";import{PopupMenu as C,PopupMenuItem as S,PopupMenuDivider as H}from"./chunk-RTK77DMP.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-IVEM2BPC.js";import{Icon as $}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-AJPQJ7TC.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useShellStrings as L}from"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useMemo as A,useState as z,useRef as T,useEffect as W,isValidElement as M,cloneElement as I}from"react";import{jsx as R,jsxs as Q,Fragment as K}from"react/jsx-runtime";var D="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),P=150,E=250;function J(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+p,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var O=(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(" "),Y="flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",B="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function U({open:e,children:t}){const r=T(null);return W(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */R("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */R("div",{className:"min-h-0 overflow-hidden",children:t})})}function F({open:e}){/* @__PURE__ */
2
+ return R($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function G({dir:e}){/* @__PURE__ */
3
+ return 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 Z({className:e}){/* @__PURE__ */
4
+ return R($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var V=e=>.75+1.75*e+"rem";function X({width:p,openWidth:P=g,collapsed:E,onToggleCollapsed:X,onResize:_,onHome:q,onOpen:ee,activeRoute:te,profile:re,user:ne,onLogout:ie,onSwitchToDesktop:ae,onReportBug:oe,onClose:le,navSections:se=b,navIcons:ce=N,sectionIcons:de=j,categories:me=f,productName:ue,productIcon:he,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:fe=null,logoIsLight:ge=null}){const xe=L().layout,{hasAnyPerm:ke}=e(),ye=A(()=>c(se,me,ke),[se,me,ke]),[ve,Ne]=z(()=>t(r(n))),je=A(()=>[...ye.topItems.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),...[...ye.erpSections,...ye.systemSections,...ye.virtualSections,...ye.footerSections].map(e=>e.label)],[ye,ke]),we=(e,t=je)=>Ne(r=>{const i=a(r,e,t);return o(n,JSON.stringify([...i])),i}),[Ce,Se]=z(!1),He=T(null),$e=E&&!le,[Le,Ae]=z(!1),ze=T("pointer"),Te=T(void 0),We=T(!1),Me=T(null),Ie=()=>{clearTimeout(Te.current),Te.current=void 0},Re=e=>{Ie(),ze.current=e,Ae(!0)},Qe=()=>{Ie(),Ae(!1)};W(()=>{Ie(),Ae(!1)},[E]),W(()=>()=>Ie(),[]),W(()=>{if(!Le)return;const e=e=>{const t=e.target;t&&(Me.current?.contains(t)||t.closest?.('[data-popup-menu-tree], [role="menu"]'))||(Ie(),Ae(!1))};return document.addEventListener("pointerdown",e,!0),()=>document.removeEventListener("pointerdown",e,!0)},[Le]);const Ke=E&&!Le,De=E&&Le?P:p,Pe=(e,t)=>{Qe(),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Ee=(e,t)=>{const r=t[e];/* @__PURE__ */
5
+ return R("span",{className:B,"aria-hidden":"true",children:r&&M(r)?I(r,{className:"size-[18px]"}):r})},Je=e=>e.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),Oe=(e,t,r=je)=>{const n=d(e,ke),i=e.menuLabel??e.label;if(n.length>0){const a=`child:${e.to}`,o=ve.has(a),l=!o&&u(n,te,ke);/* @__PURE__ */
6
+ return Q("div",{children:[
7
+ /* @__PURE__ */Q("button",{type:"button",onClick:()=>we(a,r),"aria-expanded":o,className:O(l,!1),style:t>0?{paddingLeft:V(t)}:void 0,children:[0===t&&Ee(e.to,ce),
8
+ /* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:i}),
9
+ /* @__PURE__ */R(F,{open:o})]}),
10
+ /* @__PURE__ */R(U,{open:o,children:/* @__PURE__ */R("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>Oe(e,t+1,Je(n)))})}),e.dividerAfter&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:V(t)},"aria-hidden":"true"})]},e.to)}const a=e.to===te;/* @__PURE__ */
11
+ return Q("div",{children:[
12
+ /* @__PURE__ */Q("button",{type:"button",onClick:t=>Pe(e,t),onAuxClick:t=>{1===t.button&&Pe(e,t)},"aria-current":a?"page":void 0,className:O(a,!1),style:t>0?{paddingLeft:V(t)}:void 0,children:[0===t&&Ee(e.to,ce),
13
+ /* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:i})]}),e.dividerAfter&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:V(t)},"aria-hidden":"true"})]},e.to)},Ye=(e,t)=>{const r=t?e.items:m(e,ke);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */R("span",{className:B,"aria-hidden":"true",children:e.icon}):Ee(e.label,de),i=e.menuLabel??e.label,a=u(r,te,ke),o="dividerAfter"in e&&e.dividerAfter;if(Ke)/* @__PURE__ */
14
+ return Q("div",{children:[
15
+ /* @__PURE__ */R("button",{type:"button",title:i,"aria-label":i,"aria-expanded":!1,onClick:()=>{ve.has(e.label)||we(e.label),Re("tap")},className:O(a,!0),children:n}),o&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const l=ve.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
16
+ return Q("div",{children:[
17
+ /* @__PURE__ */Q("button",{type:"button",onClick:()=>we(e.label),"aria-expanded":l,"aria-controls":s,className:O(!l&&a,!1),children:[n,
18
+ /* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:i}),
19
+ /* @__PURE__ */R(F,{open:l})]}),
20
+ /* @__PURE__ */R(U,{open:l,children:/* @__PURE__ */R("div",{id:s,role:"group","aria-label":i,className:"space-y-0.5 pt-0.5",children:r.map(e=>Oe(e,1,Je(r)))})}),o&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Be=re?.first_name?`${re.first_name} ${re.last_name||""}`.trim():ne?.email||"",Ue=(re?.first_name?.charAt(0)||ne?.email?.charAt(0)||"?").toUpperCase(),Fe=re?.avatar_url?/* @__PURE__ */R("img",{src:re.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */R("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ue}),Ge=Ce?He.current?.getBoundingClientRect():void 0,Ze=Ke?"":"px-3",Ve=Ke?{paddingInline:k}:void 0,Xe=`${E?xe.expandSidebar:xe.collapseSidebar} (${D?"⌘":"Ctrl"} .)`,_e=q?{run:q,label:xe.goHome,title:xe.goHome}:le?null:{run:X,label:E?xe.expandSidebar:xe.collapseSidebar,title:Xe},qe=/* @__PURE__ */Q(K,{children:[he&&/* @__PURE__ */R(h,{src:he,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:fe,isLight:ge,size:28,decorative:!0}),!Ke&&/* @__PURE__ */Q("span",{className:"min-w-0 text-left leading-tight",children:[
21
+ /* @__PURE__ */R("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),pe&&/* @__PURE__ */R("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),et=ye.erpSections.length>0||ye.systemSections.length>0||ye.virtualSections.length>0;/* @__PURE__ */
22
+ return Q("aside",{ref:Me,"aria-label":xe.navLabel,"data-rail-peek":Le?"":void 0,className:`fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong ${E?"overflow-hidden transition-[width] duration-150 ease-out motion-reduce:transition-none":""} ${Le?"rounded-r-(--radius-panel)":""}`,style:{width:De,boxShadow:Le?"var(--elevation-popup)":void 0},onPointerEnter:e=>{"touch"!==e.pointerType&&(We.current=!0,$e&&(Le?Ie():(Ie(),Te.current=setTimeout(()=>Re("pointer"),150))))},onPointerLeave:e=>{"touch"!==e.pointerType&&(We.current=!1,$e&&(Ie(),Le&&!Ce&&"pointer"===ze.current&&(Te.current=setTimeout(Qe,250))))},onFocus:e=>{$e&&!Le&&(e=>{try{return e.matches(":focus-visible")}catch{return!1}})(e.target)&&Re("focus")},onBlur:e=>{if(!Le||"focus"!==ze.current)return;const t=e.relatedTarget;t&&Me.current?.contains(t)||Ce||We.current||Qe()},onKeyDown:e=>{"Escape"===e.key&&Le&&Qe()},children:[
23
+ /* @__PURE__ */Q("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Ke?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:x},children:[_e?/* @__PURE__ */R("button",{type:"button",onClick:_e.run,"aria-label":_e.label,title:_e.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Ke?"justify-center p-0.5":"-ml-1 p-1"),children:qe}):/* @__PURE__ */R("span",{className:"flex min-w-0 items-center gap-2",children:qe}),le?/* @__PURE__ */R(w,{onClose:le,label:xe.closeMenu}):E?Le&&
24
+ /* @__PURE__ */R("button",{type:"button",onClick:()=>{Qe(),X()},"aria-label":xe.keepSidebarOpen,title:`${xe.keepSidebarOpen} (${D?"⌘":"Ctrl"} .)`,className:Y,children:/* @__PURE__ */R(G,{dir:"right"})}):/* @__PURE__ */R("button",{type:"button",onClick:X,"aria-label":xe.collapseSidebar,title:`${xe.collapseSidebar} (${D?"⌘":"Ctrl"} .)`,className:Y,children:/* @__PURE__ */R(G,{dir:"left"})})]}),
25
+ /* @__PURE__ */R("div",{className:`shrink-0 pt-3 ${Ze}`,style:Ve,children:Ke?/* @__PURE__ */R("button",{type:"button",onClick:s,"aria-label":xe.search,title:`${xe.search} (${D?"⌘K":"Ctrl K"})`,className:O(!1,!0),children:/* @__PURE__ */R(Z,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */Q("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
26
+ /* @__PURE__ */R(Z,{className:"size-3.5 text-gray-500"}),
27
+ /* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:xe.search}),
28
+ /* @__PURE__ */R("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:D?"⌘K":"Ctrl K"})]})}),
29
+ /* @__PURE__ */Q("nav",{"aria-label":xe.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Ze} ${Ke?"space-y-1":"space-y-0.5"}`,style:Ve,children:[Ke&&/* @__PURE__ */R("button",{type:"button",onClick:X,"aria-label":xe.expandSidebar,title:`${xe.expandSidebar} (${D?"⌘":"Ctrl"} .)`,className:`${O(!1,!0)} mb-3`,children:/* @__PURE__ */R(G,{dir:"right"})}),ye.topItems.map(e=>{if(!Ke)return Oe(e,0);const t=d(e,ke),r=e.to===te||u(t,te,ke),n=e.menuLabel??e.label;/* @__PURE__ */
30
+ return Q("div",{children:[
31
+ /* @__PURE__ */R("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Pe(e,r);const n=`child:${e.to}`;ve.has(n)||we(n),Re("tap")},className:O(r,!0),children:Ee(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ye.topItems.length>0&&et&&!ye.topItems[ye.topItems.length-1].dividerAfter&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ye.erpSections.map(e=>Ye(e,!1)),ye.systemSections.map(e=>Ye(e,!1)),ye.virtualSections.map(e=>Ye(e,!0)),ye.footerSections.length>0&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ye.footerSections.map(e=>Ye(e,!1))]}),
32
+ /* @__PURE__ */R("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Ze}`,style:Ve,children:/* @__PURE__ */Q("button",{ref:He,type:"button",onClick:()=>Se(e=>!e),"aria-haspopup":"menu","aria-expanded":Ce,"aria-label":Ke?xe.accountMenu(Be):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Ke?"justify-center py-2":"px-2 py-2"),children:[Fe,!Ke&&/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 text-left",children:[
33
+ /* @__PURE__ */R("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Be}),ne?.email&&Be!==ne.email&&/* @__PURE__ */R("span",{className:"block truncate text-2xs text-ink-faint",children:ne.email})]})]})}),_&&!E&&!le&&/* @__PURE__ */R(l,{side:"left",width:p,onResize:_,min:v,max:y,defaultWidth:g,storageKey:i,label:xe.resizeSidebar}),Ce&&Ge&&/* @__PURE__ */Q(C,{portal:!0,minWidth:224,onClose:()=>{Se(!1),Le&&"pointer"===ze.current&&!We.current&&Qe()},style:J(De,Ge,window.innerHeight),children:[Ke&&/* @__PURE__ */Q("div",{className:"border-b border-line px-3 py-3",children:[
34
+ /* @__PURE__ */R("p",{className:"truncate text-sm font-semibold text-gray-800",children:Be}),ne?.email&&/* @__PURE__ */R("p",{className:"truncate text-xs text-gray-500",children:ne.email})]}),
35
+ /* @__PURE__ */Q(S,{onClick:()=>{Se(!1),Qe(),ee("/profile",!1)},children:[
36
+ /* @__PURE__ */R($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.profile]}),ye.footerItems.map(e=>/* @__PURE__ */Q(S,{onClick:()=>{Se(!1),Pe(e)},children:[
37
+ /* @__PURE__ */R("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */Q(S,{onClick:()=>{Se(!1),Qe(),oe()},children:[
38
+ /* @__PURE__ */R($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.reportIssue]}),
39
+ /* @__PURE__ */R(H,{}),ae&&/* @__PURE__ */Q(K,{children:[
40
+ /* @__PURE__ */Q(S,{onClick:()=>{Se(!1),Qe(),ae()},children:[
41
+ /* @__PURE__ */R($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.switchToDesktop]}),
42
+ /* @__PURE__ */R(H,{})]}),
43
+ /* @__PURE__ */Q(S,{danger:!0,onClick:()=>{Se(!1),Qe(),ie()},children:[
44
+ /* @__PURE__ */R($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.signOut]})]})]})}export{E as RAIL_PEEK_CLOSE_MS,P as RAIL_PEEK_OPEN_MS,J as accountMenuPosition,X as default};
@@ -1,16 +1,16 @@
1
- import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-26KHYLJN.js";import{useWidgetSettings as n}from"./chunk-VGUB7LPF.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-4VFEPP2W.js";import"./chunk-44ERJYNW.js";import"./chunk-EIFNESXS.js";import"./chunk-LC2UF3AA.js";import"./chunk-VY6OQRZA.js";import"./chunk-LG6NDTHZ.js";import"./chunk-4BYJABCX.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-UVPDEGIA.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-AW7TOB6N.js";import"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import"./chunk-DWGYC7OD.js";import"./chunk-NWS5G7FE.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-YDJ5IZOU.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useState as r,useCallback as c}from"react";import{jsxs as s,Fragment as i,jsx as a}from"react/jsx-runtime";var o=["AAPL","MSFT","GOOGL","TSLA","NVDA"],m="stock_symbols",h="stock_appearance",l={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(l);function u(){try{const t=JSON.parse(localStorage.getItem(m)||"");if(Array.isArray(t)&&t.length)return t.slice(0,8)}catch{}return o}var d=t=>`${t>=0?"+":""}${t.toFixed(2)}`;function k(){const[o,k]=r(u),[g,j]=r(()=>t(h)),[x,N]=r(!1),[b,f]=r([]),[y,A]=r(g),[v,S]=r(""),D=c(()=>{f([...o]),A({...g}),S(""),N(!0)},[o,g]);n(D);const P=()=>{const t=v.trim().toUpperCase();!t||b.includes(t)||b.length>=8||(f(e=>[...e,t]),S(""))},F=p.filter(t=>!b.includes(t));/* @__PURE__ */
1
+ import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-XLPUIGMO.js";import{useWidgetSettings as n}from"./chunk-6IP4Q3AT.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-TTD2M6RF.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-2XDO7FZC.js";import"./chunk-ZSVU44OB.js";import"./chunk-EIFNESXS.js";import"./chunk-7WF6LFOJ.js";import"./chunk-CJ4OEY3T.js";import"./chunk-AH5MLH54.js";import"./chunk-5YTZBYG4.js";import"./chunk-VWGWZY7A.js";import"./chunk-DBQNYJZ6.js";import"./chunk-6X32SWQI.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-POBVGDZP.js";import"./chunk-AW7TOB6N.js";import"./chunk-M5IZ7QLQ.js";import"./chunk-XNKNX5L3.js";import"./chunk-DWGYC7OD.js";import"./chunk-MYH5H43C.js";import"./chunk-RTK77DMP.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EDRELF6L.js";import"./chunk-MEP6CZJ3.js";import"./chunk-IVEM2BPC.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-G3TC2GIA.js";import"./chunk-AJPQJ7TC.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useState as r,useCallback as c}from"react";import{jsxs as s,Fragment as i,jsx as a}from"react/jsx-runtime";var o=["AAPL","MSFT","GOOGL","TSLA","NVDA"],m="stock_symbols",h="stock_appearance",l={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(l);function u(){try{const t=JSON.parse(localStorage.getItem(m)||"");if(Array.isArray(t)&&t.length)return t.slice(0,8)}catch{}return o}var d=t=>`${t>=0?"+":""}${t.toFixed(2)}`;function k(){const[o,k]=r(u),[g,j]=r(()=>t(h)),[x,N]=r(!1),[b,f]=r([]),[y,v]=r(g),[P,T]=r(""),A=c(()=>{f([...o]),v({...g}),T(""),N(!0)},[o,g]);n(A);const M=()=>{const t=P.trim().toUpperCase();!t||b.includes(t)||b.length>=8||(f(e=>[...e,t]),T(""))},S=p.filter(t=>!b.includes(t));/* @__PURE__ */
2
2
  return s(i,{children:[
3
3
  /* @__PURE__ */a("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${g.activeOpacity/100})`,backdropFilter:g.activeBlur>0?`blur(${g.activeBlur}px)`:void 0},children:/* @__PURE__ */a("div",{className:"px-4 py-3",children:0===o.length?/* @__PURE__ */a("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */a("div",{className:"space-y-0.5",children:o.map(t=>{const e=l[t],n=(e?.change??0)>=0,r=e?e.change>0?"text-green-600":e.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
4
4
  return s("div",{className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0",children:[
5
5
  /* @__PURE__ */a("span",{className:"text-sm font-bold text-gray-800 tracking-tight",children:t}),e?/* @__PURE__ */s("div",{className:"flex flex-col items-end leading-tight",children:[
6
6
  /* @__PURE__ */a("span",{className:"text-sm font-mono font-semibold text-gray-900 tabular-nums",children:(c=e.price,`$${c.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`)}),
7
7
  /* @__PURE__ */s("span",{className:`text-2xs font-medium tabular-nums ${r}`,children:[n?"▲":"▼"," ",d(e.change)," (",d(e.changePct),"%)"]})]}):/* @__PURE__ */a("span",{className:"text-sm font-mono text-gray-400 tabular-nums",children:"—"})]},t);var c})})})}),
8
- /* @__PURE__ */a(e,{open:x,onClose:()=>N(!1),title:"Stock Settings",appearance:y,onAppearanceChange:A,onSave:()=>{const t=b.map(t=>t.toUpperCase()).slice(0,8);k(t),j(y),localStorage.setItem(m,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(y)),N(!1)},children:/* @__PURE__ */s("div",{children:[
8
+ /* @__PURE__ */a(e,{open:x,onClose:()=>N(!1),title:"Stock Settings",appearance:y,onAppearanceChange:v,onSave:()=>{const t=b.map(t=>t.toUpperCase()).slice(0,8);k(t),j(y),localStorage.setItem(m,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(y)),N(!1)},children:/* @__PURE__ */s("div",{children:[
9
9
  /* @__PURE__ */s("h3",{className:"text-sm font-semibold text-ink mb-2",children:["Symbols ",
10
10
  /* @__PURE__ */s("span",{className:"text-2xs font-normal text-ink-faintest",children:["(",b.length,"/",8,")"]})]}),
11
11
  /* @__PURE__ */s("div",{className:"space-y-1 mb-2",children:[b.map((t,e)=>/* @__PURE__ */s("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
12
12
  /* @__PURE__ */a("span",{className:"text-sm font-semibold text-gray-700",children:t}),
13
13
  /* @__PURE__ */a("button",{onClick:()=>f(t=>t.filter((t,n)=>n!==e)),className:"text-red-400 hover:text-red-600",children:"×"})]},e)),0===b.length&&/* @__PURE__ */a("p",{className:"text-2xs text-ink-faintest italic",children:"No symbols — add a ticker below."})]}),b.length<8?/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
14
- /* @__PURE__ */a("input",{value:v,onChange:t=>S(t.target.value),onKeyDown:t=>{"Enter"===t.key&&P()},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__ */a("button",{onClick:P,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */s("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",8," symbols — remove one to add another."]}),F.length>0&&b.length<8&&/* @__PURE__ */a("div",{className:"flex flex-wrap gap-2 mt-2",children:F.map(t=>/* @__PURE__ */a("button",{onClick:()=>f(e=>e.length<8?[...e,t]:e),className:"text-2xs font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:t},t))}),
14
+ /* @__PURE__ */a("input",{value:P,onChange:t=>T(t.target.value),onKeyDown:t=>{"Enter"===t.key&&M()},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__ */a("button",{onClick:M,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */s("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",8," symbols — remove one to add another."]}),S.length>0&&b.length<8&&/* @__PURE__ */a("div",{className:"flex flex-wrap gap-2 mt-2",children:S.map(t=>/* @__PURE__ */a("button",{onClick:()=>f(e=>e.length<8?[...e,t]:e),className:"text-2xs font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:t},t))}),
16
16
  /* @__PURE__ */a("p",{className:"text-2xs text-ink-faintest mt-2",children:"Demo prices — static sample data, no live feed."})]})})]})}export{k as default};
@@ -1,4 +1,4 @@
1
- import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,cityClock as r,toFahrenheit as n}from"./chunk-HYHZEQMG.js";import{loadAppearance as i,WidgetSettingsModal as s}from"./chunk-26KHYLJN.js";import{userZone as o}from"./chunk-NHKT5IH6.js";import"./chunk-36BRD5J3.js";import"./chunk-JRQMX4PK.js";import"./chunk-LF27WIN2.js";import{useWidgetSettings as l}from"./chunk-VGUB7LPF.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-4VFEPP2W.js";import"./chunk-44ERJYNW.js";import"./chunk-EIFNESXS.js";import"./chunk-LC2UF3AA.js";import"./chunk-VY6OQRZA.js";import"./chunk-LG6NDTHZ.js";import"./chunk-4BYJABCX.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-UVPDEGIA.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as c}from"./chunk-DPFEQQQU.js";import"./chunk-AW7TOB6N.js";import"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import"./chunk-DWGYC7OD.js";import"./chunk-NWS5G7FE.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-YDJ5IZOU.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useState as d,useEffect as h,useCallback as p}from"react";import{jsx as u,jsxs as f,Fragment as y}from"react/jsx-runtime";var x="weather_city",g="weather_appearance",b={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function k(){const e="undefined"!=typeof localStorage?localStorage.getItem(x):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(x,e[0]),e[0]}catch{}return function(){const e=o();for(const[t,r]of Object.entries(a))if(r.tz===e)return t;return"London"}()}var w=n;function v(e,t=!1){const{time:a,ampm:n}=r(e,/* @__PURE__ */new Date,t);return n?`${a} ${n}`:a}function N(){/* @__PURE__ */
1
+ import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,cityClock as r,toFahrenheit as n}from"./chunk-HYHZEQMG.js";import{loadAppearance as i,WidgetSettingsModal as s}from"./chunk-XLPUIGMO.js";import{userZone as o}from"./chunk-NHKT5IH6.js";import"./chunk-36BRD5J3.js";import"./chunk-JRQMX4PK.js";import"./chunk-LF27WIN2.js";import{useWidgetSettings as l}from"./chunk-6IP4Q3AT.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-TTD2M6RF.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-2XDO7FZC.js";import"./chunk-ZSVU44OB.js";import"./chunk-EIFNESXS.js";import"./chunk-7WF6LFOJ.js";import"./chunk-CJ4OEY3T.js";import"./chunk-AH5MLH54.js";import"./chunk-5YTZBYG4.js";import"./chunk-VWGWZY7A.js";import"./chunk-DBQNYJZ6.js";import"./chunk-6X32SWQI.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as c}from"./chunk-POBVGDZP.js";import"./chunk-AW7TOB6N.js";import"./chunk-M5IZ7QLQ.js";import"./chunk-XNKNX5L3.js";import"./chunk-DWGYC7OD.js";import"./chunk-MYH5H43C.js";import"./chunk-RTK77DMP.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EDRELF6L.js";import"./chunk-MEP6CZJ3.js";import"./chunk-IVEM2BPC.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-G3TC2GIA.js";import"./chunk-AJPQJ7TC.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useState as d,useEffect as h,useCallback as p}from"react";import{jsx as u,jsxs as f,Fragment as y}from"react/jsx-runtime";var x="weather_city",g="weather_appearance",b={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function k(){const e="undefined"!=typeof localStorage?localStorage.getItem(x):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(x,e[0]),e[0]}catch{}return function(){const e=o();for(const[t,r]of Object.entries(a))if(r.tz===e)return t;return"London"}()}var w=n;function v(e,t=!1){const{time:a,ampm:n}=r(e,/* @__PURE__ */new Date,t);return n?`${a} ${n}`:a}function N(){/* @__PURE__ */
2
2
  return f("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
3
3
  /* @__PURE__ */u("div",{className:"absolute -top-5 -right-5 w-24 h-24",style:{animation:"wx-sun-rays 70s linear infinite"},children:/* @__PURE__ */u("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:Array.from({length:12}).map((e,t)=>/* @__PURE__ */u("rect",{x:49,y:3,width:2,height:14,rx:1,fill:"rgba(255, 232, 130, 0.55)",transform:`rotate(${30*t} 50 50)`},t))})}),
4
4
  /* @__PURE__ */u("div",{className:"absolute top-1 right-1 w-10 h-10 rounded-full",style:{background:"radial-gradient(circle at 35% 35%, #fff8cc 0%, #ffd84a 55%, #ff9e2a 100%)",boxShadow:"0 0 18px 5px rgba(255, 200, 80, 0.55)",animation:"wx-sun-pulse 4.5s ease-in-out infinite"}})]})}function j(){const e=Array.from({length:16}).map((e,t)=>({left:(53*t+11)%95+"%",top:(37*t+9)%78+"%",size:1+13*t%3,delay:.41*t%4+"s",duration:2.5+7*t%5*.6+"s"}));/* @__PURE__ */
@@ -9,7 +9,7 @@ return f("div",{className:"absolute inset-0 overflow-hidden pointer-events-none"
9
9
  /* @__PURE__ */u("stop",{offset:"1",stopColor:"#d4c98a"})]})}),
10
10
  /* @__PURE__ */u("circle",{cx:20,cy:20,r:13,fill:"url(#wx-moon-grad)"}),
11
11
  /* @__PURE__ */u("circle",{cx:26,cy:16,r:11,fill:"rgba(15,23,42,1)"})]})}),e.map((e,t)=>/* @__PURE__ */u("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:e.top,width:e.size,height:e.size,animation:`wx-twinkle ${e.duration} ease-in-out ${e.delay} infinite`}},t)),
12
- /* @__PURE__ */u("div",{className:"absolute",style:{left:"15%",top:"20%",animation:"wx-shooting-star 12s ease-out infinite"},children:/* @__PURE__ */u("div",{className:"w-12 h-px",style:{background:"linear-gradient(to right, transparent, rgba(255,255,255,0.95))",boxShadow:"0 0 4px rgba(255,255,255,0.8)"}})})]})}function S({tone:e="light"}){const t="light"===e?"rgba(255,255,255,0.78)":"rgba(220,228,240,0.45)",a=({scale:e=1})=>/* @__PURE__ */f("svg",{viewBox:"0 0 120 50",className:"w-32 h-12",style:{transform:`scale(${e})`,filter:"blur(0.6px)"},children:[
12
+ /* @__PURE__ */u("div",{className:"absolute",style:{left:"15%",top:"20%",animation:"wx-shooting-star 12s ease-out infinite"},children:/* @__PURE__ */u("div",{className:"w-12 h-px",style:{background:"linear-gradient(to right, transparent, rgba(255,255,255,0.95))",boxShadow:"0 0 4px rgba(255,255,255,0.8)"}})})]})}function T({tone:e="light"}){const t="light"===e?"rgba(255,255,255,0.78)":"rgba(220,228,240,0.45)",a=({scale:e=1})=>/* @__PURE__ */f("svg",{viewBox:"0 0 120 50",className:"w-32 h-12",style:{transform:`scale(${e})`,filter:"blur(0.6px)"},children:[
13
13
  /* @__PURE__ */u("ellipse",{cx:28,cy:36,rx:18,ry:11,fill:t}),
14
14
  /* @__PURE__ */u("ellipse",{cx:50,cy:28,rx:22,ry:15,fill:t}),
15
15
  /* @__PURE__ */u("ellipse",{cx:75,cy:32,rx:20,ry:12,fill:t}),
@@ -17,44 +17,44 @@ return f("div",{className:"absolute inset-0 overflow-hidden pointer-events-none"
17
17
  return f("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
18
18
  /* @__PURE__ */u("div",{className:"absolute",style:{top:"8%",animation:"wx-drift-cloud 42s linear infinite"},children:/* @__PURE__ */u(a,{scale:.9})}),
19
19
  /* @__PURE__ */u("div",{className:"absolute",style:{top:"40%",animation:"wx-drift-cloud 60s linear -22s infinite",opacity:.85},children:/* @__PURE__ */u(a,{scale:1.25})}),
20
- /* @__PURE__ */u("div",{className:"absolute",style:{top:"68%",animation:"wx-drift-cloud 78s linear -45s infinite",opacity:.7},children:/* @__PURE__ */u(a,{scale:.75})})]})}function A({heavy:e=!1}){const t=e?26:16,a=["wx-rain-a","wx-rain-b","wx-rain-c"],r=Array.from({length:t}).map((e,r)=>({left:(100*r/t+11*r%7)%100+"%",delay:.087*r%1.3+"s",height:12+r%4*5+"px",duration:.7+r%3*.18+"s",variant:a[r%a.length]}));/* @__PURE__ */
21
- return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:r.map((e,t)=>/* @__PURE__ */u("div",{className:"absolute",style:{left:e.left,top:"-20px",width:"1px",height:e.height,background:"linear-gradient(180deg, rgba(180,210,255,0) 0%, rgba(220,235,255,0.85) 90%, rgba(255,255,255,0.95) 100%)",transform:"rotate(8deg)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`,transformOrigin:"top"}},t))})}function D(){const e=["wx-snow-a","wx-snow-b","wx-snow-c"],t=Array.from({length:16}).map((t,a)=>({left:(100*a/16+13*a%5)%100+"%",delay:.43*a%5+"s",duration:4.5+a%5+"s",size:3+a%4*1.4,opacity:.65+7*a%4*.08,variant:e[a%e.length]}));/* @__PURE__ */
22
- return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:t.map((e,t)=>/* @__PURE__ */u("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:"-12px",width:e.size,height:e.size,opacity:e.opacity,boxShadow:"0 0 4px rgba(255,255,255,0.65)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`}},t))})}function F(){/* @__PURE__ */
20
+ /* @__PURE__ */u("div",{className:"absolute",style:{top:"68%",animation:"wx-drift-cloud 78s linear -45s infinite",opacity:.7},children:/* @__PURE__ */u(a,{scale:.75})})]})}function H({heavy:e=!1}){const t=e?26:16,a=["wx-rain-a","wx-rain-b","wx-rain-c"],r=Array.from({length:t}).map((e,r)=>({left:(100*r/t+11*r%7)%100+"%",delay:.087*r%1.3+"s",height:12+r%4*5+"px",duration:.7+r%3*.18+"s",variant:a[r%a.length]}));/* @__PURE__ */
21
+ return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:r.map((e,t)=>/* @__PURE__ */u("div",{className:"absolute",style:{left:e.left,top:"-20px",width:"1px",height:e.height,background:"linear-gradient(180deg, rgba(180,210,255,0) 0%, rgba(220,235,255,0.85) 90%, rgba(255,255,255,0.95) 100%)",transform:"rotate(8deg)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`,transformOrigin:"top"}},t))})}function C(){const e=["wx-snow-a","wx-snow-b","wx-snow-c"],t=Array.from({length:16}).map((t,a)=>({left:(100*a/16+13*a%5)%100+"%",delay:.43*a%5+"s",duration:4.5+a%5+"s",size:3+a%4*1.4,opacity:.65+7*a%4*.08,variant:e[a%e.length]}));/* @__PURE__ */
22
+ return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:t.map((e,t)=>/* @__PURE__ */u("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:"-12px",width:e.size,height:e.size,opacity:e.opacity,boxShadow:"0 0 4px rgba(255,255,255,0.65)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`}},t))})}function L(){/* @__PURE__ */
23
23
  return f("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
24
- /* @__PURE__ */u(A,{heavy:!0}),
24
+ /* @__PURE__ */u(H,{heavy:!0}),
25
25
  /* @__PURE__ */u("div",{className:"absolute inset-0 bg-white",style:{animation:"wx-flash 6s ease-out infinite"}}),
26
- /* @__PURE__ */u("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */u("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */u("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function H(){/* @__PURE__ */
27
- return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */u("div",{className:"absolute left-0 right-0",style:{top:10+22*t+"%",height:"14px",background:"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%)",filter:"blur(2px)",animation:`wx-fog-drift ${10+3*t}s ease-in-out ${.7*t}s infinite alternate`}},t))})}function C({code:e,isDay:t}){return 0===e||1===e?/* @__PURE__ */u(t?N:j,{}):2===e?/* @__PURE__ */f(y,{children:[/* @__PURE__ */u(t?N:j,{}),
28
- /* @__PURE__ */u(S,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */u(S,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */u(H,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */u(A,{}):[55,63,65,82].includes(e)?/* @__PURE__ */u(A,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */u(D,{}):[95,96,99].includes(e)?/* @__PURE__ */u(F,{}):null}function T(){const[r,n]=d(k),[o,N]=d(()=>i(g)),[j,S]=d(null),[A,D]=d(!0),[,F]=d(0);h(()=>{const e=setInterval(()=>F(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[H,T]=d(!1),[B,L]=d(r),[R,J]=d(o),{prefs:U,save:Z}=c(),I={...b,...U.weather_prefs??{}},[V,$]=d(I);l(p(()=>{L(r),J({...o}),$({...I}),T(!0)},[r,o,I])),h(()=>{let t=!1;return D(!0),e(r).then(e=>{t||(S(e),D(!1))}),()=>{t=!0}},[r]);const W=e=>I.useFahrenheit?`${w(e)}°F`:`${e}°`;if(A&&!j)/* @__PURE__ */
26
+ /* @__PURE__ */u("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */u("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */u("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function S(){/* @__PURE__ */
27
+ return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */u("div",{className:"absolute left-0 right-0",style:{top:10+22*t+"%",height:"14px",background:"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%)",filter:"blur(2px)",animation:`wx-fog-drift ${10+3*t}s ease-in-out ${.7*t}s infinite alternate`}},t))})}function M({code:e,isDay:t}){return 0===e||1===e?/* @__PURE__ */u(t?N:j,{}):2===e?/* @__PURE__ */f(y,{children:[/* @__PURE__ */u(t?N:j,{}),
28
+ /* @__PURE__ */u(T,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */u(T,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */u(S,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */u(H,{}):[55,63,65,82].includes(e)?/* @__PURE__ */u(H,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */u(C,{}):[95,96,99].includes(e)?/* @__PURE__ */u(L,{}):null}function D(){const[r,n]=d(k),[o,N]=d(()=>i(g)),[j,T]=d(null),[H,C]=d(!0),[,L]=d(0);h(()=>{const e=setInterval(()=>L(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[S,D]=d(!1),[F,A]=d(r),[J,Z]=d(o),{prefs:I,save:P}=c(),B={...b,...I.weather_prefs??{}},[G,X]=d(B);l(p(()=>{A(r),Z({...o}),X({...B}),D(!0)},[r,o,B])),h(()=>{let t=!1;return C(!0),e(r).then(e=>{t||(T(e),C(!1))}),()=>{t=!0}},[r]);const $=e=>B.useFahrenheit?`${w(e)}°F`:`${e}°`;if(H&&!j)/* @__PURE__ */
29
29
  return u("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-sky-400 to-blue-500 rounded-lg text-on-accent/80 text-xs",style:{minHeight:110},children:/* @__PURE__ */u(m,{size:"sm",padding:"",label:"Loading"})});if(!j)/* @__PURE__ */
30
- return u("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[Y,G,P]=t(j.code,j.isDay);/* @__PURE__ */
30
+ return u("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[O,Q,R]=t(j.code,j.isDay);/* @__PURE__ */
31
31
  return f(y,{children:[
32
32
  /* @__PURE__ */u("style",{children:"\n@keyframes wx-rain-a { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 0.95; } 100% { transform: translate(8px,140px); opacity: 0; } }\n@keyframes wx-rain-b { 0% { transform: translate(0,-20px); opacity: 0; } 12% { opacity: 0.85; } 100% { transform: translate(12px,140px); opacity: 0; } }\n@keyframes wx-rain-c { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(5px,140px); opacity: 0; } }\n@keyframes wx-snow-a { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.9; } 50% { transform: translate(10px,55px) rotate(180deg); } 100% { transform: translate(-4px,140px) rotate(360deg); opacity: 0; } }\n@keyframes wx-snow-b { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.85; } 50% { transform: translate(-12px,55px) rotate(-180deg); } 100% { transform: translate(6px,140px) rotate(-360deg); opacity: 0; } }\n@keyframes wx-snow-c { 0% { transform: translate(0,-12px); opacity: 0; } 10% { opacity: 0.7; } 100% { transform: translate(2px,140px); opacity: 0; } }\n@keyframes wx-drift-cloud { 0% { transform: translateX(-40%); } 100% { transform: translateX(140%); } }\n@keyframes wx-twinkle { 0%, 100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }\n@keyframes wx-flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: 0.95; } 88% { opacity: 0.15; } 89% { opacity: 0.85; } 90% { opacity: 0; } }\n@keyframes wx-bolt { 0%, 86%, 90%, 100% { opacity: 0; } 87% { opacity: 1; } 89% { opacity: 0.85; } }\n@keyframes wx-sun-pulse { 0%, 100% { transform: scale(1); opacity: 0.65; } 50% { transform: scale(1.12); opacity: 0.95; } }\n@keyframes wx-sun-rays { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n@keyframes wx-fog-drift { 0% { transform: translateX(-25%); opacity: 0.3; } 50% { opacity: 0.65; } 100% { transform: translateX(25%); opacity: 0.3; } }\n@keyframes wx-shooting-star { 0%, 95% { opacity: 0; transform: translate(0,0) scale(0); } 96% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(40px,30px) scale(1); } }\n"}),
33
- /* @__PURE__ */u("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${o.activeOpacity/100})`,backdropFilter:o.activeBlur>0?`blur(${o.activeBlur}px)`:void 0},children:/* @__PURE__ */f("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${P}`,style:{height:110},children:[
34
- /* @__PURE__ */u(C,{code:j.code,isDay:j.isDay}),
33
+ /* @__PURE__ */u("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${o.activeOpacity/100})`,backdropFilter:o.activeBlur>0?`blur(${o.activeBlur}px)`:void 0},children:/* @__PURE__ */f("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${R}`,style:{height:110},children:[
34
+ /* @__PURE__ */u(M,{code:j.code,isDay:j.isDay}),
35
35
  /* @__PURE__ */f("div",{className:"relative z-10 px-3 py-3 flex flex-col h-full justify-between",children:[
36
36
  /* @__PURE__ */f("div",{className:"flex items-start justify-between gap-2",children:[
37
37
  /* @__PURE__ */f("div",{className:"min-w-0 flex-1",children:[
38
- /* @__PURE__ */u("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:j.city}),I.showLocalTime&&/* @__PURE__ */u("div",{className:"text-2xs opacity-90 leading-tight tabular-nums drop-shadow-sm",children:v(j.timezone,I.use24Hour)})]}),
39
- /* @__PURE__ */u("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:W(j.temp)})]}),
38
+ /* @__PURE__ */u("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:j.city}),B.showLocalTime&&/* @__PURE__ */u("div",{className:"text-2xs opacity-90 leading-tight tabular-nums drop-shadow-sm",children:v(j.timezone,B.use24Hour)})]}),
39
+ /* @__PURE__ */u("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:$(j.temp)})]}),
40
40
  /* @__PURE__ */f("div",{className:"flex items-end justify-between gap-2",children:[
41
41
  /* @__PURE__ */f("div",{className:"flex items-center gap-2 min-w-0",children:[
42
- /* @__PURE__ */u("span",{className:"text-lg leading-none drop-shadow-sm",children:G}),
43
- /* @__PURE__ */u("span",{className:"text-2xs font-medium drop-shadow-sm truncate",children:Y})]}),
44
- /* @__PURE__ */f("span",{className:"text-2xs opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",W(j.high)," L:",W(j.low)]})]})]})]})}),
45
- /* @__PURE__ */f(s,{open:H,onClose:()=>T(!1),title:"Weather Settings",appearance:R,onAppearanceChange:J,onSave:()=>{n(B),N(R),Z({weather_prefs:V}),localStorage.setItem(x,B),localStorage.setItem(g,JSON.stringify(R)),T(!1)},children:[
42
+ /* @__PURE__ */u("span",{className:"text-lg leading-none drop-shadow-sm",children:Q}),
43
+ /* @__PURE__ */u("span",{className:"text-2xs font-medium drop-shadow-sm truncate",children:O})]}),
44
+ /* @__PURE__ */f("span",{className:"text-2xs opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",$(j.high)," L:",$(j.low)]})]})]})]})}),
45
+ /* @__PURE__ */f(s,{open:S,onClose:()=>D(!1),title:"Weather Settings",appearance:J,onAppearanceChange:Z,onSave:()=>{n(F),N(J),P({weather_prefs:G}),localStorage.setItem(x,F),localStorage.setItem(g,JSON.stringify(J)),D(!1)},children:[
46
46
  /* @__PURE__ */u("div",{className:"space-y-3",children:/* @__PURE__ */f("div",{children:[
47
47
  /* @__PURE__ */u("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
48
48
  /* @__PURE__ */f("div",{className:"flex items-center gap-3 mb-2",children:[
49
49
  /* @__PURE__ */u("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
50
- /* @__PURE__ */u("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */u("button",{onClick:()=>$(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(V.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
50
+ /* @__PURE__ */u("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */u("button",{onClick:()=>X(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(G.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
51
51
  /* @__PURE__ */f("div",{className:"flex items-center gap-3 mb-2",children:[
52
52
  /* @__PURE__ */u("span",{className:"text-sm text-gray-600 w-24",children:"Time Format"}),
53
- /* @__PURE__ */u("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */u("button",{onClick:()=>$(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(V.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
53
+ /* @__PURE__ */u("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */u("button",{onClick:()=>X(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(G.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
54
54
  /* @__PURE__ */f("label",{className:"flex items-center gap-2 cursor-pointer",children:[
55
- /* @__PURE__ */u("input",{type:"checkbox",checked:V.showLocalTime,onChange:e=>$(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
55
+ /* @__PURE__ */u("input",{type:"checkbox",checked:G.showLocalTime,onChange:e=>X(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
56
56
  /* @__PURE__ */u("span",{className:"text-sm text-gray-600",children:"Show local time"})]})]})}),
57
57
  /* @__PURE__ */f("div",{children:[
58
58
  /* @__PURE__ */u("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"City"}),
59
- /* @__PURE__ */u("select",{value:B,onChange:e=>L(e.target.value),className:"w-full bg-surface-sunken border border-line rounded px-2 h-8 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:Object.keys(a).map(e=>/* @__PURE__ */u("option",{value:e,children:e},e))}),
60
- /* @__PURE__ */u("p",{className:"mt-1 text-2xs text-ink-faintest",children:"Auto-detected from your timezone; change if needed."})]})]})]})}export{T as default};
59
+ /* @__PURE__ */u("select",{value:F,onChange:e=>A(e.target.value),className:"w-full bg-surface-sunken border border-line rounded px-2 h-8 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:Object.keys(a).map(e=>/* @__PURE__ */u("option",{value:e,children:e},e))}),
60
+ /* @__PURE__ */u("p",{className:"mt-1 text-2xs text-ink-faintest",children:"Auto-detected from your timezone; change if needed."})]})]})]})}export{D as default};
@@ -1,6 +1,6 @@
1
- import{AVAILABLE_CITIES as e,fetchCityWeather as t,cityClock as r,getCondition as n,toFahrenheit as s}from"./chunk-HYHZEQMG.js";import{loadAppearance as i,WidgetSettingsModal as a}from"./chunk-26KHYLJN.js";import"./chunk-NHKT5IH6.js";import"./chunk-36BRD5J3.js";import"./chunk-JRQMX4PK.js";import"./chunk-LF27WIN2.js";import{useWidgetSettings as c}from"./chunk-VGUB7LPF.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-4VFEPP2W.js";import"./chunk-44ERJYNW.js";import"./chunk-EIFNESXS.js";import"./chunk-LC2UF3AA.js";import"./chunk-VY6OQRZA.js";import"./chunk-LG6NDTHZ.js";import"./chunk-4BYJABCX.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-UVPDEGIA.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as o}from"./chunk-DPFEQQQU.js";import"./chunk-AW7TOB6N.js";import"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import"./chunk-DWGYC7OD.js";import"./chunk-NWS5G7FE.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-YDJ5IZOU.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useState as h,useEffect as l,useCallback as p}from"react";import{jsxs as u,Fragment as d,jsx as k}from"react/jsx-runtime";var j="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:b}=o(),[N,f]=h(()=>i(j)),[y,v]=h(!1),[F,w]=h([]),[D,R]=h(N),U={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[A,C]=h(U),[J,B]=h(()=>/* @__PURE__ */new Date);l(()=>{const e=setInterval(()=>B(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const S=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),T=x.world_clocks,V=(()=>{if(!Array.isArray(T)||0===T.length)return g;const t=[];for(const r of T){const n=e[r]?r:S[r];n&&!t.includes(n)&&t.push(n)}return t.length?t:g})(),[Y,Z]=h({}),[H,W]=h(!0);l(()=>{let e=!1;return W(!0),(async()=>{const r={};await Promise.all(V.map(async e=>{const n=await t(e);n&&(r[e]=n)})),e||(Z(r),W(!1))})(),()=>{e=!0}},[V.join(",")]),c(p(()=>{w([...V]),R({...N}),C({...U}),v(!0)},[V.join(","),N,U.useFahrenheit]));const E=e=>U.useFahrenheit?`${s(e)}°`:`${e}°`;/* @__PURE__ */
1
+ import{AVAILABLE_CITIES as e,fetchCityWeather as t,cityClock as r,getCondition as n,toFahrenheit as s}from"./chunk-HYHZEQMG.js";import{loadAppearance as i,WidgetSettingsModal as a}from"./chunk-XLPUIGMO.js";import"./chunk-NHKT5IH6.js";import"./chunk-36BRD5J3.js";import"./chunk-JRQMX4PK.js";import"./chunk-LF27WIN2.js";import{useWidgetSettings as c}from"./chunk-6IP4Q3AT.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-TTD2M6RF.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-2XDO7FZC.js";import"./chunk-ZSVU44OB.js";import"./chunk-EIFNESXS.js";import"./chunk-7WF6LFOJ.js";import"./chunk-CJ4OEY3T.js";import"./chunk-AH5MLH54.js";import"./chunk-5YTZBYG4.js";import"./chunk-VWGWZY7A.js";import"./chunk-DBQNYJZ6.js";import"./chunk-6X32SWQI.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as o}from"./chunk-POBVGDZP.js";import"./chunk-AW7TOB6N.js";import"./chunk-M5IZ7QLQ.js";import"./chunk-XNKNX5L3.js";import"./chunk-DWGYC7OD.js";import"./chunk-MYH5H43C.js";import"./chunk-RTK77DMP.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EDRELF6L.js";import"./chunk-MEP6CZJ3.js";import"./chunk-IVEM2BPC.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-G3TC2GIA.js";import"./chunk-AJPQJ7TC.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useState as h,useEffect as l,useCallback as p}from"react";import{jsxs as u,Fragment as d,jsx as k}from"react/jsx-runtime";var j="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:b}=o(),[N,f]=h(()=>i(j)),[y,v]=h(!1),[F,w]=h([]),[T,C]=h(N),D={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[H,M]=h(D),[J,P]=h(()=>/* @__PURE__ */new Date);l(()=>{const e=setInterval(()=>P(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const Z=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),G=x.world_clocks,Q=(()=>{if(!Array.isArray(G)||0===G.length)return g;const t=[];for(const r of G){const n=e[r]?r:Z[r];n&&!t.includes(n)&&t.push(n)}return t.length?t:g})(),[L,O]=h({}),[R,I]=h(!0);l(()=>{let e=!1;return I(!0),(async()=>{const r={};await Promise.all(Q.map(async e=>{const n=await t(e);n&&(r[e]=n)})),e||(O(r),I(!1))})(),()=>{e=!0}},[Q.join(",")]),c(p(()=>{w([...Q]),C({...N}),M({...D}),v(!0)},[Q.join(","),N,D.useFahrenheit]));const S=e=>D.useFahrenheit?`${s(e)}°`:`${e}°`;/* @__PURE__ */
2
2
  return u(d,{children:[
3
- /* @__PURE__ */k("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__ */u("div",{className:"divide-y divide-gray-200",children:[H&&V.every(e=>!Y[e])&&/* @__PURE__ */k(m,{size:"sm",padding:"py-6",label:"Loading"}),V.map(t=>{const s=Y[t],{time:i,ampm:a}=r(e[t]?.tz,J);if(!s)/* @__PURE__ */
3
+ /* @__PURE__ */k("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__ */u("div",{className:"divide-y divide-gray-200",children:[R&&Q.every(e=>!L[e])&&/* @__PURE__ */k(m,{size:"sm",padding:"py-6",label:"Loading"}),Q.map(t=>{const s=L[t],{time:i,ampm:a}=r(e[t]?.tz,J);if(!s)/* @__PURE__ */
4
4
  return u("div",{className:"px-4 py-3",children:[
5
5
  /* @__PURE__ */u("div",{className:"flex items-baseline justify-between gap-2",children:[
6
6
  /* @__PURE__ */k("span",{className:"text-base font-semibold tracking-tight text-ink-strongest truncate",children:t}),
@@ -10,7 +10,7 @@ return u("div",{className:"px-4 py-3",children:[
10
10
  return u("div",{className:"px-4 py-3",children:[
11
11
  /* @__PURE__ */u("div",{className:"flex items-baseline justify-between gap-2",children:[
12
12
  /* @__PURE__ */k("span",{className:"text-base font-semibold tracking-tight text-ink-strongest truncate",children:t}),
13
- /* @__PURE__ */k("span",{className:"text-2xl font-extralight leading-none tabular-nums tracking-tight text-ink-strongest shrink-0",children:E(s.temp)})]}),
13
+ /* @__PURE__ */k("span",{className:"text-2xl font-extralight leading-none tabular-nums tracking-tight text-ink-strongest shrink-0",children:S(s.temp)})]}),
14
14
  /* @__PURE__ */u("div",{className:"flex items-center justify-between gap-2 mt-2 text-2xs",children:[
15
15
  /* @__PURE__ */u("div",{className:"flex items-center gap-2 min-w-0 text-ink-faint",children:[
16
16
  /* @__PURE__ */k("span",{className:"text-base leading-none shrink-0",children:o}),
@@ -18,13 +18,13 @@ return u("div",{className:"px-4 py-3",children:[
18
18
  /* @__PURE__ */k("span",{className:"text-3xs font-medium ml-0.5 opacity-70",children:a})]}),
19
19
  /* @__PURE__ */k("span",{className:"text-gray-300 shrink-0",children:"·"}),
20
20
  /* @__PURE__ */k("span",{className:"truncate",children:c})]}),
21
- /* @__PURE__ */u("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",E(s.high)," L:",E(s.low)]})]})]},t)})]})}),
22
- /* @__PURE__ */u(a,{open:y,onClose:()=>v(!1),title:"World Clock Settings",appearance:D,onAppearanceChange:R,onSave:()=>{0!==F.length&&(b({world_clocks:F,weather_prefs:{...x.weather_prefs??{},useFahrenheit:A.useFahrenheit}}),f(D),localStorage.setItem(j,JSON.stringify(D)),v(!1))},children:[
21
+ /* @__PURE__ */u("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",S(s.high)," L:",S(s.low)]})]})]},t)})]})}),
22
+ /* @__PURE__ */u(a,{open:y,onClose:()=>v(!1),title:"World Clock Settings",appearance:T,onAppearanceChange:C,onSave:()=>{0!==F.length&&(b({world_clocks:F,weather_prefs:{...x.weather_prefs??{},useFahrenheit:H.useFahrenheit}}),f(T),localStorage.setItem(j,JSON.stringify(T)),v(!1))},children:[
23
23
  /* @__PURE__ */u("div",{children:[
24
24
  /* @__PURE__ */k("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
25
25
  /* @__PURE__ */u("div",{className:"flex items-center gap-3 mb-2",children:[
26
26
  /* @__PURE__ */k("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
27
- /* @__PURE__ */k("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */k("button",{onClick:()=>C(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(A.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
27
+ /* @__PURE__ */k("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */k("button",{onClick:()=>M(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(H.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
28
28
  /* @__PURE__ */k("p",{className:"text-2xs text-ink-faintest mt-1",children:"Shared with the Weather widget."})]}),
29
29
  /* @__PURE__ */u("div",{children:[
30
30
  /* @__PURE__ */k("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Cities"}),