decocms 4.367.6 → 4.368.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 (372) hide show
  1. package/dist/client/assets/{AlertCircle-CZODjB-G.js → AlertCircle-BKchbppf.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CIyBmnKJ.js → AreaChart-y2C6FBRO.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-qXobBdxD.js → ArrowLeft-BxcCVSsO.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-_qaicB3i.js → ArrowRight-M0oFo16p.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-B2y3FAZT.js → ArrowUp-DPPS6QAz.js} +1 -1
  6. package/dist/client/assets/{Check-DYuLLcXz.js → Check-ZxK4xe7F.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Cpa5ukkn.js → CheckCircle-CXCmqtXe.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BvrNCsKT.js → ChevronRight-B1q4aRdE.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-B-GxN-tN.js → ChevronUp-Lw2r8wDj.js} +1 -1
  10. package/dist/client/assets/{Copy01-BKbbYkAO.js → Copy01-BdfG_e2R.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-D16_sfKz.js → CreditCard01-C0eii6cH.js} +1 -1
  12. package/dist/client/assets/{Database01-C9bPAMOv.js → Database01-D9xiMFRQ.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-BKAvE_4x.js → DotsVertical-BHpLZzPU.js} +1 -1
  14. package/dist/client/assets/{Download01-BvE_0avp.js → Download01-DAPCTBrh.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-C42cr3OZ.js → ErrorBarContext-B7gfjXfw.js} +1 -1
  16. package/dist/client/assets/{Eye-CO0I0F0e.js → Eye-Bwli19bO.js} +1 -1
  17. package/dist/client/assets/{File02-Cnt06RSY.js → File02-Bk1dmRy_.js} +1 -1
  18. package/dist/client/assets/{GitBranch01-BPIVJl4U.js → GitBranch01-fGQefizx.js} +1 -1
  19. package/dist/client/assets/{Globe01-DjDoxbql.js → Globe01-B4gNbsCg.js} +1 -1
  20. package/dist/client/assets/{HardDrive-UFyvehqQ.js → HardDrive-D_aROQkn.js} +1 -1
  21. package/dist/client/assets/{Image01-D3ZQNp9r.js → Image01-DTFvmUXj.js} +1 -1
  22. package/dist/client/assets/{Key01-0kVvyKcG.js → Key01-CVWwYajp.js} +1 -1
  23. package/dist/client/assets/{Link01-Ct7pxTAu.js → Link01-CZbhj0_0.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-DCfxP5B_.js → LinkExternal01-BKxoqAo_.js} +1 -1
  25. package/dist/client/assets/{MessageCircle01-CweHuqp7.js → MessageCircle01-bLbPG2BY.js} +1 -1
  26. package/dist/client/assets/{Monitor01-BWZHqfxa.js → Monitor01-BPvejB1C.js} +1 -1
  27. package/dist/client/assets/{Package-T9dujty4.js → Package-aFD4MTA7.js} +1 -1
  28. package/dist/client/assets/{Palette-B9i9hnCi.js → Palette-CPUNhPQw.js} +1 -1
  29. package/dist/client/assets/{Play-BIZK_qUZ.js → Play-CIReceJE.js} +1 -1
  30. package/dist/client/assets/{Plus-DaMIkku0.js → Plus-7oGWv8-d.js} +1 -1
  31. package/dist/client/assets/{Printer-AWNoUKRJ.js → Printer-DhW8UOTN.js} +1 -1
  32. package/dist/client/assets/{SearchLg-C2sftj0S.js → SearchLg-gMgT6qJL.js} +1 -1
  33. package/dist/client/assets/{SearchMd-B6arCmyn.js → SearchMd-DBxEPxbW.js} +1 -1
  34. package/dist/client/assets/{Sector-BM01w_NE.js → Sector-BObjIYQg.js} +1 -1
  35. package/dist/client/assets/{Settings02-Cng3FY1l.js → Settings02-2akNrypo.js} +1 -1
  36. package/dist/client/assets/{Share07-BgGqkker.js → Share07-Bl1oEFtE.js} +1 -1
  37. package/dist/client/assets/{Shield01-CVF7EZQb.js → Shield01-D26ePB5X.js} +1 -1
  38. package/dist/client/assets/{Stars01-DSWmseOt.js → Stars01-Dja9PZ8p.js} +1 -1
  39. package/dist/client/assets/{Sun-B2S_0TDV.js → Sun-49v3fDGt.js} +1 -1
  40. package/dist/client/assets/{SwitchHorizontal01-BaPOYupn.js → SwitchHorizontal01-1bzMkj1j.js} +1 -1
  41. package/dist/client/assets/{Tool01-DW_T3YR5.js → Tool01-DXg-697p.js} +1 -1
  42. package/dist/client/assets/{Tool02-zLL5jksN.js → Tool02-BZbYKRFW.js} +1 -1
  43. package/dist/client/assets/{Trash01-CchLM2HV.js → Trash01-BUixXtcj.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-CSoUpxS1.js → TrendUp01-WeYCREkX.js} +1 -1
  45. package/dist/client/assets/{Upload01-G3c4UCfB.js → Upload01-51uW4MtH.js} +1 -1
  46. package/dist/client/assets/{User01-CZRm273k.js → User01-B4JBmtbe.js} +1 -1
  47. package/dist/client/assets/{UserSquare-BdoEkD8Z.js → UserSquare-DXP9QUC0.js} +1 -1
  48. package/dist/client/assets/{Users01-D_H_0-Jf.js → Users01-DxH5OmOp.js} +1 -1
  49. package/dist/client/assets/{Users03-DSBIUomT.js → Users03-BNcMDmHT.js} +1 -1
  50. package/dist/client/assets/{X-Dr0Tqjzv.js → X-BdugDRJ_.js} +1 -1
  51. package/dist/client/assets/{XCircle-Ce8PGmrS.js → XCircle-frgB9vHw.js} +1 -1
  52. package/dist/client/assets/{XClose-5naA93fy.js → XClose-DdmRkPdn.js} +1 -1
  53. package/dist/client/assets/{Zap-XMkPrxNc.js → Zap-BOBZbKzr.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-BLK0GcJv.js → ZoomOut-CG3Sk2c2.js} +1 -1
  55. package/dist/client/assets/{access-gate-Cql3KqwB.js → access-gate-u19iYegA.js} +1 -1
  56. package/dist/client/assets/{add-connection-dialog-BFK-aGDM.js → add-connection-dialog-BMRrs0Iv.js} +1 -1
  57. package/dist/client/assets/{agent-analytics-BiLU3geK.js → agent-analytics-x1RXtEfy.js} +1 -1
  58. package/dist/client/assets/agent-app-DmoPEJGX.js +1 -0
  59. package/dist/client/assets/agent-assets-BZB74Oo0.js +1 -0
  60. package/dist/client/assets/agent-automation-CLUkoEJi.js +20 -0
  61. package/dist/client/assets/{agent-automations-BtQVYGNC.js → agent-automations-S_NNW-G8.js} +1 -1
  62. package/dist/client/assets/{agent-connect-sources-B72Z2yOq.js → agent-connect-sources-FrFq6kgZ.js} +1 -1
  63. package/dist/client/assets/agent-deck-CmrG0VVN.js +1 -0
  64. package/dist/client/assets/{agent-e2e-BC-S1G-I.js → agent-e2e-BftBTu-r.js} +1 -1
  65. package/dist/client/assets/agent-file-C9BmMguw.js +1 -0
  66. package/dist/client/assets/{agent-git-BCY9JF0p.js → agent-git-CUfmHf_3.js} +2 -2
  67. package/dist/client/assets/{agent-hosting-BTRnh7Qw.js → agent-hosting-DYMDraLb.js} +1 -1
  68. package/dist/client/assets/{agent-icon-I_u5FzRN.js → agent-icon-CJ74PZ5u.js} +1 -1
  69. package/dist/client/assets/agent-library-file-BoVX_vwF.js +1 -0
  70. package/dist/client/assets/{agent-monitor-C3BUSOjB.js → agent-monitor-BWVjQWIl.js} +1 -1
  71. package/dist/client/assets/{agent-overview-DLgGJyEN.js → agent-overview-DnPnksSV.js} +1 -1
  72. package/dist/client/assets/agent-settings-B_cAMSa0.js +1 -0
  73. package/dist/client/assets/{agent-site-editor-CcVudugZ.js → agent-site-editor-BnZTwUPY.js} +2 -2
  74. package/dist/client/assets/agent-site-editor-code-Dzl6qE-Z.js +2 -0
  75. package/dist/client/assets/{agent-site-editor-content-C_xKa1S3.js → agent-site-editor-content-_eLWfu3Q.js} +2 -2
  76. package/dist/client/assets/{agent-site-editor-preview-DHkNf2Kb.js → agent-site-editor-preview-DLXhmiWT.js} +3 -3
  77. package/dist/client/assets/agent-view-Xhiyf05f.js +1 -0
  78. package/dist/client/assets/{agent-view-guard-jbDY82eS.js → agent-view-guard-CUaQwEO2.js} +1 -1
  79. package/dist/client/assets/{agents-list-CF5eQ1pF.js → agents-list-BXNTO5vo.js} +1 -1
  80. package/dist/client/assets/{ai-providers-COjB4NMg.js → ai-providers-DbzV8bxo.js} +2 -2
  81. package/dist/client/assets/{alert-DwSbSu1x.js → alert-DXUzroby.js} +1 -1
  82. package/dist/client/assets/{alert-dialog-dzu9U-o1.js → alert-dialog-92GutrH9.js} +1 -1
  83. package/dist/client/assets/{api-keys-Cpho4Cho.js → api-keys-B2Xef8ny.js} +1 -1
  84. package/dist/client/assets/api-keys-Cb3SKZFn.js +1 -0
  85. package/dist/client/assets/app-editor-xKEqzK0v.js +1 -0
  86. package/dist/client/assets/{asset-utils-DLlbY7-O.js → asset-utils-B5fY-BSK.js} +1 -1
  87. package/dist/client/assets/{auth-UveS8wF5.js → auth-BrGex7FY.js} +1 -1
  88. package/dist/client/assets/{auth-catchall-CxHpvtO-.js → auth-catchall-BIV239MQ.js} +1 -1
  89. package/dist/client/assets/{auth-entry-BVtguEOj.js → auth-entry-CFDXzmrD.js} +1 -1
  90. package/dist/client/assets/{auth-split-layout-DzJReBpa.js → auth-split-layout-CBVOXOwN.js} +1 -1
  91. package/dist/client/assets/{authenticate-and-persist-oauth-CrVNvw_C.js → authenticate-and-persist-oauth-CUN-wLn1.js} +1 -1
  92. package/dist/client/assets/{automation-list-row-CXkhnqzA.js → automation-list-row-Co6ffDdp.js} +1 -1
  93. package/dist/client/assets/{automation-runs-DBxHk2or.js → automation-runs-BNk-ou9m.js} +1 -1
  94. package/dist/client/assets/{automations-DFVUH58q.js → automations-COrNd8f4.js} +1 -1
  95. package/dist/client/assets/{autosend-BsJQ1aCs.js → autosend-mHJRckjC.js} +1 -1
  96. package/dist/client/assets/{avatar-DV69nhm1.js → avatar-ubLaXORO.js} +1 -1
  97. package/dist/client/assets/{badge-Bx6TdTjC.js → badge-DyIAknWc.js} +1 -1
  98. package/dist/client/assets/{block-document-Bz-5kssp.js → block-document-WjNTO6O1.js} +1 -1
  99. package/dist/client/assets/{blocks-preview-workspace-context-CzxgcZDm.js → blocks-preview-workspace-context-XPDRiBEY.js} +1 -1
  100. package/dist/client/assets/{breadcrumb-D4EWX36X.js → breadcrumb-D0FcEht9.js} +1 -1
  101. package/dist/client/assets/{buckets-B9z_Rm90.js → buckets-D4XExOV7.js} +1 -1
  102. package/dist/client/assets/{build-improve-prompt-doc-BWFSRTpm.js → build-improve-prompt-doc-BmggPsYr.js} +1 -1
  103. package/dist/client/assets/{bulk-category-panel-Dq461a8g.js → bulk-category-panel-D_4Fv25D.js} +1 -1
  104. package/dist/client/assets/{calendar-BGdb4p0V.js → calendar-B1_9FUxA.js} +1 -1
  105. package/dist/client/assets/{capability-load-error-Dnwh9vPw.js → capability-load-error-CfjThErO.js} +1 -1
  106. package/dist/client/assets/{cards-CnQ4nU1q.js → cards-DzbRsseW.js} +1 -1
  107. package/dist/client/assets/category-editor-DkUyXLbS.js +1 -0
  108. package/dist/client/assets/{chart-D7o3Rjgy.js → chart-Ei5Re4Wl.js} +1 -1
  109. package/dist/client/assets/{chat-context-Bj6XM8r6.js → chat-context-CwBa4iNq.js} +1 -1
  110. package/dist/client/assets/{chat-draft-B57QKpbd.js → chat-draft-DNmqFUGc.js} +1 -1
  111. package/dist/client/assets/{checkbox-DXk_ASm3.js → checkbox-BzsCo22G.js} +1 -1
  112. package/dist/client/assets/{choose-editor-yiYqZgm0.js → choose-editor-GkG7SXyC.js} +1 -1
  113. package/dist/client/assets/{cli-auth-success-DaIMiHKG.js → cli-auth-success-CMF0dFZs.js} +1 -1
  114. package/dist/client/assets/{client-icons-BIZcUQix.js → client-icons-BwjZD78C.js} +1 -1
  115. package/dist/client/assets/{collapsible-DvCpQaDP.js → collapsible-C1favzij.js} +1 -1
  116. package/dist/client/assets/{collection-detail-GwafUKCA.js → collection-detail-BqWAJ7EW.js} +1 -1
  117. package/dist/client/assets/{collection-display-button-C8HgvUa3.js → collection-display-button-BJZ15cTd.js} +1 -1
  118. package/dist/client/assets/{collection-search-BgR7E5C_.js → collection-search-aDCUzq7X.js} +1 -1
  119. package/dist/client/assets/{collection-table-wrapper-CenPQBXL.js → collection-table-wrapper-B8I7NupJ.js} +1 -1
  120. package/dist/client/assets/{collection-tabs-BKMxlcTD.js → collection-tabs-CCTSLIp7.js} +1 -1
  121. package/dist/client/assets/{command-PF8SQ01C.js → command-Bp6cp4pI.js} +1 -1
  122. package/dist/client/assets/{command-palette-store-3XeVzDCK.js → command-palette-store-DOa5piDf.js} +1 -1
  123. package/dist/client/assets/{companion-mcps-section-BcH1woZ_.js → companion-mcps-section-DEio5Adg.js} +1 -1
  124. package/dist/client/assets/{connect-cRr5yrcf.js → connect-BY6uXdow.js} +2 -2
  125. package/dist/client/assets/{connect-layout-DlS-pJxG.js → connect-layout-CP69O37i.js} +1 -1
  126. package/dist/client/assets/{connection-D83jUgKt.js → connection-BZn_3MEZ.js} +1 -1
  127. package/dist/client/assets/{connection-card-B6pHDnUn.js → connection-card-COXej074.js} +1 -1
  128. package/dist/client/assets/{connection-detail-cjhq0_Le.js → connection-detail-DHx2IRY4.js} +1 -1
  129. package/dist/client/assets/{connection-form-helpers-CjgrOGRh.js → connection-form-helpers-bnj5C_pO.js} +1 -1
  130. package/dist/client/assets/{connections-jZ71xb1b.js → connections-H2nz3ZOT.js} +1 -1
  131. package/dist/client/assets/{create-organization-dialog-Wy8ivV4K.js → create-organization-dialog-Dhjwuvqa.js} +1 -1
  132. package/dist/client/assets/{decofile-api-DGTmPuak.js → decofile-api-BEtZILgN.js} +1 -1
  133. package/dist/client/assets/{decopilot-BQ5v61IW.js → decopilot-B6xCVEQX.js} +1 -1
  134. package/dist/client/assets/{dialog-DKHdGeG-.js → dialog-BCc5hlgI.js} +1 -1
  135. package/dist/client/assets/{discover-BpZ5XWNf.js → discover-Djoq-knv.js} +1 -1
  136. package/dist/client/assets/{domain-settings-bYxFZI5Z.js → domain-settings-B68OapeG.js} +1 -1
  137. package/dist/client/assets/{download-app-dialog-BhmQVCrs.js → download-app-dialog-CS9xCo3l.js} +1 -1
  138. package/dist/client/assets/{drawer-B1TxBXeW.js → drawer-CQ6YvWyB.js} +1 -1
  139. package/dist/client/assets/{dropdown-menu-CoycaRIZ.js → dropdown-menu-tx6OX4aA.js} +1 -1
  140. package/dist/client/assets/{editor-BEf-Idam.js → editor-BpQ5Scxi.js} +3 -3
  141. package/dist/client/assets/{empty-state-BN3l0e1m.js → empty-state-BTjMWx5H.js} +1 -1
  142. package/dist/client/assets/{empty-state-BuDUIKwc.js → empty-state-ClkrHYmJ.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-Bs0-7FAn.js → extract-connection-data-QX25cgiT.js} +1 -1
  144. package/dist/client/assets/{feature-gate-DXl7j_Gb.js → feature-gate-DqjkAi9M.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-2uPHyVRd.js → feature-paywall-b3qZoNCL.js} +1 -1
  146. package/dist/client/assets/{file-explorer-CWZPR_uA.js → file-explorer-vmaCniEv.js} +1 -1
  147. package/dist/client/assets/{file-preview-CZ1TplhI.js → file-preview-9280F33a.js} +1 -1
  148. package/dist/client/assets/{file-share-button-I_P-fFZ5.js → file-share-button-Cqn5Q-hj.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-SwABlaSO.js → file-type-icon-Dxp-Ok2P.js} +1 -1
  150. package/dist/client/assets/{folder-icon-Bj6hz7oH.js → folder-icon-DfnI9Lc8.js} +1 -1
  151. package/dist/client/assets/{form-CCI8usbr.js → form-CCEoicAR.js} +1 -1
  152. package/dist/client/assets/{gateway-client-2Mbrw7Hg.js → gateway-client-CgyUBlgw.js} +1 -1
  153. package/dist/client/assets/{general-T1zzubww.js → general-BlaLbOSk.js} +1 -1
  154. package/dist/client/assets/{github-icon-CCyh_tld.js → github-icon-BWfLdLT4.js} +1 -1
  155. package/dist/client/assets/home-sj-ZTRkz.js +1 -0
  156. package/dist/client/assets/{hooks-DxP9ms8F.js → hooks-BsQ1zp8y.js} +2 -2
  157. package/dist/client/assets/{hooks-C4BbSdNW.js → hooks-CBQzxxCh.js} +1 -1
  158. package/dist/client/assets/{index-CR7IhZdQ.js → index-CUJMnria.js} +1 -1
  159. package/dist/client/assets/{index-DvsuDjpW.js → index-CYsKkgvq.js} +1 -1
  160. package/dist/client/assets/{index-DplUenCs.js → index-CZJ5G35_.js} +1 -1
  161. package/dist/client/assets/{index-BpW_HPV1.js → index-C_lmrR_C.js} +2 -2
  162. package/dist/client/assets/{index-BzGfYuHA.js → index-CalU-CTh.js} +1 -1
  163. package/dist/client/assets/{index-C1OUd215.js → index-CuNhd5EW.js} +1 -1
  164. package/dist/client/assets/{index-wju8DM5a.js → index-Cw7IXwLo.js} +1 -1
  165. package/dist/client/assets/{index-D6hy4U5O.js → index-Cze73w-G.js} +1 -1
  166. package/dist/client/assets/{index-BW3bCYgD.js → index-D4pBLhg9.js} +1 -1
  167. package/dist/client/assets/{index-CfiHR5p3.js → index-D9SZCEna.js} +5 -5
  168. package/dist/client/assets/{index-BIFBhz6Y.js → index-DXfPYL8S.js} +39 -39
  169. package/dist/client/assets/{index-L41E_jdu.js → index-DaYZAl9-.js} +1 -1
  170. package/dist/client/assets/{index-BeW32OQZ.js → index-nvVwQgfX.js} +1 -1
  171. package/dist/client/assets/{index-S-urKMuN.js → index-p-pFkjAj.js} +1 -1
  172. package/dist/client/assets/{index-redirect-D31X29B5.js → index-redirect-CPyK66Hq.js} +1 -1
  173. package/dist/client/assets/{index-B7wVUCeI.js → index-unCC-6KL.js} +1 -1
  174. package/dist/client/assets/{infiniteQueryObserver-F_wqd-Rj.js → infiniteQueryObserver-D3qec4tz.js} +1 -1
  175. package/dist/client/assets/{infra-billing-D0PNqi3s.js → infra-billing-B8nXBSDz.js} +1 -1
  176. package/dist/client/assets/{input-S-gsq7gD.js → input-5SO3LEdl.js} +1 -1
  177. package/dist/client/assets/{input-SZCoDRD-.js → input-AeTUfj6S.js} +2 -2
  178. package/dist/client/assets/{input-DOqceFPC.js → input-DMN2ylja.js} +1 -1
  179. package/dist/client/assets/{integration-icon-_HXUWC0Q.js → integration-icon-B1sz4SeY.js} +1 -1
  180. package/dist/client/assets/{label-DCUE6TYd.js → label-Dh9EjnVS.js} +1 -1
  181. package/dist/client/assets/{last-preview-page-D9Fx5pKm.js → last-preview-page-D52M-8kD.js} +1 -1
  182. package/dist/client/assets/{layout-DRh2IKmg.js → layout-DSbF9Fai.js} +1 -1
  183. package/dist/client/assets/{legacy-agents-deep-BPmqpQyn.js → legacy-agents-deep-CO4Cj3Kz.js} +1 -1
  184. package/dist/client/assets/{legacy-main-redirect-34brc64A.js → legacy-main-redirect-DyjtdITZ.js} +1 -1
  185. package/dist/client/assets/{library-D0EEtDE-.js → library-rJr5R-_-.js} +2 -2
  186. package/dist/client/assets/{login-wXsz7PP7.js → login-ByroOa_7.js} +1 -1
  187. package/dist/client/assets/{markdown-CCv5IlPx.js → markdown-08bGGv35.js} +33 -33
  188. package/dist/client/assets/{mcp-app-renderer-BVpwtvW6.js → mcp-app-renderer-BrDqPGAT.js} +1 -1
  189. package/dist/client/assets/{mcp-oauth-DbZXTEaP.js → mcp-oauth-DssHToM4.js} +1 -1
  190. package/dist/client/assets/{members-D8EXLICP.js → members-1ss87Nz0.js} +1 -1
  191. package/dist/client/assets/{message-templates-xXuDAWxI.js → message-templates-BTVMJzpL.js} +1 -1
  192. package/dist/client/assets/{mini-report-page-BuRwBHqD.js → mini-report-page-CX7HMNh4.js} +1 -1
  193. package/dist/client/assets/mock-board-jgxOM55G.js +90 -0
  194. package/dist/client/assets/{monaco-editor-QBiS6INp.js → monaco-editor-DJxPzejh.js} +1 -1
  195. package/dist/client/assets/{monitoring-stats-row-YHUVjX34.js → monitoring-stats-row-wjNhJJbD.js} +1 -1
  196. package/dist/client/assets/{multi-select-BPe8FRks.js → multi-select-7rs5llE7.js} +1 -1
  197. package/dist/client/assets/{mustache-Cghs0xAa.js → mustache-vWrD4L5A.js} +1 -1
  198. package/dist/client/assets/{oauth-callback-DasyYGDW.js → oauth-callback-Dh7kJbIE.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-ai-provider-PZGmoG1J.js → oauth-callback-ai-provider-BR4KOwpH.js} +1 -1
  200. package/dist/client/assets/{onboarding-CxwToftc.js → onboarding-NaMysfKu.js} +1 -1
  201. package/dist/client/assets/{optimistic-project-sidebar-views-CkdziasT.js → optimistic-project-sidebar-views-CnXa40yZ.js} +1 -1
  202. package/dist/client/assets/org-file-open-context-GfBe4Lpi.js +1 -0
  203. package/dist/client/assets/{organization-choice-DyW08sxK.js → organization-choice-BKxMxoJn.js} +1 -1
  204. package/dist/client/assets/{orgs-DJ8iJmJH.js → orgs-BvzvadNE.js} +1 -1
  205. package/dist/client/assets/{page-seo-form-Di_npWJ4.js → page-seo-form-D3Ps7cZw.js} +1 -1
  206. package/dist/client/assets/{pair-Dpg5RzdY.js → pair-kWiwbnho.js} +1 -1
  207. package/dist/client/assets/{plan-ladder-ClS63sS8.js → plan-ladder-CY-Z8Ivq.js} +1 -1
  208. package/dist/client/assets/{popover-RErMjkys.js → popover-BGd36YgB.js} +1 -1
  209. package/dist/client/assets/post-calendar-DYYzvYLc.js +1 -0
  210. package/dist/client/assets/post-editor-CaCmWj6J.js +1 -0
  211. package/dist/client/assets/{preview-content-Cir3xjov.js → preview-content-Boo_eVop.js} +1 -1
  212. package/dist/client/assets/{preview-dialog-DXRDlQ04.js → preview-dialog-DHXJPLGL.js} +1 -1
  213. package/dist/client/assets/{primitives-D5fyRotM.js → primitives-CKaN1rNH.js} +1 -1
  214. package/dist/client/assets/{profile-CARb014r.js → profile-N__YV02p.js} +1 -1
  215. package/dist/client/assets/{project-app-view-CbZ9X9YB.js → project-app-view-DNS5eCSn.js} +1 -1
  216. package/dist/client/assets/{project-feed-BnvodKMh.js → project-feed-5BgkxnYg.js} +1 -1
  217. package/dist/client/assets/{project-icon-B0ih2u61.js → project-icon-DQkQSxZw.js} +1 -1
  218. package/dist/client/assets/project-reports-CqxK4fWT.js +1 -0
  219. package/dist/client/assets/project-tasks-IgbELLeD.js +1 -0
  220. package/dist/client/assets/{prompts-DC4p_0y3.js → prompts-Dl4z55pl.js} +1 -1
  221. package/dist/client/assets/record-editor-DsEcUGgo.js +1 -0
  222. package/dist/client/assets/redirect-editor-kShoD3Wd.js +1 -0
  223. package/dist/client/assets/{registry-layout-hY2gP5kb.js → registry-layout-DI-hF5m1.js} +1 -1
  224. package/dist/client/assets/registry-yh_1oSSj.js +2 -0
  225. package/dist/client/assets/reports-C1ta3Pms.js +1 -0
  226. package/dist/client/assets/{reports-BRDL0pEv.js → reports-gEiYrZM5.js} +1 -1
  227. package/dist/client/assets/{reports-onboarding-CVlJWsoz.js → reports-onboarding-DHaOLYgm.js} +1 -1
  228. package/dist/client/assets/{reports-tab-DSQtYmT9.js → reports-tab-Cz8M-Vq9.js} +2 -2
  229. package/dist/client/assets/{repositories-D8heZRgl.js → repositories-B1iivH6M.js} +1 -1
  230. package/dist/client/assets/{repository-import-picker-C2CebsOL.js → repository-import-picker-JrKf0rR5.js} +1 -1
  231. package/dist/client/assets/{repository-picker-5XZZ15v0.js → repository-picker-CV4V7DF8.js} +1 -1
  232. package/dist/client/assets/{require-capability-BJkKy0kt.js → require-capability-Td9HSP5v.js} +1 -1
  233. package/dist/client/assets/{required-auth-layout-BwX4AD0R.js → required-auth-layout-O-2fosqz.js} +1 -1
  234. package/dist/client/assets/{reset-password-D0tmp0EO.js → reset-password-DMz0UAEt.js} +1 -1
  235. package/dist/client/assets/{resizable-DDt8g8vK.js → resizable-hHcftR57.js} +1 -1
  236. package/dist/client/assets/{review-settings-BuR2yqLd.js → review-settings-CkVsqJxm.js} +1 -1
  237. package/dist/client/assets/{rich-text-link-control-BU04B-4N.js → rich-text-link-control-xyc77eAl.js} +1 -1
  238. package/dist/client/assets/{roles-Dlq8_r8a.js → roles-DRF0sXxE.js} +1 -1
  239. package/dist/client/assets/{route-CVpzQ3gM.js → route-CG8hkNwT.js} +1 -1
  240. package/dist/client/assets/{route-Kp0M8uVs.js → route-Cy-w3Fp7.js} +1 -1
  241. package/dist/client/assets/route-DOgOyrYA.js +1 -0
  242. package/dist/client/assets/{runnable-block-editor-CS_U3fa-.js → runnable-block-editor-Db5dXcSl.js} +1 -1
  243. package/dist/client/assets/{sandbox-lifecycle-context-CsT5D-QV.js → sandbox-lifecycle-context-YzrdyqTe.js} +1 -1
  244. package/dist/client/assets/{schema-kS1q2dfz.js → schema-DobnB1YS.js} +1 -1
  245. package/dist/client/assets/{scroll-area-CXYGaVSO.js → scroll-area-lKTlOT_0.js} +1 -1
  246. package/dist/client/assets/{search-input-BtpfjT5l.js → search-input-BsvR49ic.js} +1 -1
  247. package/dist/client/assets/{secrets-DriRRH1t.js → secrets-CvmXb4jS.js} +1 -1
  248. package/dist/client/assets/{sections-editor-C9C533d2.js → sections-editor-BL8f9i5C.js} +2 -2
  249. package/dist/client/assets/{select-BOl9wnf6.js → select-D8neBfTB.js} +1 -1
  250. package/dist/client/assets/{select-model-S4XMti-S.js → select-model-Ckl_Fui7.js} +1 -1
  251. package/dist/client/assets/seo-editor-kdZ3qtF5.js +1 -0
  252. package/dist/client/assets/{settings-tab-CzTdGYon.js → settings-tab-DHNqjcoa.js} +1 -1
  253. package/dist/client/assets/{sheet-Ceo6cjp6.js → sheet-CgrtO55N.js} +1 -1
  254. package/dist/client/assets/{shell-layout-CQI5EYIN.js → shell-layout-BJKVf96_.js} +1 -1
  255. package/dist/client/assets/{sidebar-Cr04YrvT.js → sidebar-CiHAL8Wu.js} +1 -1
  256. package/dist/client/assets/{skill-preview-CJENC0FV.js → skill-preview-mcEHLHpL.js} +1 -1
  257. package/dist/client/assets/skills-DqE-vPtp.js +1 -0
  258. package/dist/client/assets/{sso-DcjvBhN8.js → sso-CMeXDyDr.js} +1 -1
  259. package/dist/client/assets/{store-C8yaccqA.js → store-BjgehfaI.js} +1 -1
  260. package/dist/client/assets/store-registry-W_KtCEiD.js +2 -0
  261. package/dist/client/assets/{switch-DbzO6PiM.js → switch-fMRKTd8o.js} +1 -1
  262. package/dist/client/assets/{synced-repos-CUy4rER9.js → synced-repos-D08q7iIK.js} +1 -1
  263. package/dist/client/assets/{table-CUSmiMk_.js → table-Clh8UGCw.js} +1 -1
  264. package/dist/client/assets/{tabs-52cPaZXm.js → tabs-BSBLIBXv.js} +1 -1
  265. package/dist/client/assets/{task-board-CurTs85l.js → task-board-Cw7pQ9f8.js} +1 -1
  266. package/dist/client/assets/{task-route-Bm0ou-_S.js → task-route-BcG-Y9vh.js} +1 -1
  267. package/dist/client/assets/{task-status-BaM-QAj1.js → task-status-BVBWAfWD.js} +1 -1
  268. package/dist/client/assets/tasks-CrfaMYqW.js +1 -0
  269. package/dist/client/assets/{tasks-BwcO5_EM.js → tasks-x1afrsv8.js} +4 -4
  270. package/dist/client/assets/{textarea-Q7sXwojB.js → textarea-DRjwrMCJ.js} +1 -1
  271. package/dist/client/assets/{thread-intent-DEVJhxVt.js → thread-intent-CC6uL69b.js} +1 -1
  272. package/dist/client/assets/{thread-route-Dwt9n8IO.js → thread-route-BGLKWWbA.js} +1 -1
  273. package/dist/client/assets/{thread-route-D6xj1qQJ.js → thread-route-DvFwa34h.js} +1 -1
  274. package/dist/client/assets/{thread-sheet-body-BZp0HOAe.js → thread-sheet-body-DtBk50q_.js} +1 -1
  275. package/dist/client/assets/{toggle-group-CXPhZI2J.js → toggle-group-CFBKi1GU.js} +1 -1
  276. package/dist/client/assets/{toolbar-icon-button-B5qgEXx3.js → toolbar-icon-button-C8vKnpxW.js} +1 -1
  277. package/dist/client/assets/{tooltip-DIW02rf-.js → tooltip-BM4MyYtx.js} +1 -1
  278. package/dist/client/assets/{track-B4UKRWe_.js → track-BnjuU_Aa.js} +1 -1
  279. package/dist/client/assets/{types-B3jTqzVf.js → types-OTmzvENk.js} +1 -1
  280. package/dist/client/assets/{usage-stats-Bb9Gp-Dh.js → usage-stats-BtXxJtjV.js} +1 -1
  281. package/dist/client/assets/{use-ai-providers-DMafZHsF.js → use-ai-providers-D3pmon60.js} +1 -1
  282. package/dist/client/assets/{use-automations-COtBDrNr.js → use-automations-DToyPFV1.js} +1 -1
  283. package/dist/client/assets/{use-autosave-CVgSUfQU.js → use-autosave-BU_qHXev.js} +1 -1
  284. package/dist/client/assets/{use-connect-companion-DMsU19hB.js → use-connect-companion-BpCoDO4S.js} +1 -1
  285. package/dist/client/assets/{use-connection-Cgge7ejL.js → use-connection-B3V4uZfg.js} +1 -1
  286. package/dist/client/assets/{use-copy-Cfn-m-ZW.js → use-copy-KnHqebR6.js} +1 -1
  287. package/dist/client/assets/{use-create-virtual-mcp-CIJNntTR.js → use-create-virtual-mcp-2UYwG6y3.js} +1 -1
  288. package/dist/client/assets/{use-date-fns-locale-BUWupqqb.js → use-date-fns-locale-BWw8dghC.js} +1 -1
  289. package/dist/client/assets/{use-debounced-autosave-Z2J2ec3T.js → use-debounced-autosave-BHeNLff-.js} +1 -1
  290. package/dist/client/assets/{use-debounced-value-DfSh3fpE.js → use-debounced-value-BGWej6mZ.js} +1 -1
  291. package/dist/client/assets/{use-deco-credits-Du018wK9.js → use-deco-credits-D-Neva26.js} +1 -1
  292. package/dist/client/assets/{use-decopilot-events-B-nXlaQa.js → use-decopilot-events-DkwYxfvc.js} +1 -1
  293. package/dist/client/assets/{use-delete-connection-CbdREeJX.js → use-delete-connection-CzgqXCsw.js} +1 -1
  294. package/dist/client/assets/{use-deployment-admin-BfQ856y9.js → use-deployment-admin-BD8J4rzi.js} +1 -1
  295. package/dist/client/assets/{use-entitlements-Bir1zQcD.js → use-entitlements-TTRAg4gu.js} +1 -1
  296. package/dist/client/assets/{use-fast-preview-draft-url-CI4dqTq2.js → use-fast-preview-draft-url-CiAYOF7M.js} +1 -1
  297. package/dist/client/assets/{use-file-configs-B04A692l.js → use-file-configs-Ckmsn28x.js} +1 -1
  298. package/dist/client/assets/{use-infinite-scroll-NmeaxM7f.js → use-infinite-scroll-gZkFm8Rv.js} +1 -1
  299. package/dist/client/assets/{use-join-requests-DI0a8svX.js → use-join-requests-FhpmlLIv.js} +1 -1
  300. package/dist/client/assets/{use-main-panel-tabs-CBiJ8PZZ.js → use-main-panel-tabs-IpsUP9Wl.js} +1 -1
  301. package/dist/client/assets/{use-mcp-auth-status-B5PR04-x.js → use-mcp-auth-status-C9YFSjt7.js} +1 -1
  302. package/dist/client/assets/{use-mcp-client-2DKlVY7y.js → use-mcp-client-DSGHqAYD.js} +1 -1
  303. package/dist/client/assets/{use-mcp-prompts-DPn1lgbL.js → use-mcp-prompts-Dne6CipL.js} +1 -1
  304. package/dist/client/assets/{use-mcp-tools-0KttftJq.js → use-mcp-tools-5LthbFq_.js} +1 -1
  305. package/dist/client/assets/{use-members-BOo0dfib.js → use-members-vJs6czuz.js} +1 -1
  306. package/dist/client/assets/{use-mobile-dc5AlUoG.js → use-mobile-C5k18fP1.js} +1 -1
  307. package/dist/client/assets/{use-navigate-to-agent-BsM0_8Qa.js → use-navigate-to-agent-qRyehLE-.js} +1 -1
  308. package/dist/client/assets/{use-open-billing-url-DU-RhPSk.js → use-open-billing-url-Bn4c7bA3.js} +1 -1
  309. package/dist/client/assets/{use-org-auth-client-EU2_QrcX.js → use-org-auth-client-BfT_gcIU.js} +1 -1
  310. package/dist/client/assets/{use-org-fs-CPcFon5v.js → use-org-fs-CY3ClF__.js} +1 -1
  311. package/dist/client/assets/{use-org-notice-CJ4ginwY.js → use-org-notice-DXInzY6B.js} +1 -1
  312. package/dist/client/assets/{use-org-sso-DliUqcof.js → use-org-sso-D6OOHL4I.js} +1 -1
  313. package/dist/client/assets/{use-organization-roles-DWRM5Xlm.js → use-organization-roles-C6CqS3Hl.js} +1 -1
  314. package/dist/client/assets/{use-organization-settings-CZaZMu7C.js → use-organization-settings-H5G4XpWU.js} +1 -1
  315. package/dist/client/assets/{use-panel-navigate-ClG-UYrb.js → use-panel-navigate-EBQ6GmN1.js} +1 -1
  316. package/dist/client/assets/{use-project-native-view-presence-YmT7vpKk.js → use-project-native-view-presence-DY4DPkNa.js} +1 -1
  317. package/dist/client/assets/{use-project-scope-CsFUzitf.js → use-project-scope-De26TkyD.js} +1 -1
  318. package/dist/client/assets/{use-registry-connections-JpgvKLOj.js → use-registry-connections-DOOOhGq6.js} +1 -1
  319. package/dist/client/assets/{use-releases-Bgl6UW0_.js → use-releases-Cd85Ra1l.js} +1 -1
  320. package/dist/client/assets/{use-reports-diagnostic-eNPzfjim.js → use-reports-diagnostic-C3Z-hnHf.js} +1 -1
  321. package/dist/client/assets/{use-route-default-main-DDalOeoB.js → use-route-default-main-CwM8UwOB.js} +1 -1
  322. package/dist/client/assets/{use-secrets-WK-wxIoH.js → use-secrets-B7F5FjB9.js} +1 -1
  323. package/dist/client/assets/{use-section-preview-base-CUFpzI8Q.js → use-section-preview-base-CMoIrJO-.js} +1 -1
  324. package/dist/client/assets/{use-session-runtime-CwgGPQkM.js → use-session-runtime-aoBCs__S.js} +1 -1
  325. package/dist/client/assets/{use-tags-BqLVEjBd.js → use-tags-pjxdPmb5.js} +1 -1
  326. package/dist/client/assets/{use-task-metadata-D1gl7viW.js → use-task-metadata-mJK-YnBs.js} +1 -1
  327. package/dist/client/assets/{use-thread-outputs-BnQmraib.js → use-thread-outputs-B9W8oYCz.js} +1 -1
  328. package/dist/client/assets/{use-view-mode-BLK8sDZS.js → use-view-mode-BA4qSq0B.js} +1 -1
  329. package/dist/client/assets/{use-virtual-mcp-vVWql7vM.js → use-virtual-mcp-Dr5NTd9r.js} +1 -1
  330. package/dist/client/assets/useInfiniteQuery-n-cIQ6QW.js +1 -0
  331. package/dist/client/assets/{useQueries-Do0UR3yN.js → useQueries-Dg4q1uaA.js} +1 -1
  332. package/dist/client/assets/useSuspenseInfiniteQuery-BwUl7I8i.js +1 -0
  333. package/dist/client/assets/{users-DtkqmbRr.js → users-CGIgpUaK.js} +1 -1
  334. package/dist/client/assets/{utils-WGdymi8M.js → utils-BS6roSoG.js} +1 -1
  335. package/dist/client/assets/variant-calendar-Mc1lG7f-.js +1 -0
  336. package/dist/client/assets/{variant-matcher-override-zmFjw0un.js → variant-matcher-override-D3DFoTTd.js} +1 -1
  337. package/dist/client/assets/{view-mode-toggle-5ObOX782.js → view-mode-toggle-DE0VcNBJ.js} +1 -1
  338. package/dist/client/assets/{virtual-mcp-DhQhvEKt.js → virtual-mcp-B9qKMF6v.js} +1 -1
  339. package/dist/client/index.html +1 -1
  340. package/dist/server/cli.js +1 -1
  341. package/dist/server/server.js +1 -1
  342. package/package.json +1 -1
  343. package/dist/client/assets/agent-app-CmHjLSBh.js +0 -1
  344. package/dist/client/assets/agent-assets-l4c7ivCP.js +0 -1
  345. package/dist/client/assets/agent-automation-Dr_aQL2N.js +0 -20
  346. package/dist/client/assets/agent-deck-BmbZkAAh.js +0 -1
  347. package/dist/client/assets/agent-file-DWz6GUfE.js +0 -1
  348. package/dist/client/assets/agent-library-file-Buf4K-5l.js +0 -1
  349. package/dist/client/assets/agent-settings-D9FokKv0.js +0 -1
  350. package/dist/client/assets/agent-site-editor-code-Bjs5yYWF.js +0 -2
  351. package/dist/client/assets/agent-view-DMFjk5Go.js +0 -1
  352. package/dist/client/assets/api-keys-CWLFncf0.js +0 -1
  353. package/dist/client/assets/app-editor-BwzQ2tDT.js +0 -1
  354. package/dist/client/assets/category-editor-DYvQntUV.js +0 -1
  355. package/dist/client/assets/home-nMTACPWA.js +0 -1
  356. package/dist/client/assets/mock-board-CRzDhPtf.js +0 -90
  357. package/dist/client/assets/post-calendar-Ba_bnQmW.js +0 -1
  358. package/dist/client/assets/post-editor-CMawN_7j.js +0 -1
  359. package/dist/client/assets/project-reports-N4YBKsf_.js +0 -1
  360. package/dist/client/assets/project-tasks-Bhadpjy2.js +0 -1
  361. package/dist/client/assets/record-editor-B7I5ENzo.js +0 -1
  362. package/dist/client/assets/redirect-editor-B55pPerd.js +0 -1
  363. package/dist/client/assets/registry-C0G-_nW5.js +0 -2
  364. package/dist/client/assets/reports-B1m4nLcC.js +0 -1
  365. package/dist/client/assets/route-DE-oHInD.js +0 -1
  366. package/dist/client/assets/seo-editor-BFKhbHb8.js +0 -1
  367. package/dist/client/assets/skills-_wNQ3Q4Z.js +0 -1
  368. package/dist/client/assets/store-registry-C4goSG7S.js +0 -2
  369. package/dist/client/assets/tasks-B9F5PMjK.js +0 -1
  370. package/dist/client/assets/useInfiniteQuery-BUDJQ-a0.js +0 -1
  371. package/dist/client/assets/useSuspenseInfiniteQuery-BCBsko2y.js +0 -1
  372. package/dist/client/assets/variant-calendar-DBuSS1Kj.js +0 -1
@@ -1 +1 @@
1
- import{c as k,j as h,r as C,l as L}from"./index-CfiHR5p3.js";import{n as Z}from"./Tool02-zLL5jksN.js";import{A as y}from"./agent-icon-I_u5FzRN.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
1
+ import{c as k,j as h,r as C,l as L}from"./index-D9SZCEna.js";import{n as Z}from"./Tool02-BZbYKRFW.js";import{A as y}from"./agent-icon-CJ74PZ5u.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
@@ -1 +1 @@
1
- import{c as n,l as r,j as i,aV as p}from"./index-CfiHR5p3.js";function c(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{c as L};
1
+ import{c as n,l as r,j as i,aV as p}from"./index-D9SZCEna.js";function c(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{c as L};
@@ -1 +1 @@
1
- import{r as i,c as f}from"./index-CfiHR5p3.js";import{g as c}from"./sandbox-lifecycle-context-CsT5D-QV.js";import{a as l}from"./decofile-api-DGTmPuak.js";function p(e,t,n){return e===null?0:Math.max(0,n-Math.max(0,t-e))}function m(e,t){const[n,r]=i.useState(e),a=i.useRef(e?Date.now():null);return i.useEffect(()=>{if(e){a.current??=Date.now(),r(!0);return}if(!n)return;const s=()=>{a.current=null,r(!1)},o=p(a.current,Date.now(),t);if(o===0){s();return}const u=setTimeout(s,o);return()=>clearTimeout(u)},[e,n,t]),n}const y=500;function D(e,t,n){const r=f.c(6);let a;r[0]!==n||r[1]!==e||r[2]!==t?(a=l(e,t,n),r[0]=n,r[1]=e,r[2]=t,r[3]=a):a=r[3];let s;r[4]!==a?(s={mutationKey:a},r[4]=a,r[5]=s):s=r[5];const o=c(s)>0;return m(o,y)}function K(e,t,n){return`deco:preview:last-page:${e}:${t}:${n}`}function g(e){if(!e)return null;try{const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t)||typeof t.path!="string"||!t.path.startsWith("/"))return null;const n=typeof t.pageKey=="string"?t.pageKey:null,r={};if(t.params&&typeof t.params=="object")for(const[a,s]of Object.entries(t.params))typeof s=="string"&&(r[a]=s);return{path:t.path,pageKey:n,params:r}}catch{return null}}function d(e){try{return g(localStorage.getItem(e))}catch{return null}}function x(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}export{K as l,d as r,D as u,x as w};
1
+ import{r as i,c as f}from"./index-D9SZCEna.js";import{g as c}from"./sandbox-lifecycle-context-YzrdyqTe.js";import{a as l}from"./decofile-api-BEtZILgN.js";function p(e,t,n){return e===null?0:Math.max(0,n-Math.max(0,t-e))}function m(e,t){const[n,r]=i.useState(e),a=i.useRef(e?Date.now():null);return i.useEffect(()=>{if(e){a.current??=Date.now(),r(!0);return}if(!n)return;const s=()=>{a.current=null,r(!1)},o=p(a.current,Date.now(),t);if(o===0){s();return}const u=setTimeout(s,o);return()=>clearTimeout(u)},[e,n,t]),n}const y=500;function D(e,t,n){const r=f.c(6);let a;r[0]!==n||r[1]!==e||r[2]!==t?(a=l(e,t,n),r[0]=n,r[1]=e,r[2]=t,r[3]=a):a=r[3];let s;r[4]!==a?(s={mutationKey:a},r[4]=a,r[5]=s):s=r[5];const o=c(s)>0;return m(o,y)}function K(e,t,n){return`deco:preview:last-page:${e}:${t}:${n}`}function g(e){if(!e)return null;try{const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t)||typeof t.path!="string"||!t.path.startsWith("/"))return null;const n=typeof t.pageKey=="string"?t.pageKey:null,r={};if(t.params&&typeof t.params=="object")for(const[a,s]of Object.entries(t.params))typeof s=="string"&&(r[a]=s);return{path:t.path,pageKey:n,params:r}}catch{return null}}function d(e){try{return g(localStorage.getItem(e))}catch{return null}}function x(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}export{K as l,d as r,D as u,x as w};
@@ -1 +1 @@
1
- import{c as p,j as s,b as y,O as _,h as g,B as S,L as j,i as v,k as A,l as N}from"./index-CfiHR5p3.js";import{P as b}from"./index-wju8DM5a.js";import{R}from"./required-auth-layout-BwX4AD0R.js";import{u as T}from"./use-deployment-admin-BfQ856y9.js";const D=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function K(){const e=p.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:L},e[0]=a):a=e[0];const d=A(a),r=y();let t;e[1]!==d||e[2]!==r?(t=D.map(i=>s.jsx(j,{to:i.to,className:N("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",d.startsWith(i.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(i.labelKey)},i.to)),e[1]=d,e[2]=r,e[3]=t):t=e[3];let o;return e[4]!==t?(o=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=o):o=e[5],o}function L(e){return e.location.pathname}function k(){const e=p.c(22),{isAdmin:a,loading:d,needsEmailVerification:r}=T(),t=y();if(d){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(g,{className:"size-5 text-muted-foreground"})}),e[0]=n):n=e[0],n}if(!a){let n;e[1]!==t?(n=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=n):n=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let c;e[8]!==m?(c=s.jsx(S,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(j,{to:"/",children:m})}),e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==n||e[11]!==l||e[12]!==c?(h=s.jsx(v,{area:n,description:l,action:c}),e[10]=n,e[11]=l,e[12]=c,e[13]=h):h=e[13],h}let o;e[14]!==t?(o=t("admin.layout.adminDashboard"),e[14]=t,e[15]=o):o=e[15];let i;e[16]!==o?(i=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:o})}),e[16]=o,e[17]=i):i=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(b.Content,{children:s.jsx(_,{})}),e[19]=f):f=e[19];let x;return e[20]!==i?(x=s.jsxs(b,{variant:"plain",className:"h-dvh",children:[i,u,f]}),e[20]=i,e[21]=x):x=e[21],x}function $(){const e=p.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(R,{children:s.jsx(k,{})}),e[0]=a):a=e[0],a}export{$ as default};
1
+ import{c as p,j as s,b as y,O as _,h as g,B as S,L as j,i as v,k as A,l as N}from"./index-D9SZCEna.js";import{P as b}from"./index-Cw7IXwLo.js";import{R}from"./required-auth-layout-O-2fosqz.js";import{u as T}from"./use-deployment-admin-BD8J4rzi.js";const D=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function K(){const e=p.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:L},e[0]=a):a=e[0];const d=A(a),r=y();let t;e[1]!==d||e[2]!==r?(t=D.map(i=>s.jsx(j,{to:i.to,className:N("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",d.startsWith(i.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(i.labelKey)},i.to)),e[1]=d,e[2]=r,e[3]=t):t=e[3];let o;return e[4]!==t?(o=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=o):o=e[5],o}function L(e){return e.location.pathname}function k(){const e=p.c(22),{isAdmin:a,loading:d,needsEmailVerification:r}=T(),t=y();if(d){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(g,{className:"size-5 text-muted-foreground"})}),e[0]=n):n=e[0],n}if(!a){let n;e[1]!==t?(n=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=n):n=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let c;e[8]!==m?(c=s.jsx(S,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(j,{to:"/",children:m})}),e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==n||e[11]!==l||e[12]!==c?(h=s.jsx(v,{area:n,description:l,action:c}),e[10]=n,e[11]=l,e[12]=c,e[13]=h):h=e[13],h}let o;e[14]!==t?(o=t("admin.layout.adminDashboard"),e[14]=t,e[15]=o):o=e[15];let i;e[16]!==o?(i=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:o})}),e[16]=o,e[17]=i):i=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(b.Content,{children:s.jsx(_,{})}),e[19]=f):f=e[19];let x;return e[20]!==i?(x=s.jsxs(b,{variant:"plain",className:"h-dvh",children:[i,u,f]}),e[20]=i,e[21]=x):x=e[21],x}function $(){const e=p.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(R,{children:s.jsx(k,{})}),e[0]=a):a=e[0],a}export{$ as default};
@@ -1 +1 @@
1
- import{c as _,f as h,u as x,M as j,dD as S,ag as b,f1 as v,j as p,N as d}from"./index-CfiHR5p3.js";import{L}from"./legacy-main-redirect-34brc64A.js";import"./thread-route-D6xj1qQJ.js";function k(){const e=_.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=h(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=j(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const y=S({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:y,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};
1
+ import{c as _,f as h,u as x,M as j,dD as S,ag as b,f1 as v,j as p,N as d}from"./index-D9SZCEna.js";import{L}from"./legacy-main-redirect-DyjtdITZ.js";import"./thread-route-DvFwa34h.js";function k(){const e=_.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=h(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=j(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const y=S({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:y,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};
@@ -1 +1 @@
1
- import{c as v,C as t,j as p,N as m,a1 as c,f as y,u as I,R as E,dD as k,dE as R,dF as S,dG as b}from"./index-CfiHR5p3.js";import{b as L}from"./thread-route-D6xj1qQJ.js";function C(x){const a=v.c(78),{target:h}=x,{route:s,search:r}=h;switch(s.to){case c.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:c.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case c.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:c.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case c.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:c.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case c.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:c.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case c.library:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:c.library,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case t.root:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case t.tasks:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.reports:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.siteEditor:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.siteEditorContent:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.siteEditorCode:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.settings:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.assets:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.git:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.git,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.hosting:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.e2e:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.analytics:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.analytics,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.monitor:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.monitor,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.automations:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.automation:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.app:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.view:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.outputFile:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.outputDeck:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.libraryFile:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.connectSources:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}}}function A(x){const a=v.c(17),{children:h}=x;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=y(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const u=I(e),j=L(),g=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==j||a[3]!==g||a[4]!==i||a[5]!==r.agentId||a[6]!==u?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:u.virtualmcpid,fallbackAgentId:j}),f=(u.main!==void 0?R({org:i,agentId:n,main:u.main,search:u}):null)??S({org:i,routePath:g,search:u}),a[2]=j,a[3]=g,a[4]=i,a[5]=r.agentId,a[6]=u,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(C,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&u.virtualmcpid!==void 0){let l;a[13]!==u?(l=b(u),a[13]=u,a[14]=l):l=a[14];let d;return a[15]!==l?(d=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=d):d=a[16],d}return h??null}export{C as L,A as a};
1
+ import{c as v,C as t,j as p,N as m,a1 as c,f as y,u as I,R as E,dD as k,dE as R,dF as S,dG as b}from"./index-D9SZCEna.js";import{b as L}from"./thread-route-DvFwa34h.js";function C(x){const a=v.c(78),{target:h}=x,{route:s,search:r}=h;switch(s.to){case c.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:c.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case c.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:c.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case c.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:c.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case c.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:c.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case c.library:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:c.library,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case t.root:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case t.tasks:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.reports:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.siteEditor:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.siteEditorContent:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.siteEditorCode:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.settings:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.assets:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.git:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.git,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.hosting:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.e2e:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.analytics:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.analytics,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.monitor:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.monitor,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.automations:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.automation:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.app:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.view:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.outputFile:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.outputDeck:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.libraryFile:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.connectSources:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}}}function A(x){const a=v.c(17),{children:h}=x;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=y(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const u=I(e),j=L(),g=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==j||a[3]!==g||a[4]!==i||a[5]!==r.agentId||a[6]!==u?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:u.virtualmcpid,fallbackAgentId:j}),f=(u.main!==void 0?R({org:i,agentId:n,main:u.main,search:u}):null)??S({org:i,routePath:g,search:u}),a[2]=j,a[3]=g,a[4]=i,a[5]=r.agentId,a[6]=u,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(C,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&u.virtualmcpid!==void 0){let l;a[13]!==u?(l=b(u),a[13]=u,a[14]=l):l=a[14];let d;return a[15]!==l?(d=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=d):d=a[16],d}return h??null}export{C as L,A as a};
@@ -1,4 +1,4 @@
1
- import{c as F,b as X,j as t,ax as te,M as de,n as Xe,r as T,B as H,l as De,K as _,t as L,d as dt,u as ut,as as pt,dJ as mt}from"./index-CfiHR5p3.js";import{C as ft}from"./index-L41E_jdu.js";import{s as ht}from"./Eye-CO0I0F0e.js";import{s as bt}from"./Plus-DaMIkku0.js";import{i as xt}from"./SearchLg-C2sftj0S.js";import{i as $e}from"./Upload01-G3c4UCfB.js";import{s as gt}from"./XClose-5naA93fy.js";import{u as yt}from"./use-mobile-dc5AlUoG.js";import{f as vt,e as jt,b as wt,A as kt,a as St,d as Nt,c as Pt,g as Ct}from"./alert-dialog-dzu9U-o1.js";import{b as Le,D as Me,d as Ve,i as Ot,c as Qe,h as Ye,e as Ge}from"./dialog-DKHdGeG-.js";import{I as ye}from"./input-DOqceFPC.js";import{p as Ze,b as M,s as ce,H as je,h as we,a as oe,c as _e,d as et}from"./location-oTTXFrSF.js";import{u as Dt}from"./use-debounced-value-DfSh3fpE.js";import{c as ke,i as Fe,d as $t,h as Ue,l as tt,m as Ft,n as rt,j as Tt,o as Et}from"./use-org-fs-CPcFon5v.js";import{f as At,p as Rt,g as zt,u as Bt,e as Lt,a as Mt,F as Se,t as st,S as Vt,B as Ut,b as at,R as Ht,c as Kt}from"./cards-CnQ4nU1q.js";import{T as qt}from"./textarea-Q7sXwojB.js";import{t as It,n as Qt}from"./ChevronUp-B-GxN-tN.js";import{a as We}from"./Palette-B9i9hnCi.js";import{c as Yt}from"./Printer-AWNoUKRJ.js";import{i as Je}from"./X-Dr0Tqjzv.js";import{M as Gt}from"./markdown-CCv5IlPx.js";import{S as Wt}from"./file-share-button-I_P-fFZ5.js";import{L as Jt}from"./preview-dialog-DXRDlQ04.js";import{S as lt}from"./skill-preview-CJENC0FV.js";import{i as Xt}from"./ChevronRight-BvrNCsKT.js";import{t as Zt}from"./Stars01-DSWmseOt.js";import{i as _t}from"./Zap-XMkPrxNc.js";import{i as er}from"./GitBranch01-BPIVJl4U.js";import{a as tr}from"./use-panel-navigate-ClG-UYrb.js";import"./index-wju8DM5a.js";import"./resizable-DDt8g8vK.js";import"./MessageCircle01-CweHuqp7.js";import"./thread-route-D6xj1qQJ.js";import"./use-route-default-main-DDalOeoB.js";import"./hooks-C4BbSdNW.js";import"./use-mcp-client-2DKlVY7y.js";import"./auth-UveS8wF5.js";import"./backoff-8mStPHYB.js";import"./task-board-CurTs85l.js";import"./schema-kS1q2dfz.js";import"./tooltip-DIW02rf-.js";import"./index-B7wVUCeI.js";import"./toolbar-icon-button-B5qgEXx3.js";import"./DotsVertical-BKAvE_4x.js";import"./Download01-BvE_0avp.js";import"./Share07-BgGqkker.js";import"./Globe01-DjDoxbql.js";import"./Key01-0kVvyKcG.js";import"./Trash01-CchLM2HV.js";import"./dropdown-menu-CoycaRIZ.js";import"./Check-DYuLLcXz.js";import"./file-type-icon-SwABlaSO.js";import"./folder-icon-Bj6hz7oH.js";import"./skill-md-ChfVs4uF.js";import"./Copy01-BKbbYkAO.js";import"./ZoomOut-BLK0GcJv.js";import"./LinkExternal01-DCfxP5B_.js";import"./popover-RErMjkys.js";import"./preview-content-Cir3xjov.js";import"./file-preview-CZ1TplhI.js";import"./utils-WGdymi8M.js";import"./File02-Cnt06RSY.js";import"./Image01-D3ZQNp9r.js";import"./editor-BEf-Idam.js";import"./use-project-scope-CsFUzitf.js";import"./use-virtual-mcp-vVWql7vM.js";import"./github-repo-BknN0SVI.js";function rr(l){const e=l("library.brandComponentsPreview.title"),s=l("library.brandComponentsPreview.subtitle"),r=l("library.brandComponentsPreview.monthlySavingsLabel"),u=l("library.brandComponentsPreview.primaryButton"),n=l("library.brandComponentsPreview.secondaryButton"),o=l("library.brandComponentsPreview.ghostButton"),d=l("library.brandComponentsPreview.successBadge"),i=l("library.brandComponentsPreview.warningBadge"),c=l("library.brandComponentsPreview.errorBadge"),p=l("library.brandComponentsPreview.infoBadge"),h=l("library.brandComponentsPreview.allChip"),m=l("library.brandComponentsPreview.incomeChip"),w=l("library.brandComponentsPreview.spendingChip"),x=l("library.brandComponentsPreview.emailPlaceholder");return`
1
+ import{c as F,b as X,j as t,ax as te,M as de,n as Xe,r as T,B as H,l as De,K as _,t as L,d as dt,u as ut,as as pt,dH as mt}from"./index-D9SZCEna.js";import{C as ft}from"./index-DaYZAl9-.js";import{s as ht}from"./Eye-Bwli19bO.js";import{s as bt}from"./Plus-7oGWv8-d.js";import{i as xt}from"./SearchLg-gMgT6qJL.js";import{i as $e}from"./Upload01-51uW4MtH.js";import{s as gt}from"./XClose-DdmRkPdn.js";import{u as yt}from"./use-mobile-C5k18fP1.js";import{f as vt,e as jt,b as wt,A as kt,a as St,d as Nt,c as Pt,g as Ct}from"./alert-dialog-92GutrH9.js";import{b as Le,D as Me,d as Ve,i as Ot,c as Qe,h as Ye,e as Ge}from"./dialog-BCc5hlgI.js";import{I as ye}from"./input-DMN2ylja.js";import{p as Ze,b as M,s as ce,H as je,h as we,a as oe,c as _e,d as et}from"./location-oTTXFrSF.js";import{u as Dt}from"./use-debounced-value-BGWej6mZ.js";import{c as ke,i as Fe,d as $t,h as Ue,l as tt,m as Ft,n as rt,j as Tt,o as Et}from"./use-org-fs-CY3ClF__.js";import{f as At,p as Rt,g as zt,u as Bt,e as Lt,a as Mt,F as Se,t as st,S as Vt,B as Ut,b as at,R as Ht,c as Kt}from"./cards-DzbRsseW.js";import{T as qt}from"./textarea-DRjwrMCJ.js";import{t as It,n as Qt}from"./ChevronUp-Lw2r8wDj.js";import{a as We}from"./Palette-CPUNhPQw.js";import{c as Yt}from"./Printer-DhW8UOTN.js";import{i as Je}from"./X-BdugDRJ_.js";import{M as Gt}from"./markdown-08bGGv35.js";import{S as Wt}from"./file-share-button-Cqn5Q-hj.js";import{L as Jt}from"./preview-dialog-DHXJPLGL.js";import{S as lt}from"./skill-preview-mcEHLHpL.js";import{i as Xt}from"./ChevronRight-B1q4aRdE.js";import{t as Zt}from"./Stars01-Dja9PZ8p.js";import{i as _t}from"./Zap-BOBZbKzr.js";import{i as er}from"./GitBranch01-fGQefizx.js";import{a as tr}from"./use-panel-navigate-EBQ6GmN1.js";import"./index-Cw7IXwLo.js";import"./resizable-hHcftR57.js";import"./MessageCircle01-bLbPG2BY.js";import"./thread-route-DvFwa34h.js";import"./use-route-default-main-CwM8UwOB.js";import"./hooks-CBQzxxCh.js";import"./use-mcp-client-DSGHqAYD.js";import"./auth-BrGex7FY.js";import"./backoff-8mStPHYB.js";import"./task-board-Cw7pQ9f8.js";import"./schema-DobnB1YS.js";import"./tooltip-BM4MyYtx.js";import"./index-unCC-6KL.js";import"./toolbar-icon-button-C8vKnpxW.js";import"./DotsVertical-BHpLZzPU.js";import"./Download01-DAPCTBrh.js";import"./Share07-Bl1oEFtE.js";import"./Globe01-B4gNbsCg.js";import"./Key01-CVWwYajp.js";import"./Trash01-BUixXtcj.js";import"./dropdown-menu-tx6OX4aA.js";import"./Check-ZxK4xe7F.js";import"./file-type-icon-Dxp-Ok2P.js";import"./folder-icon-DfnI9Lc8.js";import"./skill-md-ChfVs4uF.js";import"./Copy01-BdfG_e2R.js";import"./ZoomOut-CG3Sk2c2.js";import"./org-file-open-context-GfBe4Lpi.js";import"./LinkExternal01-BKxoqAo_.js";import"./popover-BGd36YgB.js";import"./preview-content-Boo_eVop.js";import"./file-preview-9280F33a.js";import"./utils-BS6roSoG.js";import"./File02-Bk1dmRy_.js";import"./Image01-DTFvmUXj.js";import"./editor-BpQ5Scxi.js";import"./use-project-scope-De26TkyD.js";import"./use-virtual-mcp-Dr5NTd9r.js";import"./github-repo-BknN0SVI.js";function rr(l){const e=l("library.brandComponentsPreview.title"),s=l("library.brandComponentsPreview.subtitle"),r=l("library.brandComponentsPreview.monthlySavingsLabel"),u=l("library.brandComponentsPreview.primaryButton"),n=l("library.brandComponentsPreview.secondaryButton"),o=l("library.brandComponentsPreview.ghostButton"),d=l("library.brandComponentsPreview.successBadge"),i=l("library.brandComponentsPreview.warningBadge"),c=l("library.brandComponentsPreview.errorBadge"),p=l("library.brandComponentsPreview.infoBadge"),h=l("library.brandComponentsPreview.allChip"),m=l("library.brandComponentsPreview.incomeChip"),w=l("library.brandComponentsPreview.spendingChip"),x=l("library.brandComponentsPreview.emailPlaceholder");return`
2
2
  <div class="stack">
3
3
  <div>
4
4
  <h1>${e}</h1>
@@ -158,4 +158,4 @@ import{c as F,b as X,j as t,ax as te,M as de,n as Xe,r as T,B as H,l as De,K as
158
158
  <p class="cta">slides-create --theme &hellip;</p>
159
159
  </section>`].join(`
160
160
 
161
- `);function or(l,e){const s=e?`<style>${e}</style>`:"";return l.replaceAll("{{{slides}}}",ir).replaceAll("{{title}}",nr).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${s}</head>`)}function cr(l){const e=F.c(8),{readUrl:s,title:r,tokensUrl:u}=l,n=ke(s),o=ke(u??"");if(n.isPending||u&&o.isPending){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(te,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[0]=p):p=e[0],p}if(n.isError||!n.data){let p;return e[1]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This theme is no longer available."}),e[1]=p):p=e[1],p}const d=o.data??null;let i;e[2]!==d||e[3]!==n.data?(i=or(n.data,d),e[2]=d,e[3]=n.data,e[4]=i):i=e[4];let c;return e[5]!==i||e[6]!==r?(c=t.jsx("iframe",{title:r,srcDoc:i,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[5]=i,e[6]=r,e[7]=c):c=e[7],c}function ge(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-sm font-medium text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function dr(l){const e=F.c(16),{family:s,tokens:r,editing:u,valueOf:n,onEdit:o}=l;let d;e[0]!==s?(d=t.jsx("span",{className:"text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=d):d=e[1];let i;if(e[2]!==u||e[3]!==o||e[4]!==r||e[5]!==n){let h;e[7]!==u||e[8]!==o||e[9]!==n?(h=m=>{const w=n(m),x=`${m.name.replace(/^--brand-/,"")}: ${w}`;return u&&/^#/.test(w)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:Lt(w),onChange:y=>o(m.name,y.target.value),className:"size-7 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5"},m.name):t.jsx("span",{title:x,className:"size-7 rounded-md border border-border/60",style:{backgroundColor:w}},m.name)},e[7]=u,e[8]=o,e[9]=n,e[10]=h):h=e[10],i=r.map(h),e[2]=u,e[3]=o,e[4]=r,e[5]=n,e[6]=i}else i=e[6];let c;e[11]!==i?(c=t.jsx("div",{className:"flex flex-wrap gap-1",children:i}),e[11]=i,e[12]=c):c=e[12];let p;return e[13]!==d||e[14]!==c?(p=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15],p}function ur(l){const e=F.c(9),{token:s,value:r}=l;if(s.kind==="space"){let n;return e[0]!==r?(n=t.jsx("span",{className:"flex h-7 w-16 shrink-0 items-center",children:t.jsx("span",{className:"h-1.5 rounded-full bg-primary",style:{width:r,maxWidth:"100%"}})}),e[0]=r,e[1]=n):n=e[1],n}if(s.kind==="radius"){let n;return e[2]!==r?(n=t.jsx("span",{className:"size-7 shrink-0 border border-border bg-muted/50",style:{borderRadius:r}}),e[2]=r,e[3]=n):n=e[3],n}if(s.kind==="shadow"){let n;return e[4]!==r?(n=t.jsx("span",{className:"size-7 shrink-0 rounded-md bg-background",style:{boxShadow:r}}),e[4]=r,e[5]=n):n=e[5],n}if(s.kind==="type"&&/^--brand-text-/.test(s.name)){const n=`min(${r}, 22px)`;let o;return e[6]!==n?(o=t.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden leading-none text-foreground",style:{fontSize:n},children:"Ag"}),e[6]=n,e[7]=o):o=e[7],o}let u;return e[8]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=u):u=e[8],u}function nt(l){const e=F.c(17),{token:s,value:r,editing:u,onEdit:n}=l;let o;e[0]!==s||e[1]!==r?(o=t.jsx(ur,{token:s,value:r}),e[0]=s,e[1]=r,e[2]=o):o=e[2];let d;if(e[3]!==s.name){let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=/^--brand-/,e[5]=h):h=e[5],d=s.name.replace(h,""),e[3]=s.name,e[4]=d}else d=e[4];let i;e[6]!==d?(i=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:d}),e[6]=d,e[7]=i):i=e[7];let c;e[8]!==u||e[9]!==n||e[10]!==s.name||e[11]!==r?(c=u?t.jsx(ye,{value:r,onChange:h=>n(s.name,h.target.value),className:"h-8 w-40 font-mono text-xs"}):t.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:r}),e[8]=u,e[9]=n,e[10]=s.name,e[11]=r,e[12]=c):c=e[12];let p;return e[13]!==o||e[14]!==i||e[15]!==c?(p=t.jsxs("div",{className:"flex items-center gap-3",children:[o,i,c]}),e[13]=o,e[14]=i,e[15]=c,e[16]=p):p=e[16],p}function xe(l){const e=F.c(16),{label:s,tokens:r,editing:u,valueOf:n,onEdit:o}=l;if(r.length===0)return null;let d;e[0]!==s?(d=t.jsx(ge,{children:s}),e[0]=s,e[1]=d):d=e[1];let i;if(e[2]!==u||e[3]!==o||e[4]!==r||e[5]!==n){let h;e[7]!==u||e[8]!==o||e[9]!==n?(h=m=>t.jsx(nt,{token:m,value:n(m),editing:u,onEdit:o},m.name),e[7]=u,e[8]=o,e[9]=n,e[10]=h):h=e[10],i=r.map(h),e[2]=u,e[3]=o,e[4]=r,e[5]=n,e[6]=i}else i=e[6];let c;e[11]!==i?(c=t.jsx("div",{className:"flex flex-col gap-2.5",children:i}),e[11]=i,e[12]=c):c=e[12];let p;return e[13]!==d||e[14]!==c?(p=t.jsxs("div",{className:"flex flex-col gap-3",children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15],p}function pr({brandPath:l,onClose:e,variant:s}){const r=X(),{org:u}=de(),n=Ze(l),o=n.volume??"",d=n.dirPath,i=M(d),c=n.readOnly,p=Xe(),h=Fe(),m=$t(o),{upload:w,remove:x}=Ue(o),y=T.useRef(null),C=tt(o,d),D=C.data??[],N=a=>D.some(b=>b.kind==="file"&&M(b.path)===a),k=N("tokens.css"),P=N("brand.md"),g=N("slides-theme.html"),$=At(D),S=h(o,`${d}/tokens.css`),j=h(o,`${d}/brand.md`),O=h(o,`${d}/slides-theme.html`),V=ke(S,{enabled:k}),Y=ke(j,{enabled:P}),[v,E]=T.useState(!1),[z,G]=T.useState({}),[I,W]=T.useState(null),[U,A]=T.useState(!1),[K,f]=T.useState(!1),[q,se]=T.useState("deck"),Q=V.data?Rt(V.data):[],ue=a=>Q.find(b=>b.name===a)?.value,B=a=>z[a.name]??a.value,Z=zt(Q),ae=Q.filter(a=>a.kind==="font"),pe=Q.filter(a=>a.kind==="type"),me=Q.filter(a=>a.kind==="space"),Ee=Q.filter(a=>a.kind==="radius"),Ne=Q.filter(a=>a.kind==="shadow"),le=Q.filter(a=>a.kind==="motion"),Pe=Q.filter(a=>a.kind==="other"),J=(a,b)=>G(R=>({...R,[a]:b})),ne=g&&q==="deck",fe=I??Y.data??"",he=Object.entries(z).filter(([a,b])=>ue(a)!==b),be=I!==null&&I!==(Y.data??""),Ae=he.length>0||be;function Ce(){G({}),W(null),E(!1)}async function Re(){A(!0);try{if(he.length>0){let a=V.data??"";for(const[b,R]of he)a=Bt(a,b,R);await m.mutateAsync({path:`${d}/tokens.css`,body:a,contentType:"text/css; charset=utf-8"}),p.invalidateQueries({queryKey:_.fileText(S)})}be&&I!==null&&(await m.mutateAsync({path:`${d}/brand.md`,body:I,contentType:"text/markdown; charset=utf-8"}),p.invalidateQueries({queryKey:_.fileText(j)})),p.invalidateQueries({queryKey:_.orgFsVolume(u.id,o)}),p.invalidateQueries({queryKey:_.orgFsRecent(u.id)}),G({}),W(null),E(!1),L.success(r("library.brandPreview.brandSaved"))}catch(a){L.error(a instanceof Error?a.message:r("library.brandPreview.failedSaveBrand"))}finally{A(!1)}}async function ze(a){const b=a?.[0];if(!b)return;const ie=`logo.${(b.name.split(".").pop()??"png").toLowerCase()}`;try{await w.mutateAsync({dir:d,files:[new File([b],ie,{type:b.type})]}),$&&M($)!==ie&&await x.mutateAsync($),L.success(r("library.brandPreview.logoUpdated"))}catch(Ie){L.error(Ie instanceof Error?Ie.message:r("library.brandPreview.logoUploadFailed"))}finally{y.current&&(y.current.value="")}}const Be=!C.isPending&&!k&&!P&&!$;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(We,{size:18})}),s==="dialog"?t.jsx(Ve,{className:"flex-1 truncate text-base font-medium text-foreground",children:i}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:i}),!c&&(v?t.jsxs(t.Fragment,{children:[t.jsx(H,{variant:"ghost",size:"sm",onClick:Ce,disabled:U,children:r("library.brandPreview.cancel")}),t.jsx(H,{size:"sm",disabled:!Ae||U,onClick:()=>{Re()},children:r(U?"library.brandPreview.saving":"library.brandPreview.save")})]}):t.jsxs(H,{variant:"outline",size:"sm",onClick:()=>E(!0),children:[t.jsx(Yt,{size:14}),r("library.brandPreview.edit")]})),s==="dialog"?t.jsx(Ot,{asChild:!0,children:t.jsx(H,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(Je,{size:16})})}):t.jsx(H,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(Je,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:C.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(te,{className:"h-40 w-full rounded-xl"}),t.jsx(te,{className:"h-4 w-1/3"}),t.jsx(te,{className:"h-4 w-2/3"})]}):Be?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:r("library.brandPreview.brandNotAvailable")}):t.jsxs(t.Fragment,{children:[(g||k)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":r(K?"library.brandPreview.showPreview":"library.brandPreview.hidePreview"),onClick:()=>f(a=>!a),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),f(b=>!b))},className:"flex cursor-pointer items-center justify-between gap-2 px-4 py-2.5 hover:bg-muted/40",children:[t.jsxs("div",{className:"flex gap-0.5 rounded-lg bg-muted p-0.5 text-xs font-medium",onClick:a=>a.stopPropagation(),children:[g&&t.jsx("button",{type:"button",onClick:()=>{se("deck"),f(!1)},className:De("rounded-md px-2.5 py-1",ne?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r("library.brandPreview.deck")}),t.jsx("button",{type:"button",onClick:()=>{se("components"),f(!1)},className:De("rounded-md px-2.5 py-1",ne?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:r("library.brandPreview.components")})]}),K?t.jsx(It,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(Qt,{size:16,className:"shrink-0 text-muted-foreground"})]}),!K&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:De("w-full overflow-hidden rounded-xl border border-border bg-muted/30",ne?"aspect-[16/9]":"h-96"),children:ne?t.jsx(cr,{readUrl:O,title:`${i} deck theme`,tokensUrl:S}):t.jsx(lr,{tokensUrl:S})})})]}),t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto p-6",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.logo")}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:"flex size-24 items-center justify-center overflow-hidden rounded-xl border border-border bg-muted/30",children:$?t.jsx("img",{src:h(o,$),alt:`${i} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(We,{size:28,className:"text-muted-foreground/50"})}),v&&t.jsxs("div",{children:[t.jsxs(H,{variant:"outline",size:"sm",disabled:w.isPending,onClick:()=>y.current?.click(),children:[t.jsx($e,{size:14}),r($?"library.brandPreview.replaceLogo":"library.brandPreview.addLogo")]}),t.jsx("input",{ref:y,type:"file",accept:"image/*",className:"hidden",onChange:a=>{ze(a.target.files)}})]})]})]}),Z.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.colors")}),Z.map(a=>t.jsx(dr,{family:a.family,tokens:a.tokens,editing:v,valueOf:B,onEdit:J},a.family))]}),(ae.length>0||pe.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.typography")}),ae.map(a=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:a.name.replace(/^--brand-font-?/,"")||r("library.brandPreview.defaultFont")}),v?t.jsx(ye,{value:B(a),onChange:b=>J(a.name,b.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:B(a)},children:B(a)})]},a.name)),pe.map(a=>t.jsx(nt,{token:a,value:B(a),editing:v,onEdit:J},a.name))]}),t.jsx(xe,{label:r("library.brandPreview.spacing"),tokens:me,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.radius"),tokens:Ee,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.shadows"),tokens:Ne,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.motion"),tokens:le,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.tokens"),tokens:Pe,editing:v,valueOf:B,onEdit:J}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.voiceGuidelines")}),v?t.jsx(qt,{value:fe,onChange:a=>W(a.target.value),placeholder:r("library.brandPreview.voicePlaceholder"),className:"min-h-48 font-mono text-sm"}):Y.isPending&&P?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(te,{className:"h-3 w-full"}),t.jsx(te,{className:"h-3 w-5/6"})]}):fe.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(Gt,{id:`brand-preview-${l}`,text:fe})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:r("library.brandPreview.noVoiceYet")})]})]})]})})]})}function it(l){const e=F.c(8),{brandPath:s,onClose:r}=l;let u;e[0]!==r?(u=d=>{d||r()},e[0]=r,e[1]=u):u=e[1];let n;e[2]!==s||e[3]!==r?(n=t.jsx(Le,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl!",closeButtonClassName:"hidden",children:t.jsx(pr,{brandPath:s,onClose:r,variant:"dialog"})}),e[2]=s,e[3]=r,e[4]=n):n=e[4];let o;return e[5]!==u||e[6]!==n?(o=t.jsx(Me,{open:!0,onOpenChange:u,children:n}),e[5]=u,e[6]=n,e[7]=o):o=e[7],o}function mr(l){const e=F.c(11),{onOpenDir:s}=l,r=X(),u=Mt();let n;e[0]!==u.data?(n=u.data??[],e[0]=u.data,e[1]=n):n=e[1];let o;if(e[2]!==s||e[3]!==r||e[4]!==n){let i;e[6]!==s||e[7]!==r?(i=c=>t.jsx(Se,{name:c.volume,glyph:er,tone:"system",readOnly:!0,meta:`${c.repoOwner}/${c.repoName}`,subtitle:c.lastSyncError?r("library.syncedRepos.syncFailed"):c.lastSyncedAt?r("library.syncedRepos.syncedAgo",{ago:st(c.lastSyncedAt)}):r("library.syncedRepos.waitingFirstSync"),onOpen:()=>s(c.volume)},c.id),e[6]=s,e[7]=r,e[8]=i):i=e[8],o=n.map(i),e[2]=s,e[3]=r,e[4]=n,e[5]=o}else o=e[5];let d;return e[9]!==o?(d=t.jsx(t.Fragment,{children:o}),e[9]=o,e[10]=d):d=e[10],d}function Ke(l){return`${window.location.origin}${l}`}function ve(l){if(l.shareMode==="password")return"password";if(l.shareMode==="public"||l.readPublic)return"public";if(l.effectivePublic)return"inherited"}const fr=[je,"uploads","outputs"],ot=[{volume:"uploads",descriptionKey:"library.libraryViews.volumeUploadsDescription",glyph:$e},{volume:"outputs",descriptionKey:"library.libraryViews.volumeOutputsDescription",glyph:Zt}],He=new Set([...ot.map(l=>l.volume),ce("public")]),hr=6;function ct(l,e,s){const r=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",u=_e(l),n=u?`public/${u}`:l==="home"?we(s):l;return r?`${n}/${r}`:n}function Oe(l,e,s){return{onDragStart:r=>{s.onDragStart?.(l),r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("application/x-studio-library-path",l)},onContextMenu:r=>{r.preventDefault(),s.onContextMenu?.(l,e)},onDrop:s.onDrop?r=>{r.preventDefault();const u=r.dataTransfer.getData("application/x-studio-library-path");u&&u!==l&&!l.startsWith(u+"/")&&s.onDrop(u,l)}:void 0}}function re(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-[13px] text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ee(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("div",{className:"@container",children:t.jsx("div",{className:"grid grid-cols-1 gap-3 @[440px]:grid-cols-2 @[660px]:grid-cols-3",children:s})}),e[0]=s,e[1]=r):r=e[1],r}function Te(l){const e=F.c(2),{rows:s}=l,r=s===void 0?1:s;let u;return e[0]!==r?(u=t.jsx(ee,{children:Array.from({length:r*3},br)}),e[0]=r,e[1]=u):u=e[1],u}function br(l,e){return t.jsx(te,{className:"h-16 rounded-2xl"},e)}function qe(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function xr(l){const e=F.c(12),{volume:s,descriptionKey:r,glyph:u,onOpen:n}=l,o=X(),d=Et(s);let i;e[0]!==o||e[1]!==d.data?(i=d.data?o("library.libraryViews.filesCount",{count:d.data.files}):void 0,e[0]=o,e[1]=d.data,e[2]=i):i=e[2];let c;e[3]!==r||e[4]!==o?(c=o(r),e[3]=r,e[4]=o,e[5]=c):c=e[5];let p;return e[6]!==u||e[7]!==n||e[8]!==i||e[9]!==c||e[10]!==s?(p=t.jsx(Se,{name:s,meta:i,subtitle:c,glyph:u,tone:"system",onOpen:n}),e[6]=u,e[7]=n,e[8]=i,e[9]=c,e[10]=s,e[11]=p):p=e[11],p}function gr(l){const e=F.c(12),{onOpenDir:s}=l,r=X(),n=rt().data?.length??0;let o;e[0]!==s?(o=ot.map(p=>t.jsx(xr,{volume:p.volume,descriptionKey:p.descriptionKey,glyph:p.glyph,onOpen:()=>s(p.volume)},p.volume)),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==s||e[3]!==n||e[4]!==r?(d=n>0&&t.jsx(Se,{name:ce("public"),meta:r("library.libraryViews.skillSetsCount",{count:n}),subtitle:r("library.libraryViews.curatedSkillSetsReadOnly"),glyph:_t,tone:"system",readOnly:!0,onOpen:()=>s("public")}),e[2]=s,e[3]=n,e[4]=r,e[5]=d):d=e[5];let i;e[6]!==s?(i=t.jsx(mr,{onOpenDir:s}),e[6]=s,e[7]=i):i=e[7];let c;return e[8]!==o||e[9]!==d||e[10]!==i?(c=t.jsxs(t.Fragment,{children:[o,d,i]}),e[8]=o,e[9]=d,e[10]=i,e[11]=c):c=e[11],c}function yr(l){const e=F.c(19),{segments:s,onNavigate:r}=l,{org:u}=de();let n;e[0]!==s?(n=s[0]===je?s.slice(1):s,e[0]=s,e[1]=n):n=e[1];const o=n,d=s.length-o.length,i=o.length===0;let c;e[2]!==i||e[3]!==r||e[4]!==u.slug?(c=i?t.jsx("span",{className:"truncate font-medium text-foreground",children:we(u.slug)}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>r(je),children:we(u.slug)}),e[2]=i,e[3]=r,e[4]=u.slug,e[5]=c):c=e[5];let p;if(e[6]!==d||e[7]!==r||e[8]!==o||e[9]!==s){let m;e[11]!==d||e[12]!==r||e[13]!==o.length||e[14]!==s?(m=(w,x)=>{const y=s.slice(0,d+x+1).join("/"),C=x===o.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Xt,{size:12,className:"shrink-0 text-muted-foreground"}),C?t.jsx("span",{className:"truncate font-medium text-foreground",children:ce(w)}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>r(y),children:ce(w)})]},y)},e[11]=d,e[12]=r,e[13]=o.length,e[14]=s,e[15]=m):m=e[15],p=o.map(m),e[6]=d,e[7]=r,e[8]=o,e[9]=s,e[10]=p}else p=e[10];let h;return e[16]!==c||e[17]!==p?(h=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[c,p]}),e[16]=c,e[17]=p,e[18]=h):h=e[18],h}function vr(l){const e=F.c(43),{query:s,scope:r,stale:u,onOpenFile:n,onShare:o,onDelete:d}=l,i=X(),{org:c}=de(),p=Fe(),h=Ft(s,r);let m;e[0]!==p||e[1]!==o?(m=S=>o({volume:S.volume,path:S.path,kind:"file",shareMode:S.shareMode??"private",effectivePublic:S.effectivePublic??!1,url:Ke(p(S.volume,S.path))}),e[0]=p,e[1]=o,e[2]=m):m=e[2];const w=m;if(h.isPending){let S;return e[3]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Te,{rows:2}),e[3]=S):S=e[3],S}let x,y,C,D,N;if(e[4]!==s||e[5]!==h.data||e[6]!==h.isPlaceholderData||e[7]!==u||e[8]!==i){N=Symbol.for("react.early_return_sentinel");e:{if(y=h.data??[],y.length===0){let j;e[14]!==s||e[15]!==i?(j=i("library.libraryViews.noFilesMatch",{query:s}),e[14]=s,e[15]=i,e[16]=j):j=e[16];let O;e[17]!==j?(O=t.jsx(qe,{children:j}),e[17]=j,e[18]=O):O=e[18],N=O;break e}const S=(u||h.isPlaceholderData)&&"opacity-50";e[19]!==S?(D=De("flex flex-col gap-3",S),e[19]=S,e[20]=D):D=e[20],x=re,C=i("library.libraryViews.searchResults",{count:y.length})}e[4]=s,e[5]=h.data,e[6]=h.isPlaceholderData,e[7]=u,e[8]=i,e[9]=x,e[10]=y,e[11]=C,e[12]=D,e[13]=N}else x=e[9],y=e[10],C=e[11],D=e[12],N=e[13];if(N!==Symbol.for("react.early_return_sentinel"))return N;let k;e[21]!==x||e[22]!==C?(k=t.jsx(x,{children:C}),e[21]=x,e[22]=C,e[23]=k):k=e[23];let P;if(e[24]!==p||e[25]!==d||e[26]!==n||e[27]!==c||e[28]!==y||e[29]!==w){let S;e[31]!==p||e[32]!==d||e[33]!==n||e[34]!==c||e[35]!==w?(S=j=>{const O=_e(j.volume)!==null;return t.jsx(at,{filename:M(j.path),updatedAt:j.updatedAt,downloadUrl:p(j.volume,j.path),subtitle:ct(j.volume,j.path,c.slug),publicState:ve(j),onOpen:()=>n(et(j.volume,j.path)),onShare:O?void 0:()=>w(j),onDelete:O?void 0:()=>d({volume:j.volume,path:j.path,kind:"file"})},`${j.volume}/${j.path}`)},e[31]=p,e[32]=d,e[33]=n,e[34]=c,e[35]=w,e[36]=S):S=e[36],P=y.map(S),e[24]=p,e[25]=d,e[26]=n,e[27]=c,e[28]=y,e[29]=w,e[30]=P}else P=e[30];let g;e[37]!==P?(g=t.jsx(ee,{children:P}),e[37]=P,e[38]=g):g=e[38];let $;return e[39]!==D||e[40]!==k||e[41]!==g?($=t.jsxs("div",{className:D,children:[k,g]}),e[39]=D,e[40]=k,e[41]=g,e[42]=$):$=e[42],$}function jr(l){const e=F.c(39),{onOpenFile:s,onShare:r,onDelete:u}=l,n=X(),{org:o}=de(),d=Tt(),i=Fe();let c;e[0]!==i||e[1]!==r?(c=N=>r({volume:N.volume,path:N.path,kind:"file",shareMode:N.shareMode??"private",effectivePublic:N.effectivePublic??!1,url:Ke(i(N.volume,N.path))}),e[0]=i,e[1]=r,e[2]=c):c=e[2];const p=c;if(d.isPending){let N;e[3]!==n?(N=n("library.libraryViews.recentlyAdded"),e[3]=n,e[4]=N):N=e[4];let k;e[5]!==N?(k=t.jsx(re,{children:N}),e[5]=N,e[6]=k):k=e[6];let P;e[7]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Te,{}),e[7]=P):P=e[7];let g;return e[8]!==k?(g=t.jsxs("div",{className:"flex flex-col gap-3",children:[k,P]}),e[8]=k,e[9]=g):g=e[9],g}let h,m,w,x,y;if(e[10]!==i||e[11]!==u||e[12]!==s||e[13]!==o||e[14]!==d.data||e[15]!==p||e[16]!==n){y=Symbol.for("react.early_return_sentinel");e:{const N=(d.data??[]).slice(0,hr);if(N.length===0){y=null;break e}w="flex flex-col gap-3";let k;e[22]!==n?(k=n("library.libraryViews.recentlyAdded"),e[22]=n,e[23]=k):k=e[23],e[24]!==k?(x=t.jsx(re,{children:k}),e[24]=k,e[25]=x):x=e[25],h=ee;let P;e[26]!==i||e[27]!==u||e[28]!==s||e[29]!==o||e[30]!==p?(P=g=>t.jsx(Ht,{filename:M(g.path),updatedAt:g.updatedAt,size:g.size,downloadUrl:i(g.volume,g.path),subtitle:ct(g.volume,g.path,o.slug),publicState:ve(g),onOpen:()=>s(et(g.volume,g.path)),onShare:()=>p(g),onDelete:()=>u({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`),e[26]=i,e[27]=u,e[28]=s,e[29]=o,e[30]=p,e[31]=P):P=e[31],m=N.map(P)}e[10]=i,e[11]=u,e[12]=s,e[13]=o,e[14]=d.data,e[15]=p,e[16]=n,e[17]=h,e[18]=m,e[19]=w,e[20]=x,e[21]=y}else h=e[17],m=e[18],w=e[19],x=e[20],y=e[21];if(y!==Symbol.for("react.early_return_sentinel"))return y;let C;e[32]!==h||e[33]!==m?(C=t.jsx(h,{children:m}),e[32]=h,e[33]=m,e[34]=C):C=e[34];let D;return e[35]!==w||e[36]!==x||e[37]!==C?(D=t.jsxs("div",{className:w,children:[x,C]}),e[35]=w,e[36]=x,e[37]=C,e[38]=D):D=e[38],D}function wr(l){const e=F.c(16),{onOpenDir:s}=l,r=X(),u=rt();if(u.isPending){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Te,{}),e[0]=c):c=e[0],c}let n;e[1]!==u.data?(n=u.data??[],e[1]=u.data,e[2]=n):n=e[2];const o=n;if(o.length===0){let c;e[3]!==r?(c=r("library.libraryViews.noPublicSkillSetsConfigured"),e[3]=r,e[4]=c):c=e[4];let p;return e[5]!==c?(p=t.jsx(qe,{children:c}),e[5]=c,e[6]=p):p=e[6],p}let d;if(e[7]!==s||e[8]!==o||e[9]!==r){let c;e[11]!==s||e[12]!==r?(c=p=>t.jsx(Se,{name:p,subtitle:r("library.libraryViews.readOnly"),readOnly:!0,onOpen:()=>s(`public/${p}`)},p),e[11]=s,e[12]=r,e[13]=c):c=e[13],d=o.map(c),e[7]=s,e[8]=o,e[9]=r,e[10]=d}else d=e[10];let i;return e[14]!==d?(i=t.jsx(ee,{children:d}),e[14]=d,e[15]=i):i=e[15],i}function kr(l){const e=F.c(63),{location:s,onOpenDir:r,onOpenFile:u,onOpenSkill:n,onOpenBrand:o,onShare:d,onDelete:i,onDragStart:c,onContextMenu:p,onMove:h}=l,m=X(),{org:w}=de(),x=s.volume??"",y=tt(x,s.dirPath),C=Fe();let D;e[0]!==s.isHomeRoot||e[1]!==w?(D=v=>s.isHomeRoot&&He.has(v.toLowerCase())?`${we(w.slug)}/${v}`:void 0,e[0]=s.isHomeRoot,e[1]=w,e[2]=D):D=e[2];const N=D;let k;e[3]!==s.isHomeRoot||e[4]!==r?(k=s.isHomeRoot?t.jsx(gr,{onOpenDir:r}):null,e[3]=s.isHomeRoot,e[4]=r,e[5]=k):k=e[5];const P=k;if(y.isPending){let v;e[6]!==P||e[7]!==m?(v=P&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.folders")}),t.jsx(ee,{children:P})]}),e[6]=P,e[7]=m,e[8]=v):v=e[8];let E;e[9]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Te,{rows:2}),e[9]=E):E=e[9];let z;return e[10]!==v?(z=t.jsxs(t.Fragment,{children:[v,E]}),e[10]=v,e[11]=z):z=e[11],z}if(y.isError){let v;e[12]!==y.error||e[13]!==m?(v=y.error instanceof Error?y.error.message:m("library.libraryViews.failedToLoad"),e[12]=y.error,e[13]=m,e[14]=v):v=e[14];let E;return e[15]!==v?(E=t.jsx("p",{className:"text-sm text-destructive",children:v}),e[15]=v,e[16]=E):E=e[16],E}let g,$,S,j,O;if(e[17]!==N||e[18]!==C||e[19]!==y.data||e[20]!==s||e[21]!==p||e[22]!==i||e[23]!==c||e[24]!==h||e[25]!==o||e[26]!==r||e[27]!==u||e[28]!==n||e[29]!==d||e[30]!==P||e[31]!==m||e[32]!==x){O=Symbol.for("react.early_return_sentinel");e:{const v=y.data??[],E=v.filter(Cr),z=v.filter(Pr),G=v.filter(Nr),I=v.filter(Sr);if(v.length===0&&!s.isHomeRoot){let f;e[38]!==s.readOnly||e[39]!==m?(f=s.readOnly?m("library.libraryViews.emptyReadOnlySet"):m("library.libraryViews.emptyFolder"),e[38]=s.readOnly,e[39]=m,e[40]=f):f=e[40];let q;e[41]!==f?(q=t.jsx(qe,{children:f}),e[41]=f,e[42]=q):q=e[42],O=q;break e}let W;e[43]!==s.readOnly||e[44]!==i||e[45]!==x?(W=f=>s.readOnly?void 0:()=>i({volume:x,path:f.path,kind:f.kind}),e[43]=s.readOnly,e[44]=i,e[45]=x,e[46]=W):W=e[46];const U=W;let A;e[47]!==C||e[48]!==s.readOnly||e[49]!==d||e[50]!==x?(A=f=>s.readOnly?void 0:()=>d({volume:x,path:f.path,kind:f.kind,shareMode:f.shareMode??"private",effectivePublic:f.effectivePublic??!1,url:f.kind==="file"?Ke(C(x,f.path)):void 0}),e[47]=C,e[48]=s.readOnly,e[49]=d,e[50]=x,e[51]=A):A=e[51];const K=A;g=E.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.skills")}),t.jsx(ee,{children:E.map(f=>t.jsx(Vt,{dirName:M(f.path),updatedAt:f.updatedAt,skillMdUrl:C(x,`${f.path}/SKILL.md`),publicState:ve(f),onOpen:()=>n(oe(s,f.path)),onBrowse:()=>r(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p})},f.path))})]}),$=z.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.brands")}),t.jsx(ee,{children:z.map(f=>t.jsx(Ut,{dirName:M(f.path),updatedAt:f.updatedAt,tokensUrl:C(x,`${f.path}/tokens.css`),onOpen:()=>o(oe(s,f.path)),onBrowse:()=>r(oe(s,f.path)),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p})},f.path))})]}),S=(G.length>0||P)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.folders")}),t.jsxs(ee,{children:[P,G.map(f=>t.jsx(Se,{name:M(f.path),meta:st(f.updatedAt),subtitle:N(M(f.path)),readOnly:s.readOnly,publicState:ve(f),onOpen:()=>r(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p,onDrop:h})},f.path))]})]}),j=I.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.files")}),t.jsx(ee,{children:I.map(f=>t.jsx(at,{filename:M(f.path),updatedAt:f.updatedAt,downloadUrl:C(x,f.path),publicState:ve(f),onOpen:()=>u(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"file",{onDragStart:c,onContextMenu:p})},f.path))})]})}e[17]=N,e[18]=C,e[19]=y.data,e[20]=s,e[21]=p,e[22]=i,e[23]=c,e[24]=h,e[25]=o,e[26]=r,e[27]=u,e[28]=n,e[29]=d,e[30]=P,e[31]=m,e[32]=x,e[33]=g,e[34]=$,e[35]=S,e[36]=j,e[37]=O}else g=e[33],$=e[34],S=e[35],j=e[36],O=e[37];if(O!==Symbol.for("react.early_return_sentinel"))return O;let V;e[52]!==s.isHomeRoot||e[53]!==i||e[54]!==u||e[55]!==d?(V=s.isHomeRoot&&t.jsx(jr,{onOpenFile:u,onShare:d,onDelete:i}),e[52]=s.isHomeRoot,e[53]=i,e[54]=u,e[55]=d,e[56]=V):V=e[56];let Y;return e[57]!==g||e[58]!==$||e[59]!==S||e[60]!==j||e[61]!==V?(Y=t.jsxs(t.Fragment,{children:[g,$,S,j,V]}),e[57]=g,e[58]=$,e[59]=S,e[60]=j,e[61]=V,e[62]=Y):Y=e[62],Y}function Sr(l){return l.kind==="file"}function Nr(l){return l.kind==="dir"&&!l.hasSkill&&!l.hasBrand}function Pr(l){return l.kind==="dir"&&l.hasBrand&&!l.hasSkill}function Cr(l){return l.kind==="dir"&&l.hasSkill}function Or({onOpenFile:l,onOpenSkill:e,onOpenBrand:s}={}){const r=X(),{org:u}=de(),n=Xe(),o=dt(),d=yt(),i=ut({strict:!1}),c=i.path||je,p=Ze(c),h=Kt(),m=p.volume!==null&&h.has(p.volume)?{...p,readOnly:!0}:p,w=(a,b)=>o({to:".",search:R=>({...R,[a]:b||void 0})}),x=a=>w("path",a),y=(a,b)=>o({to:".",search:R=>({...R,preview:void 0,skill:void 0,brand:void 0,[a]:b})}),C=l??(a=>y("preview",a)),D=e??(a=>y("skill",a)),N=s??(a=>y("brand",a)),[k,P]=T.useState(""),g=Dt(k.trim(),300),$=!m.isHomeRoot&&m.volume!==null?{volume:m.volume,prefix:m.dirPath}:void 0,S=$?r("library.library.searchInPlaceholder",{folder:ce(m.segments.at(-1)??"")}):r("library.library.searchPlaceholder"),j=m.isHomeRoot?we(u.slug):ce(m.segments.at(-1)??""),[O,V]=T.useState(null),[Y,v]=T.useState(null),[E,z]=T.useState(!1),[G,I]=T.useState(""),[W,U]=T.useState(!1),[A,K]=T.useState(null),[f,q]=T.useState(""),se=T.useRef(null),[Q,ue]=T.useState(!1),B=T.useRef(0),Z=m.readOnly?null:m.volume,{upload:ae,mkdir:pe,move:me}=Ue(Z??je),{remove:Ee}=Ue(O?.volume??"uploads");async function Ne(a){if(!(!Z||!a||a.length===0))try{await ae.mutateAsync({dir:m.dirPath,files:[...a]}),L.success(a.length===1?r("library.library.uploadedSingle",{filename:a[0]?.name??""}):r("library.library.uploadedMultiple",{count:a.length}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.uploadFailed"))}finally{se.current&&(se.current.value="")}}const le=Z!==null;function Pe(a){return a.dataTransfer.types.includes("Files")}function J(a){!le||!Pe(a)||(a.preventDefault(),B.current+=1,ue(!0))}function ne(a){!le||!Pe(a)||a.preventDefault()}function fe(){le&&(B.current=Math.max(0,B.current-1),B.current===0&&ue(!1))}function he(a){le&&(a.preventDefault(),a.stopPropagation(),B.current=0,ue(!1),a.dataTransfer.files.length>0&&Ne(a.dataTransfer.files))}async function be(){const a=G.trim();if(!(!Z||!a)){if(m.isHomeRoot&&He.has(a.toLowerCase())){L.error(r("library.library.folderNameReserved",{name:a}));return}try{const b=m.dirPath;await pe.mutateAsync(b?`${b}/${a}`:a),L.success(r("library.library.folderCreated",{name:a})),z(!1),I("")}catch(b){L.error(b instanceof Error?b.message:r("library.library.folderCreateFailed"))}}}async function Ae(){if(!O)return;const a=O;try{await Ee.mutateAsync(a.path),L.success(r("library.library.deleted",{name:M(a.path)}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.deleteFailed"))}finally{V(null)}}async function Ce(){if(!A)return;const a=f.trim();if(!a||a.includes("/")||a.includes("..")||a===M(A.path)){U(!1),K(null),q("");return}if(A.kind==="dir"&&m.isHomeRoot&&He.has(a.toLowerCase())){L.error(r("library.library.folderNameReserved",{name:a}));return}try{const b=A.path.includes("/")?A.path.slice(0,A.path.lastIndexOf("/")):"",R=b?`${b}/${a}`:a;await me.mutateAsync({from:A.path,to:R});const ie=a.replace(/[<>]/g,"");L.success(r("library.library.renamed",{name:ie}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.renameFailed"))}finally{U(!1),K(null),q("")}}async function Re(a,b){try{const R=M(a),ie=b?`${b}/${R}`:R;await me.mutateAsync({from:a,to:ie}),L.success(r("library.library.moved",{name:R,destination:b||r("library.library.theLibrary")}))}catch(R){L.error(R instanceof Error?R.message:r("library.library.moveFailed"))}}function ze(){for(const a of fr)n.invalidateQueries({queryKey:_.orgFsVolume(u.id,a)});m.volume&&n.invalidateQueries({queryKey:_.orgFsVolume(u.id,m.volume)}),n.invalidateQueries({queryKey:_.orgFsRecent(u.id)}),n.invalidateQueries({queryKey:_.orgFsSearchRoot(u.id)}),n.invalidateQueries({queryKey:_.orgFsPublicSets(u.id)})}function Be(a){a.defaultPrevented||!Z||a.target.closest("input, textarea, button, a, [role='button']")||(a.preventDefault(),z(!0))}return t.jsxs("div",{className:"relative h-full",onDragEnter:J,onDragOver:ne,onDragLeave:fe,onDrop:he,onContextMenu:Be,children:[Q&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-background/80 p-6 backdrop-blur-sm",children:t.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-2xl border-2 border-dashed border-primary px-10 py-8 text-center",children:[t.jsx($e,{size:28,className:"text-primary"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:r("library.library.dropToUpload",{location:j})})]})}),t.jsx("div",{className:"h-full overflow-y-auto",children:t.jsxs("div",{className:"mx-auto flex w-full max-w-[900px] flex-col gap-10 px-6 py-10 lg:px-10",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("div",{className:"min-w-0 flex-1 basis-full sm:basis-auto",children:t.jsx(yr,{segments:m.segments,onNavigate:x})}),t.jsxs("div",{className:"relative w-full shrink-0 sm:w-56",children:[t.jsx(xt,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground"}),t.jsx(ye,{value:k,onChange:a=>P(a.target.value),onKeyDown:a=>{a.key==="Escape"&&P("")},placeholder:S,className:"h-9 rounded-xl pr-9 pl-9"}),k&&t.jsx(H,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-1.5 size-7 -translate-y-1/2",onClick:()=>P(""),"aria-label":r("library.library.clearSearch"),children:t.jsx(gt,{size:14})})]}),t.jsx(H,{variant:"ghost",size:"icon",onClick:ze,"aria-label":r("library.library.refresh"),children:t.jsx(pt,{size:14})}),Z&&t.jsxs(H,{variant:"outline",size:"sm",onClick:()=>z(!0),children:[t.jsx(bt,{size:14}),r("library.library.newFolder")]}),m.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(ht,{size:12}),r("library.library.readOnly")]}):t.jsxs(H,{size:"sm",disabled:ae.isPending,onClick:()=>se.current?.click(),children:[t.jsx($e,{size:14}),ae.isPending?r("library.library.uploading"):r("library.library.uploadFile")]}),t.jsx("input",{ref:se,type:"file",multiple:!0,className:"hidden",onChange:a=>{Ne(a.target.files)}})]}),g?t.jsx(vr,{query:g,scope:$,stale:k.trim()!==g,onOpenFile:C,onShare:v,onDelete:V}):m.volume===null?t.jsx(wr,{onOpenDir:x}):t.jsx(kr,{location:m,onOpenDir:x,onOpenFile:C,onOpenSkill:D,onOpenBrand:N,onShare:v,onDelete:V,onContextMenu:(a,b)=>{K({path:a,kind:b}),q(M(a)),U(!0)},onMove:Re},m.volume)]})}),d&&(i.preview?t.jsx(Jt,{previewPath:i.preview,onClose:()=>w("preview",null)}):i.skill?t.jsx(lt,{skillPath:i.skill,onClose:()=>w("skill",null)},i.skill):i.brand?t.jsx(it,{brandPath:i.brand,onClose:()=>w("brand",null)},i.brand):null),t.jsx(Me,{open:E,onOpenChange:z,children:t.jsxs(Le,{children:[t.jsxs(Qe,{children:[t.jsx(Ve,{children:r("library.library.newFolderTitle")}),t.jsx(Ye,{children:r("library.library.newFolderDescription",{path:j||r("library.library.theLibrary")})})]}),t.jsx(ye,{autoFocus:!0,placeholder:r("library.library.folderNamePlaceholder"),value:G,onChange:a=>I(a.target.value),onKeyDown:a=>{a.key==="Enter"&&be()}}),t.jsxs(Ge,{children:[t.jsx(H,{variant:"outline",onClick:()=>z(!1),children:r("library.library.cancel")}),t.jsx(H,{disabled:!G.trim()||pe.isPending,onClick:()=>{be()},children:r("library.library.create")})]})]})}),t.jsx(Me,{open:W,onOpenChange:a=>{U(a),a||(K(null),q(""))},children:t.jsxs(Le,{children:[t.jsxs(Qe,{children:[t.jsx(Ve,{children:A&&r("library.library.renameTitle",{name:M(A.path)})}),t.jsx(Ye,{children:r("library.library.renameDescription")})]}),t.jsx(ye,{autoFocus:!0,value:f,onChange:a=>q(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Ce()}}),t.jsxs(Ge,{children:[t.jsx(H,{variant:"outline",onClick:()=>U(!1),children:r("library.library.cancel")}),t.jsx(H,{disabled:!f.trim()||me.isPending,onClick:()=>{Ce()},children:r("library.library.rename")})]})]})}),t.jsx(Wt,{target:Y,onOpenChange:a=>{a||v(null)}}),t.jsx(vt,{open:O!==null,onOpenChange:a=>{a||V(null)},children:t.jsxs(jt,{children:[t.jsxs(wt,{children:[t.jsx(kt,{children:r("library.library.deleteTitle",{name:O?M(O.path):""})}),t.jsx(St,{children:O?.kind==="dir"?r("library.library.deleteDirectoryDescription"):r("library.library.deleteFileDescription")})]}),t.jsxs(Nt,{children:[t.jsx(Pt,{children:r("library.library.cancel")}),t.jsx(Ct,{onClick:()=>{Ae()},children:r("library.library.delete")})]})]})})]})}function Dr(){const l=F.c(10),{openPanel:e}=tr(),[s,r]=T.useState(null),[u,n]=T.useState(null);let o;l[0]!==e?(o=t.jsx(Or,{onOpenFile:p=>e(mt(p)),onOpenSkill:r,onOpenBrand:n}),l[0]=e,l[1]=o):o=l[1];let d;l[2]!==s?(d=s&&t.jsx(lt,{skillPath:s,onClose:()=>r(null)},s),l[2]=s,l[3]=d):d=l[3];let i;l[4]!==u?(i=u&&t.jsx(it,{brandPath:u,onClose:()=>n(null)},u),l[4]=u,l[5]=i):i=l[5];let c;return l[6]!==o||l[7]!==d||l[8]!==i?(c=t.jsxs("div",{className:"flex flex-col h-full min-h-0 overflow-hidden",children:[o,d,i]}),l[6]=o,l[7]=d,l[8]=i,l[9]=c):c=l[9],c}function Ks(){const l=F.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ft.Content,{children:t.jsx(Dr,{})}),l[0]=e):e=l[0],e}export{Ks as default};
161
+ `);function or(l,e){const s=e?`<style>${e}</style>`:"";return l.replaceAll("{{{slides}}}",ir).replaceAll("{{title}}",nr).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${s}</head>`)}function cr(l){const e=F.c(8),{readUrl:s,title:r,tokensUrl:u}=l,n=ke(s),o=ke(u??"");if(n.isPending||u&&o.isPending){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(te,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[0]=p):p=e[0],p}if(n.isError||!n.data){let p;return e[1]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This theme is no longer available."}),e[1]=p):p=e[1],p}const d=o.data??null;let i;e[2]!==d||e[3]!==n.data?(i=or(n.data,d),e[2]=d,e[3]=n.data,e[4]=i):i=e[4];let c;return e[5]!==i||e[6]!==r?(c=t.jsx("iframe",{title:r,srcDoc:i,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[5]=i,e[6]=r,e[7]=c):c=e[7],c}function ge(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-sm font-medium text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function dr(l){const e=F.c(16),{family:s,tokens:r,editing:u,valueOf:n,onEdit:o}=l;let d;e[0]!==s?(d=t.jsx("span",{className:"text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=d):d=e[1];let i;if(e[2]!==u||e[3]!==o||e[4]!==r||e[5]!==n){let h;e[7]!==u||e[8]!==o||e[9]!==n?(h=m=>{const w=n(m),x=`${m.name.replace(/^--brand-/,"")}: ${w}`;return u&&/^#/.test(w)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:Lt(w),onChange:y=>o(m.name,y.target.value),className:"size-7 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5"},m.name):t.jsx("span",{title:x,className:"size-7 rounded-md border border-border/60",style:{backgroundColor:w}},m.name)},e[7]=u,e[8]=o,e[9]=n,e[10]=h):h=e[10],i=r.map(h),e[2]=u,e[3]=o,e[4]=r,e[5]=n,e[6]=i}else i=e[6];let c;e[11]!==i?(c=t.jsx("div",{className:"flex flex-wrap gap-1",children:i}),e[11]=i,e[12]=c):c=e[12];let p;return e[13]!==d||e[14]!==c?(p=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15],p}function ur(l){const e=F.c(9),{token:s,value:r}=l;if(s.kind==="space"){let n;return e[0]!==r?(n=t.jsx("span",{className:"flex h-7 w-16 shrink-0 items-center",children:t.jsx("span",{className:"h-1.5 rounded-full bg-primary",style:{width:r,maxWidth:"100%"}})}),e[0]=r,e[1]=n):n=e[1],n}if(s.kind==="radius"){let n;return e[2]!==r?(n=t.jsx("span",{className:"size-7 shrink-0 border border-border bg-muted/50",style:{borderRadius:r}}),e[2]=r,e[3]=n):n=e[3],n}if(s.kind==="shadow"){let n;return e[4]!==r?(n=t.jsx("span",{className:"size-7 shrink-0 rounded-md bg-background",style:{boxShadow:r}}),e[4]=r,e[5]=n):n=e[5],n}if(s.kind==="type"&&/^--brand-text-/.test(s.name)){const n=`min(${r}, 22px)`;let o;return e[6]!==n?(o=t.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden leading-none text-foreground",style:{fontSize:n},children:"Ag"}),e[6]=n,e[7]=o):o=e[7],o}let u;return e[8]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=u):u=e[8],u}function nt(l){const e=F.c(17),{token:s,value:r,editing:u,onEdit:n}=l;let o;e[0]!==s||e[1]!==r?(o=t.jsx(ur,{token:s,value:r}),e[0]=s,e[1]=r,e[2]=o):o=e[2];let d;if(e[3]!==s.name){let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=/^--brand-/,e[5]=h):h=e[5],d=s.name.replace(h,""),e[3]=s.name,e[4]=d}else d=e[4];let i;e[6]!==d?(i=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:d}),e[6]=d,e[7]=i):i=e[7];let c;e[8]!==u||e[9]!==n||e[10]!==s.name||e[11]!==r?(c=u?t.jsx(ye,{value:r,onChange:h=>n(s.name,h.target.value),className:"h-8 w-40 font-mono text-xs"}):t.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:r}),e[8]=u,e[9]=n,e[10]=s.name,e[11]=r,e[12]=c):c=e[12];let p;return e[13]!==o||e[14]!==i||e[15]!==c?(p=t.jsxs("div",{className:"flex items-center gap-3",children:[o,i,c]}),e[13]=o,e[14]=i,e[15]=c,e[16]=p):p=e[16],p}function xe(l){const e=F.c(16),{label:s,tokens:r,editing:u,valueOf:n,onEdit:o}=l;if(r.length===0)return null;let d;e[0]!==s?(d=t.jsx(ge,{children:s}),e[0]=s,e[1]=d):d=e[1];let i;if(e[2]!==u||e[3]!==o||e[4]!==r||e[5]!==n){let h;e[7]!==u||e[8]!==o||e[9]!==n?(h=m=>t.jsx(nt,{token:m,value:n(m),editing:u,onEdit:o},m.name),e[7]=u,e[8]=o,e[9]=n,e[10]=h):h=e[10],i=r.map(h),e[2]=u,e[3]=o,e[4]=r,e[5]=n,e[6]=i}else i=e[6];let c;e[11]!==i?(c=t.jsx("div",{className:"flex flex-col gap-2.5",children:i}),e[11]=i,e[12]=c):c=e[12];let p;return e[13]!==d||e[14]!==c?(p=t.jsxs("div",{className:"flex flex-col gap-3",children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15],p}function pr({brandPath:l,onClose:e,variant:s}){const r=X(),{org:u}=de(),n=Ze(l),o=n.volume??"",d=n.dirPath,i=M(d),c=n.readOnly,p=Xe(),h=Fe(),m=$t(o),{upload:w,remove:x}=Ue(o),y=T.useRef(null),C=tt(o,d),D=C.data??[],N=a=>D.some(b=>b.kind==="file"&&M(b.path)===a),k=N("tokens.css"),P=N("brand.md"),g=N("slides-theme.html"),$=At(D),S=h(o,`${d}/tokens.css`),j=h(o,`${d}/brand.md`),O=h(o,`${d}/slides-theme.html`),V=ke(S,{enabled:k}),Y=ke(j,{enabled:P}),[v,E]=T.useState(!1),[z,G]=T.useState({}),[I,W]=T.useState(null),[U,A]=T.useState(!1),[K,f]=T.useState(!1),[q,se]=T.useState("deck"),Q=V.data?Rt(V.data):[],ue=a=>Q.find(b=>b.name===a)?.value,B=a=>z[a.name]??a.value,Z=zt(Q),ae=Q.filter(a=>a.kind==="font"),pe=Q.filter(a=>a.kind==="type"),me=Q.filter(a=>a.kind==="space"),Ee=Q.filter(a=>a.kind==="radius"),Ne=Q.filter(a=>a.kind==="shadow"),le=Q.filter(a=>a.kind==="motion"),Pe=Q.filter(a=>a.kind==="other"),J=(a,b)=>G(R=>({...R,[a]:b})),ne=g&&q==="deck",fe=I??Y.data??"",he=Object.entries(z).filter(([a,b])=>ue(a)!==b),be=I!==null&&I!==(Y.data??""),Ae=he.length>0||be;function Ce(){G({}),W(null),E(!1)}async function Re(){A(!0);try{if(he.length>0){let a=V.data??"";for(const[b,R]of he)a=Bt(a,b,R);await m.mutateAsync({path:`${d}/tokens.css`,body:a,contentType:"text/css; charset=utf-8"}),p.invalidateQueries({queryKey:_.fileText(S)})}be&&I!==null&&(await m.mutateAsync({path:`${d}/brand.md`,body:I,contentType:"text/markdown; charset=utf-8"}),p.invalidateQueries({queryKey:_.fileText(j)})),p.invalidateQueries({queryKey:_.orgFsVolume(u.id,o)}),p.invalidateQueries({queryKey:_.orgFsRecent(u.id)}),G({}),W(null),E(!1),L.success(r("library.brandPreview.brandSaved"))}catch(a){L.error(a instanceof Error?a.message:r("library.brandPreview.failedSaveBrand"))}finally{A(!1)}}async function ze(a){const b=a?.[0];if(!b)return;const ie=`logo.${(b.name.split(".").pop()??"png").toLowerCase()}`;try{await w.mutateAsync({dir:d,files:[new File([b],ie,{type:b.type})]}),$&&M($)!==ie&&await x.mutateAsync($),L.success(r("library.brandPreview.logoUpdated"))}catch(Ie){L.error(Ie instanceof Error?Ie.message:r("library.brandPreview.logoUploadFailed"))}finally{y.current&&(y.current.value="")}}const Be=!C.isPending&&!k&&!P&&!$;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(We,{size:18})}),s==="dialog"?t.jsx(Ve,{className:"flex-1 truncate text-base font-medium text-foreground",children:i}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:i}),!c&&(v?t.jsxs(t.Fragment,{children:[t.jsx(H,{variant:"ghost",size:"sm",onClick:Ce,disabled:U,children:r("library.brandPreview.cancel")}),t.jsx(H,{size:"sm",disabled:!Ae||U,onClick:()=>{Re()},children:r(U?"library.brandPreview.saving":"library.brandPreview.save")})]}):t.jsxs(H,{variant:"outline",size:"sm",onClick:()=>E(!0),children:[t.jsx(Yt,{size:14}),r("library.brandPreview.edit")]})),s==="dialog"?t.jsx(Ot,{asChild:!0,children:t.jsx(H,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(Je,{size:16})})}):t.jsx(H,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(Je,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:C.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(te,{className:"h-40 w-full rounded-xl"}),t.jsx(te,{className:"h-4 w-1/3"}),t.jsx(te,{className:"h-4 w-2/3"})]}):Be?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:r("library.brandPreview.brandNotAvailable")}):t.jsxs(t.Fragment,{children:[(g||k)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":r(K?"library.brandPreview.showPreview":"library.brandPreview.hidePreview"),onClick:()=>f(a=>!a),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),f(b=>!b))},className:"flex cursor-pointer items-center justify-between gap-2 px-4 py-2.5 hover:bg-muted/40",children:[t.jsxs("div",{className:"flex gap-0.5 rounded-lg bg-muted p-0.5 text-xs font-medium",onClick:a=>a.stopPropagation(),children:[g&&t.jsx("button",{type:"button",onClick:()=>{se("deck"),f(!1)},className:De("rounded-md px-2.5 py-1",ne?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r("library.brandPreview.deck")}),t.jsx("button",{type:"button",onClick:()=>{se("components"),f(!1)},className:De("rounded-md px-2.5 py-1",ne?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:r("library.brandPreview.components")})]}),K?t.jsx(It,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(Qt,{size:16,className:"shrink-0 text-muted-foreground"})]}),!K&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:De("w-full overflow-hidden rounded-xl border border-border bg-muted/30",ne?"aspect-[16/9]":"h-96"),children:ne?t.jsx(cr,{readUrl:O,title:`${i} deck theme`,tokensUrl:S}):t.jsx(lr,{tokensUrl:S})})})]}),t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto p-6",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.logo")}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:"flex size-24 items-center justify-center overflow-hidden rounded-xl border border-border bg-muted/30",children:$?t.jsx("img",{src:h(o,$),alt:`${i} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(We,{size:28,className:"text-muted-foreground/50"})}),v&&t.jsxs("div",{children:[t.jsxs(H,{variant:"outline",size:"sm",disabled:w.isPending,onClick:()=>y.current?.click(),children:[t.jsx($e,{size:14}),r($?"library.brandPreview.replaceLogo":"library.brandPreview.addLogo")]}),t.jsx("input",{ref:y,type:"file",accept:"image/*",className:"hidden",onChange:a=>{ze(a.target.files)}})]})]})]}),Z.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.colors")}),Z.map(a=>t.jsx(dr,{family:a.family,tokens:a.tokens,editing:v,valueOf:B,onEdit:J},a.family))]}),(ae.length>0||pe.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.typography")}),ae.map(a=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:a.name.replace(/^--brand-font-?/,"")||r("library.brandPreview.defaultFont")}),v?t.jsx(ye,{value:B(a),onChange:b=>J(a.name,b.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:B(a)},children:B(a)})]},a.name)),pe.map(a=>t.jsx(nt,{token:a,value:B(a),editing:v,onEdit:J},a.name))]}),t.jsx(xe,{label:r("library.brandPreview.spacing"),tokens:me,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.radius"),tokens:Ee,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.shadows"),tokens:Ne,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.motion"),tokens:le,editing:v,valueOf:B,onEdit:J}),t.jsx(xe,{label:r("library.brandPreview.tokens"),tokens:Pe,editing:v,valueOf:B,onEdit:J}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ge,{children:r("library.brandPreview.voiceGuidelines")}),v?t.jsx(qt,{value:fe,onChange:a=>W(a.target.value),placeholder:r("library.brandPreview.voicePlaceholder"),className:"min-h-48 font-mono text-sm"}):Y.isPending&&P?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(te,{className:"h-3 w-full"}),t.jsx(te,{className:"h-3 w-5/6"})]}):fe.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(Gt,{id:`brand-preview-${l}`,text:fe})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:r("library.brandPreview.noVoiceYet")})]})]})]})})]})}function it(l){const e=F.c(8),{brandPath:s,onClose:r}=l;let u;e[0]!==r?(u=d=>{d||r()},e[0]=r,e[1]=u):u=e[1];let n;e[2]!==s||e[3]!==r?(n=t.jsx(Le,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl!",closeButtonClassName:"hidden",children:t.jsx(pr,{brandPath:s,onClose:r,variant:"dialog"})}),e[2]=s,e[3]=r,e[4]=n):n=e[4];let o;return e[5]!==u||e[6]!==n?(o=t.jsx(Me,{open:!0,onOpenChange:u,children:n}),e[5]=u,e[6]=n,e[7]=o):o=e[7],o}function mr(l){const e=F.c(11),{onOpenDir:s}=l,r=X(),u=Mt();let n;e[0]!==u.data?(n=u.data??[],e[0]=u.data,e[1]=n):n=e[1];let o;if(e[2]!==s||e[3]!==r||e[4]!==n){let i;e[6]!==s||e[7]!==r?(i=c=>t.jsx(Se,{name:c.volume,glyph:er,tone:"system",readOnly:!0,meta:`${c.repoOwner}/${c.repoName}`,subtitle:c.lastSyncError?r("library.syncedRepos.syncFailed"):c.lastSyncedAt?r("library.syncedRepos.syncedAgo",{ago:st(c.lastSyncedAt)}):r("library.syncedRepos.waitingFirstSync"),onOpen:()=>s(c.volume)},c.id),e[6]=s,e[7]=r,e[8]=i):i=e[8],o=n.map(i),e[2]=s,e[3]=r,e[4]=n,e[5]=o}else o=e[5];let d;return e[9]!==o?(d=t.jsx(t.Fragment,{children:o}),e[9]=o,e[10]=d):d=e[10],d}function Ke(l){return`${window.location.origin}${l}`}function ve(l){if(l.shareMode==="password")return"password";if(l.shareMode==="public"||l.readPublic)return"public";if(l.effectivePublic)return"inherited"}const fr=[je,"uploads","outputs"],ot=[{volume:"uploads",descriptionKey:"library.libraryViews.volumeUploadsDescription",glyph:$e},{volume:"outputs",descriptionKey:"library.libraryViews.volumeOutputsDescription",glyph:Zt}],He=new Set([...ot.map(l=>l.volume),ce("public")]),hr=6;function ct(l,e,s){const r=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",u=_e(l),n=u?`public/${u}`:l==="home"?we(s):l;return r?`${n}/${r}`:n}function Oe(l,e,s){return{onDragStart:r=>{s.onDragStart?.(l),r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("application/x-studio-library-path",l)},onContextMenu:r=>{r.preventDefault(),s.onContextMenu?.(l,e)},onDrop:s.onDrop?r=>{r.preventDefault();const u=r.dataTransfer.getData("application/x-studio-library-path");u&&u!==l&&!l.startsWith(u+"/")&&s.onDrop(u,l)}:void 0}}function re(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-[13px] text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ee(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("div",{className:"@container",children:t.jsx("div",{className:"grid grid-cols-1 gap-3 @[440px]:grid-cols-2 @[660px]:grid-cols-3",children:s})}),e[0]=s,e[1]=r):r=e[1],r}function Te(l){const e=F.c(2),{rows:s}=l,r=s===void 0?1:s;let u;return e[0]!==r?(u=t.jsx(ee,{children:Array.from({length:r*3},br)}),e[0]=r,e[1]=u):u=e[1],u}function br(l,e){return t.jsx(te,{className:"h-16 rounded-2xl"},e)}function qe(l){const e=F.c(2),{children:s}=l;let r;return e[0]!==s?(r=t.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function xr(l){const e=F.c(12),{volume:s,descriptionKey:r,glyph:u,onOpen:n}=l,o=X(),d=Et(s);let i;e[0]!==o||e[1]!==d.data?(i=d.data?o("library.libraryViews.filesCount",{count:d.data.files}):void 0,e[0]=o,e[1]=d.data,e[2]=i):i=e[2];let c;e[3]!==r||e[4]!==o?(c=o(r),e[3]=r,e[4]=o,e[5]=c):c=e[5];let p;return e[6]!==u||e[7]!==n||e[8]!==i||e[9]!==c||e[10]!==s?(p=t.jsx(Se,{name:s,meta:i,subtitle:c,glyph:u,tone:"system",onOpen:n}),e[6]=u,e[7]=n,e[8]=i,e[9]=c,e[10]=s,e[11]=p):p=e[11],p}function gr(l){const e=F.c(12),{onOpenDir:s}=l,r=X(),n=rt().data?.length??0;let o;e[0]!==s?(o=ot.map(p=>t.jsx(xr,{volume:p.volume,descriptionKey:p.descriptionKey,glyph:p.glyph,onOpen:()=>s(p.volume)},p.volume)),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==s||e[3]!==n||e[4]!==r?(d=n>0&&t.jsx(Se,{name:ce("public"),meta:r("library.libraryViews.skillSetsCount",{count:n}),subtitle:r("library.libraryViews.curatedSkillSetsReadOnly"),glyph:_t,tone:"system",readOnly:!0,onOpen:()=>s("public")}),e[2]=s,e[3]=n,e[4]=r,e[5]=d):d=e[5];let i;e[6]!==s?(i=t.jsx(mr,{onOpenDir:s}),e[6]=s,e[7]=i):i=e[7];let c;return e[8]!==o||e[9]!==d||e[10]!==i?(c=t.jsxs(t.Fragment,{children:[o,d,i]}),e[8]=o,e[9]=d,e[10]=i,e[11]=c):c=e[11],c}function yr(l){const e=F.c(19),{segments:s,onNavigate:r}=l,{org:u}=de();let n;e[0]!==s?(n=s[0]===je?s.slice(1):s,e[0]=s,e[1]=n):n=e[1];const o=n,d=s.length-o.length,i=o.length===0;let c;e[2]!==i||e[3]!==r||e[4]!==u.slug?(c=i?t.jsx("span",{className:"truncate font-medium text-foreground",children:we(u.slug)}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>r(je),children:we(u.slug)}),e[2]=i,e[3]=r,e[4]=u.slug,e[5]=c):c=e[5];let p;if(e[6]!==d||e[7]!==r||e[8]!==o||e[9]!==s){let m;e[11]!==d||e[12]!==r||e[13]!==o.length||e[14]!==s?(m=(w,x)=>{const y=s.slice(0,d+x+1).join("/"),C=x===o.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Xt,{size:12,className:"shrink-0 text-muted-foreground"}),C?t.jsx("span",{className:"truncate font-medium text-foreground",children:ce(w)}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>r(y),children:ce(w)})]},y)},e[11]=d,e[12]=r,e[13]=o.length,e[14]=s,e[15]=m):m=e[15],p=o.map(m),e[6]=d,e[7]=r,e[8]=o,e[9]=s,e[10]=p}else p=e[10];let h;return e[16]!==c||e[17]!==p?(h=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[c,p]}),e[16]=c,e[17]=p,e[18]=h):h=e[18],h}function vr(l){const e=F.c(43),{query:s,scope:r,stale:u,onOpenFile:n,onShare:o,onDelete:d}=l,i=X(),{org:c}=de(),p=Fe(),h=Ft(s,r);let m;e[0]!==p||e[1]!==o?(m=S=>o({volume:S.volume,path:S.path,kind:"file",shareMode:S.shareMode??"private",effectivePublic:S.effectivePublic??!1,url:Ke(p(S.volume,S.path))}),e[0]=p,e[1]=o,e[2]=m):m=e[2];const w=m;if(h.isPending){let S;return e[3]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Te,{rows:2}),e[3]=S):S=e[3],S}let x,y,C,D,N;if(e[4]!==s||e[5]!==h.data||e[6]!==h.isPlaceholderData||e[7]!==u||e[8]!==i){N=Symbol.for("react.early_return_sentinel");e:{if(y=h.data??[],y.length===0){let j;e[14]!==s||e[15]!==i?(j=i("library.libraryViews.noFilesMatch",{query:s}),e[14]=s,e[15]=i,e[16]=j):j=e[16];let O;e[17]!==j?(O=t.jsx(qe,{children:j}),e[17]=j,e[18]=O):O=e[18],N=O;break e}const S=(u||h.isPlaceholderData)&&"opacity-50";e[19]!==S?(D=De("flex flex-col gap-3",S),e[19]=S,e[20]=D):D=e[20],x=re,C=i("library.libraryViews.searchResults",{count:y.length})}e[4]=s,e[5]=h.data,e[6]=h.isPlaceholderData,e[7]=u,e[8]=i,e[9]=x,e[10]=y,e[11]=C,e[12]=D,e[13]=N}else x=e[9],y=e[10],C=e[11],D=e[12],N=e[13];if(N!==Symbol.for("react.early_return_sentinel"))return N;let k;e[21]!==x||e[22]!==C?(k=t.jsx(x,{children:C}),e[21]=x,e[22]=C,e[23]=k):k=e[23];let P;if(e[24]!==p||e[25]!==d||e[26]!==n||e[27]!==c||e[28]!==y||e[29]!==w){let S;e[31]!==p||e[32]!==d||e[33]!==n||e[34]!==c||e[35]!==w?(S=j=>{const O=_e(j.volume)!==null;return t.jsx(at,{filename:M(j.path),updatedAt:j.updatedAt,downloadUrl:p(j.volume,j.path),subtitle:ct(j.volume,j.path,c.slug),publicState:ve(j),onOpen:()=>n(et(j.volume,j.path)),onShare:O?void 0:()=>w(j),onDelete:O?void 0:()=>d({volume:j.volume,path:j.path,kind:"file"})},`${j.volume}/${j.path}`)},e[31]=p,e[32]=d,e[33]=n,e[34]=c,e[35]=w,e[36]=S):S=e[36],P=y.map(S),e[24]=p,e[25]=d,e[26]=n,e[27]=c,e[28]=y,e[29]=w,e[30]=P}else P=e[30];let g;e[37]!==P?(g=t.jsx(ee,{children:P}),e[37]=P,e[38]=g):g=e[38];let $;return e[39]!==D||e[40]!==k||e[41]!==g?($=t.jsxs("div",{className:D,children:[k,g]}),e[39]=D,e[40]=k,e[41]=g,e[42]=$):$=e[42],$}function jr(l){const e=F.c(39),{onOpenFile:s,onShare:r,onDelete:u}=l,n=X(),{org:o}=de(),d=Tt(),i=Fe();let c;e[0]!==i||e[1]!==r?(c=N=>r({volume:N.volume,path:N.path,kind:"file",shareMode:N.shareMode??"private",effectivePublic:N.effectivePublic??!1,url:Ke(i(N.volume,N.path))}),e[0]=i,e[1]=r,e[2]=c):c=e[2];const p=c;if(d.isPending){let N;e[3]!==n?(N=n("library.libraryViews.recentlyAdded"),e[3]=n,e[4]=N):N=e[4];let k;e[5]!==N?(k=t.jsx(re,{children:N}),e[5]=N,e[6]=k):k=e[6];let P;e[7]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Te,{}),e[7]=P):P=e[7];let g;return e[8]!==k?(g=t.jsxs("div",{className:"flex flex-col gap-3",children:[k,P]}),e[8]=k,e[9]=g):g=e[9],g}let h,m,w,x,y;if(e[10]!==i||e[11]!==u||e[12]!==s||e[13]!==o||e[14]!==d.data||e[15]!==p||e[16]!==n){y=Symbol.for("react.early_return_sentinel");e:{const N=(d.data??[]).slice(0,hr);if(N.length===0){y=null;break e}w="flex flex-col gap-3";let k;e[22]!==n?(k=n("library.libraryViews.recentlyAdded"),e[22]=n,e[23]=k):k=e[23],e[24]!==k?(x=t.jsx(re,{children:k}),e[24]=k,e[25]=x):x=e[25],h=ee;let P;e[26]!==i||e[27]!==u||e[28]!==s||e[29]!==o||e[30]!==p?(P=g=>t.jsx(Ht,{filename:M(g.path),updatedAt:g.updatedAt,size:g.size,downloadUrl:i(g.volume,g.path),subtitle:ct(g.volume,g.path,o.slug),publicState:ve(g),onOpen:()=>s(et(g.volume,g.path)),onShare:()=>p(g),onDelete:()=>u({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`),e[26]=i,e[27]=u,e[28]=s,e[29]=o,e[30]=p,e[31]=P):P=e[31],m=N.map(P)}e[10]=i,e[11]=u,e[12]=s,e[13]=o,e[14]=d.data,e[15]=p,e[16]=n,e[17]=h,e[18]=m,e[19]=w,e[20]=x,e[21]=y}else h=e[17],m=e[18],w=e[19],x=e[20],y=e[21];if(y!==Symbol.for("react.early_return_sentinel"))return y;let C;e[32]!==h||e[33]!==m?(C=t.jsx(h,{children:m}),e[32]=h,e[33]=m,e[34]=C):C=e[34];let D;return e[35]!==w||e[36]!==x||e[37]!==C?(D=t.jsxs("div",{className:w,children:[x,C]}),e[35]=w,e[36]=x,e[37]=C,e[38]=D):D=e[38],D}function wr(l){const e=F.c(16),{onOpenDir:s}=l,r=X(),u=rt();if(u.isPending){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Te,{}),e[0]=c):c=e[0],c}let n;e[1]!==u.data?(n=u.data??[],e[1]=u.data,e[2]=n):n=e[2];const o=n;if(o.length===0){let c;e[3]!==r?(c=r("library.libraryViews.noPublicSkillSetsConfigured"),e[3]=r,e[4]=c):c=e[4];let p;return e[5]!==c?(p=t.jsx(qe,{children:c}),e[5]=c,e[6]=p):p=e[6],p}let d;if(e[7]!==s||e[8]!==o||e[9]!==r){let c;e[11]!==s||e[12]!==r?(c=p=>t.jsx(Se,{name:p,subtitle:r("library.libraryViews.readOnly"),readOnly:!0,onOpen:()=>s(`public/${p}`)},p),e[11]=s,e[12]=r,e[13]=c):c=e[13],d=o.map(c),e[7]=s,e[8]=o,e[9]=r,e[10]=d}else d=e[10];let i;return e[14]!==d?(i=t.jsx(ee,{children:d}),e[14]=d,e[15]=i):i=e[15],i}function kr(l){const e=F.c(63),{location:s,onOpenDir:r,onOpenFile:u,onOpenSkill:n,onOpenBrand:o,onShare:d,onDelete:i,onDragStart:c,onContextMenu:p,onMove:h}=l,m=X(),{org:w}=de(),x=s.volume??"",y=tt(x,s.dirPath),C=Fe();let D;e[0]!==s.isHomeRoot||e[1]!==w?(D=v=>s.isHomeRoot&&He.has(v.toLowerCase())?`${we(w.slug)}/${v}`:void 0,e[0]=s.isHomeRoot,e[1]=w,e[2]=D):D=e[2];const N=D;let k;e[3]!==s.isHomeRoot||e[4]!==r?(k=s.isHomeRoot?t.jsx(gr,{onOpenDir:r}):null,e[3]=s.isHomeRoot,e[4]=r,e[5]=k):k=e[5];const P=k;if(y.isPending){let v;e[6]!==P||e[7]!==m?(v=P&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.folders")}),t.jsx(ee,{children:P})]}),e[6]=P,e[7]=m,e[8]=v):v=e[8];let E;e[9]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Te,{rows:2}),e[9]=E):E=e[9];let z;return e[10]!==v?(z=t.jsxs(t.Fragment,{children:[v,E]}),e[10]=v,e[11]=z):z=e[11],z}if(y.isError){let v;e[12]!==y.error||e[13]!==m?(v=y.error instanceof Error?y.error.message:m("library.libraryViews.failedToLoad"),e[12]=y.error,e[13]=m,e[14]=v):v=e[14];let E;return e[15]!==v?(E=t.jsx("p",{className:"text-sm text-destructive",children:v}),e[15]=v,e[16]=E):E=e[16],E}let g,$,S,j,O;if(e[17]!==N||e[18]!==C||e[19]!==y.data||e[20]!==s||e[21]!==p||e[22]!==i||e[23]!==c||e[24]!==h||e[25]!==o||e[26]!==r||e[27]!==u||e[28]!==n||e[29]!==d||e[30]!==P||e[31]!==m||e[32]!==x){O=Symbol.for("react.early_return_sentinel");e:{const v=y.data??[],E=v.filter(Cr),z=v.filter(Pr),G=v.filter(Nr),I=v.filter(Sr);if(v.length===0&&!s.isHomeRoot){let f;e[38]!==s.readOnly||e[39]!==m?(f=s.readOnly?m("library.libraryViews.emptyReadOnlySet"):m("library.libraryViews.emptyFolder"),e[38]=s.readOnly,e[39]=m,e[40]=f):f=e[40];let q;e[41]!==f?(q=t.jsx(qe,{children:f}),e[41]=f,e[42]=q):q=e[42],O=q;break e}let W;e[43]!==s.readOnly||e[44]!==i||e[45]!==x?(W=f=>s.readOnly?void 0:()=>i({volume:x,path:f.path,kind:f.kind}),e[43]=s.readOnly,e[44]=i,e[45]=x,e[46]=W):W=e[46];const U=W;let A;e[47]!==C||e[48]!==s.readOnly||e[49]!==d||e[50]!==x?(A=f=>s.readOnly?void 0:()=>d({volume:x,path:f.path,kind:f.kind,shareMode:f.shareMode??"private",effectivePublic:f.effectivePublic??!1,url:f.kind==="file"?Ke(C(x,f.path)):void 0}),e[47]=C,e[48]=s.readOnly,e[49]=d,e[50]=x,e[51]=A):A=e[51];const K=A;g=E.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.skills")}),t.jsx(ee,{children:E.map(f=>t.jsx(Vt,{dirName:M(f.path),updatedAt:f.updatedAt,skillMdUrl:C(x,`${f.path}/SKILL.md`),publicState:ve(f),onOpen:()=>n(oe(s,f.path)),onBrowse:()=>r(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p})},f.path))})]}),$=z.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.brands")}),t.jsx(ee,{children:z.map(f=>t.jsx(Ut,{dirName:M(f.path),updatedAt:f.updatedAt,tokensUrl:C(x,`${f.path}/tokens.css`),onOpen:()=>o(oe(s,f.path)),onBrowse:()=>r(oe(s,f.path)),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p})},f.path))})]}),S=(G.length>0||P)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.folders")}),t.jsxs(ee,{children:[P,G.map(f=>t.jsx(Se,{name:M(f.path),meta:st(f.updatedAt),subtitle:N(M(f.path)),readOnly:s.readOnly,publicState:ve(f),onOpen:()=>r(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"dir",{onDragStart:c,onContextMenu:p,onDrop:h})},f.path))]})]}),j=I.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(re,{children:m("library.libraryViews.files")}),t.jsx(ee,{children:I.map(f=>t.jsx(at,{filename:M(f.path),updatedAt:f.updatedAt,downloadUrl:C(x,f.path),publicState:ve(f),onOpen:()=>u(oe(s,f.path)),onShare:K(f),onDelete:U(f),draggable:!s.readOnly,...Oe(f.path,"file",{onDragStart:c,onContextMenu:p})},f.path))})]})}e[17]=N,e[18]=C,e[19]=y.data,e[20]=s,e[21]=p,e[22]=i,e[23]=c,e[24]=h,e[25]=o,e[26]=r,e[27]=u,e[28]=n,e[29]=d,e[30]=P,e[31]=m,e[32]=x,e[33]=g,e[34]=$,e[35]=S,e[36]=j,e[37]=O}else g=e[33],$=e[34],S=e[35],j=e[36],O=e[37];if(O!==Symbol.for("react.early_return_sentinel"))return O;let V;e[52]!==s.isHomeRoot||e[53]!==i||e[54]!==u||e[55]!==d?(V=s.isHomeRoot&&t.jsx(jr,{onOpenFile:u,onShare:d,onDelete:i}),e[52]=s.isHomeRoot,e[53]=i,e[54]=u,e[55]=d,e[56]=V):V=e[56];let Y;return e[57]!==g||e[58]!==$||e[59]!==S||e[60]!==j||e[61]!==V?(Y=t.jsxs(t.Fragment,{children:[g,$,S,j,V]}),e[57]=g,e[58]=$,e[59]=S,e[60]=j,e[61]=V,e[62]=Y):Y=e[62],Y}function Sr(l){return l.kind==="file"}function Nr(l){return l.kind==="dir"&&!l.hasSkill&&!l.hasBrand}function Pr(l){return l.kind==="dir"&&l.hasBrand&&!l.hasSkill}function Cr(l){return l.kind==="dir"&&l.hasSkill}function Or({onOpenFile:l,onOpenSkill:e,onOpenBrand:s}={}){const r=X(),{org:u}=de(),n=Xe(),o=dt(),d=yt(),i=ut({strict:!1}),c=i.path||je,p=Ze(c),h=Kt(),m=p.volume!==null&&h.has(p.volume)?{...p,readOnly:!0}:p,w=(a,b)=>o({to:".",search:R=>({...R,[a]:b||void 0})}),x=a=>w("path",a),y=(a,b)=>o({to:".",search:R=>({...R,preview:void 0,skill:void 0,brand:void 0,[a]:b})}),C=l??(a=>y("preview",a)),D=e??(a=>y("skill",a)),N=s??(a=>y("brand",a)),[k,P]=T.useState(""),g=Dt(k.trim(),300),$=!m.isHomeRoot&&m.volume!==null?{volume:m.volume,prefix:m.dirPath}:void 0,S=$?r("library.library.searchInPlaceholder",{folder:ce(m.segments.at(-1)??"")}):r("library.library.searchPlaceholder"),j=m.isHomeRoot?we(u.slug):ce(m.segments.at(-1)??""),[O,V]=T.useState(null),[Y,v]=T.useState(null),[E,z]=T.useState(!1),[G,I]=T.useState(""),[W,U]=T.useState(!1),[A,K]=T.useState(null),[f,q]=T.useState(""),se=T.useRef(null),[Q,ue]=T.useState(!1),B=T.useRef(0),Z=m.readOnly?null:m.volume,{upload:ae,mkdir:pe,move:me}=Ue(Z??je),{remove:Ee}=Ue(O?.volume??"uploads");async function Ne(a){if(!(!Z||!a||a.length===0))try{await ae.mutateAsync({dir:m.dirPath,files:[...a]}),L.success(a.length===1?r("library.library.uploadedSingle",{filename:a[0]?.name??""}):r("library.library.uploadedMultiple",{count:a.length}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.uploadFailed"))}finally{se.current&&(se.current.value="")}}const le=Z!==null;function Pe(a){return a.dataTransfer.types.includes("Files")}function J(a){!le||!Pe(a)||(a.preventDefault(),B.current+=1,ue(!0))}function ne(a){!le||!Pe(a)||a.preventDefault()}function fe(){le&&(B.current=Math.max(0,B.current-1),B.current===0&&ue(!1))}function he(a){le&&(a.preventDefault(),a.stopPropagation(),B.current=0,ue(!1),a.dataTransfer.files.length>0&&Ne(a.dataTransfer.files))}async function be(){const a=G.trim();if(!(!Z||!a)){if(m.isHomeRoot&&He.has(a.toLowerCase())){L.error(r("library.library.folderNameReserved",{name:a}));return}try{const b=m.dirPath;await pe.mutateAsync(b?`${b}/${a}`:a),L.success(r("library.library.folderCreated",{name:a})),z(!1),I("")}catch(b){L.error(b instanceof Error?b.message:r("library.library.folderCreateFailed"))}}}async function Ae(){if(!O)return;const a=O;try{await Ee.mutateAsync(a.path),L.success(r("library.library.deleted",{name:M(a.path)}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.deleteFailed"))}finally{V(null)}}async function Ce(){if(!A)return;const a=f.trim();if(!a||a.includes("/")||a.includes("..")||a===M(A.path)){U(!1),K(null),q("");return}if(A.kind==="dir"&&m.isHomeRoot&&He.has(a.toLowerCase())){L.error(r("library.library.folderNameReserved",{name:a}));return}try{const b=A.path.includes("/")?A.path.slice(0,A.path.lastIndexOf("/")):"",R=b?`${b}/${a}`:a;await me.mutateAsync({from:A.path,to:R});const ie=a.replace(/[<>]/g,"");L.success(r("library.library.renamed",{name:ie}))}catch(b){L.error(b instanceof Error?b.message:r("library.library.renameFailed"))}finally{U(!1),K(null),q("")}}async function Re(a,b){try{const R=M(a),ie=b?`${b}/${R}`:R;await me.mutateAsync({from:a,to:ie}),L.success(r("library.library.moved",{name:R,destination:b||r("library.library.theLibrary")}))}catch(R){L.error(R instanceof Error?R.message:r("library.library.moveFailed"))}}function ze(){for(const a of fr)n.invalidateQueries({queryKey:_.orgFsVolume(u.id,a)});m.volume&&n.invalidateQueries({queryKey:_.orgFsVolume(u.id,m.volume)}),n.invalidateQueries({queryKey:_.orgFsRecent(u.id)}),n.invalidateQueries({queryKey:_.orgFsSearchRoot(u.id)}),n.invalidateQueries({queryKey:_.orgFsPublicSets(u.id)})}function Be(a){a.defaultPrevented||!Z||a.target.closest("input, textarea, button, a, [role='button']")||(a.preventDefault(),z(!0))}return t.jsxs("div",{className:"relative h-full",onDragEnter:J,onDragOver:ne,onDragLeave:fe,onDrop:he,onContextMenu:Be,children:[Q&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-background/80 p-6 backdrop-blur-sm",children:t.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-2xl border-2 border-dashed border-primary px-10 py-8 text-center",children:[t.jsx($e,{size:28,className:"text-primary"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:r("library.library.dropToUpload",{location:j})})]})}),t.jsx("div",{className:"h-full overflow-y-auto",children:t.jsxs("div",{className:"mx-auto flex w-full max-w-[900px] flex-col gap-10 px-6 py-10 lg:px-10",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("div",{className:"min-w-0 flex-1 basis-full sm:basis-auto",children:t.jsx(yr,{segments:m.segments,onNavigate:x})}),t.jsxs("div",{className:"relative w-full shrink-0 sm:w-56",children:[t.jsx(xt,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground"}),t.jsx(ye,{value:k,onChange:a=>P(a.target.value),onKeyDown:a=>{a.key==="Escape"&&P("")},placeholder:S,className:"h-9 rounded-xl pr-9 pl-9"}),k&&t.jsx(H,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-1.5 size-7 -translate-y-1/2",onClick:()=>P(""),"aria-label":r("library.library.clearSearch"),children:t.jsx(gt,{size:14})})]}),t.jsx(H,{variant:"ghost",size:"icon",onClick:ze,"aria-label":r("library.library.refresh"),children:t.jsx(pt,{size:14})}),Z&&t.jsxs(H,{variant:"outline",size:"sm",onClick:()=>z(!0),children:[t.jsx(bt,{size:14}),r("library.library.newFolder")]}),m.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(ht,{size:12}),r("library.library.readOnly")]}):t.jsxs(H,{size:"sm",disabled:ae.isPending,onClick:()=>se.current?.click(),children:[t.jsx($e,{size:14}),ae.isPending?r("library.library.uploading"):r("library.library.uploadFile")]}),t.jsx("input",{ref:se,type:"file",multiple:!0,className:"hidden",onChange:a=>{Ne(a.target.files)}})]}),g?t.jsx(vr,{query:g,scope:$,stale:k.trim()!==g,onOpenFile:C,onShare:v,onDelete:V}):m.volume===null?t.jsx(wr,{onOpenDir:x}):t.jsx(kr,{location:m,onOpenDir:x,onOpenFile:C,onOpenSkill:D,onOpenBrand:N,onShare:v,onDelete:V,onContextMenu:(a,b)=>{K({path:a,kind:b}),q(M(a)),U(!0)},onMove:Re},m.volume)]})}),d&&(i.preview?t.jsx(Jt,{previewPath:i.preview,onClose:()=>w("preview",null)}):i.skill?t.jsx(lt,{skillPath:i.skill,onClose:()=>w("skill",null)},i.skill):i.brand?t.jsx(it,{brandPath:i.brand,onClose:()=>w("brand",null)},i.brand):null),t.jsx(Me,{open:E,onOpenChange:z,children:t.jsxs(Le,{children:[t.jsxs(Qe,{children:[t.jsx(Ve,{children:r("library.library.newFolderTitle")}),t.jsx(Ye,{children:r("library.library.newFolderDescription",{path:j||r("library.library.theLibrary")})})]}),t.jsx(ye,{autoFocus:!0,placeholder:r("library.library.folderNamePlaceholder"),value:G,onChange:a=>I(a.target.value),onKeyDown:a=>{a.key==="Enter"&&be()}}),t.jsxs(Ge,{children:[t.jsx(H,{variant:"outline",onClick:()=>z(!1),children:r("library.library.cancel")}),t.jsx(H,{disabled:!G.trim()||pe.isPending,onClick:()=>{be()},children:r("library.library.create")})]})]})}),t.jsx(Me,{open:W,onOpenChange:a=>{U(a),a||(K(null),q(""))},children:t.jsxs(Le,{children:[t.jsxs(Qe,{children:[t.jsx(Ve,{children:A&&r("library.library.renameTitle",{name:M(A.path)})}),t.jsx(Ye,{children:r("library.library.renameDescription")})]}),t.jsx(ye,{autoFocus:!0,value:f,onChange:a=>q(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Ce()}}),t.jsxs(Ge,{children:[t.jsx(H,{variant:"outline",onClick:()=>U(!1),children:r("library.library.cancel")}),t.jsx(H,{disabled:!f.trim()||me.isPending,onClick:()=>{Ce()},children:r("library.library.rename")})]})]})}),t.jsx(Wt,{target:Y,onOpenChange:a=>{a||v(null)}}),t.jsx(vt,{open:O!==null,onOpenChange:a=>{a||V(null)},children:t.jsxs(jt,{children:[t.jsxs(wt,{children:[t.jsx(kt,{children:r("library.library.deleteTitle",{name:O?M(O.path):""})}),t.jsx(St,{children:O?.kind==="dir"?r("library.library.deleteDirectoryDescription"):r("library.library.deleteFileDescription")})]}),t.jsxs(Nt,{children:[t.jsx(Pt,{children:r("library.library.cancel")}),t.jsx(Ct,{onClick:()=>{Ae()},children:r("library.library.delete")})]})]})})]})}function Dr(){const l=F.c(10),{openPanel:e}=tr(),[s,r]=T.useState(null),[u,n]=T.useState(null);let o;l[0]!==e?(o=t.jsx(Or,{onOpenFile:p=>e(mt(p)),onOpenSkill:r,onOpenBrand:n}),l[0]=e,l[1]=o):o=l[1];let d;l[2]!==s?(d=s&&t.jsx(lt,{skillPath:s,onClose:()=>r(null)},s),l[2]=s,l[3]=d):d=l[3];let i;l[4]!==u?(i=u&&t.jsx(it,{brandPath:u,onClose:()=>n(null)},u),l[4]=u,l[5]=i):i=l[5];let c;return l[6]!==o||l[7]!==d||l[8]!==i?(c=t.jsxs("div",{className:"flex flex-col h-full min-h-0 overflow-hidden",children:[o,d,i]}),l[6]=o,l[7]=d,l[8]=i,l[9]=c):c=l[9],c}function qs(){const l=F.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ft.Content,{children:t.jsx(Dr,{})}),l[0]=e):e=l[0],e}export{qs as default};
@@ -1 +1 @@
1
- import{c as R,a as m,r as _,u as C,j as u,N as y}from"./index-CfiHR5p3.js";import{u as U,A as j,a as k}from"./auth-entry-BVtguEOj.js";import{A as N}from"./auth-split-layout-DzJReBpa.js";import"./input-DOqceFPC.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-i8LvYSZg.js";import"./backoff-8mStPHYB.js";function O(){const e=R.c(5),t=U(),o=m.useSession();_.useRef(null);const i=t.status,c=o.data!=null,r=o.isPending;let n,s;e[0]!==c||e[1]!==r||e[2]!==i?(n=()=>{},s=[i,c,r],e[0]=c,e[1]=r,e[2]=i,e[3]=n,e[4]=s):(n=e[3],s=e[4]),_.useEffect(n,s)}const h="studio_signup_ref",a="studio_signup_src",$=720*60*60,f=128;function p(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?.[1]?decodeURIComponent(t[1]):null}function g(e,t){document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${$}; samesite=lax`}function b(e){e.ref&&e.ref.length<=f&&!p(h)&&g(h,e.ref),e.src&&e.src.length<=f&&!p(a)&&g(a,e.src)}function w(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function D(){const e=m.useSession();O();const t=C({from:"/login"}),{next:o="/",client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:x,code_challenge_method:A,src:S,ref:E}=t;b({src:S,ref:E});const d=o.startsWith("/")&&!o.startsWith("//")?o:"/",l=w({client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:x,code_challenge_method:A});return e.data?l?(window.location.href=l,u.jsx(j,{})):u.jsx(y,{to:d}):u.jsx(N,{children:u.jsx(k,{callbackUrl:d,redirectUrl:l})})}export{D as default};
1
+ import{c as R,a as m,r as _,u as C,j as u,N as y}from"./index-D9SZCEna.js";import{u as U,A as j,a as k}from"./auth-entry-CFDXzmrD.js";import{A as N}from"./auth-split-layout-CBVOXOwN.js";import"./input-DMN2ylja.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-i8LvYSZg.js";import"./backoff-8mStPHYB.js";function O(){const e=R.c(5),t=U(),o=m.useSession();_.useRef(null);const i=t.status,c=o.data!=null,r=o.isPending;let n,s;e[0]!==c||e[1]!==r||e[2]!==i?(n=()=>{},s=[i,c,r],e[0]=c,e[1]=r,e[2]=i,e[3]=n,e[4]=s):(n=e[3],s=e[4]),_.useEffect(n,s)}const h="studio_signup_ref",a="studio_signup_src",$=720*60*60,f=128;function p(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?.[1]?decodeURIComponent(t[1]):null}function g(e,t){document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${$}; samesite=lax`}function b(e){e.ref&&e.ref.length<=f&&!p(h)&&g(h,e.ref),e.src&&e.src.length<=f&&!p(a)&&g(a,e.src)}function w(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function D(){const e=m.useSession();O();const t=C({from:"/login"}),{next:o="/",client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:x,code_challenge_method:A,src:S,ref:E}=t;b({src:S,ref:E});const d=o.startsWith("/")&&!o.startsWith("//")?o:"/",l=w({client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:x,code_challenge_method:A});return e.data?l?(window.location.href=l,u.jsx(j,{})):u.jsx(y,{to:d}):u.jsx(N,{children:u.jsx(k,{callbackUrl:d,redirectUrl:l})})}export{D as default};