decocms 4.139.16 → 4.139.17

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 (221) hide show
  1. package/dist/client/assets/{AlertCircle-JdqwL1bZ.js → AlertCircle-C6zVgYIE.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CzwppqHj.js → AreaChart-COweF2FZ.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-DwA8j3FY.js → ArrowUp-Dp3zyc3Y.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-7XdiiikO.js → ArrowUpRight-KcnBIz6K.js} +1 -1
  5. package/dist/client/assets/{Check-CjO-ktNs.js → Check-BLoaEJHx.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-D7pLezY2.js → CheckCircle-oZFw4TDk.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-BHSzInhz.js → ChevronDown-CHSD2kHH.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-DkDZThhe.js → ChevronRight-DbsifnDX.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CJGF5kNV.js → ChevronUp-1VK7r3DV.js} +1 -1
  10. package/dist/client/assets/{Copy01-BChF-z3L.js → Copy01-CFx_2UtA.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-1aWjQrbN.js → DotsVertical-BozswJic.js} +1 -1
  12. package/dist/client/assets/{Eye-I2TyhgUw.js → Eye-CQW_Ojza.js} +1 -1
  13. package/dist/client/assets/{FilterLines-Cf7q3SSR.js → FilterLines-I39gfnvo.js} +1 -1
  14. package/dist/client/assets/{HardDrive-FACdPS0v.js → HardDrive-BEBYs8fC.js} +1 -1
  15. package/dist/client/assets/{Key01-DgXuAjNI.js → Key01-DxV6vmid.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-Dj-O2FVN.js → LayoutLeft-MLDloqKV.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-BAtr6CmH.js → LinkExternal01-BQbzt2sG.js} +1 -1
  18. package/dist/client/assets/{LogOut01-E97R4kwS.js → LogOut01-BGN0Co9E.js} +1 -1
  19. package/dist/client/assets/{Monitor01-C2dXzCoh.js → Monitor01-C27awlnd.js} +1 -1
  20. package/dist/client/assets/{Palette-D-OvH9OA.js → Palette-CegYCbvz.js} +1 -1
  21. package/dist/client/assets/{Play-CWK_jl5m.js → Play-DxgNHjjB.js} +1 -1
  22. package/dist/client/assets/{Plus-BVyeqOLq.js → Plus-B8hjGrBz.js} +1 -1
  23. package/dist/client/assets/{SearchLg-tvo9OgrU.js → SearchLg-DYDQahc9.js} +1 -1
  24. package/dist/client/assets/{SearchMd-BzWL1qp_.js → SearchMd-qllwuMSr.js} +1 -1
  25. package/dist/client/assets/{Settings02-Ydr_7C0a.js → Settings02-C9zt6jlN.js} +1 -1
  26. package/dist/client/assets/{Shield01-Dk7iguOw.js → Shield01-BotpoGnF.js} +1 -1
  27. package/dist/client/assets/{Star01-DMYCJlKS.js → Star01-BQfbzsXu.js} +1 -1
  28. package/dist/client/assets/{Stars01-CacTlnCO.js → Stars01-CaqmYHPd.js} +1 -1
  29. package/dist/client/assets/{Stars02-C9mcAMIM.js → Stars02-D6ze6cyX.js} +1 -1
  30. package/dist/client/assets/{Sun-p0B92Ct6.js → Sun-D68wkAy5.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-C4IjcfOL.js → SwitchHorizontal01-CCWHtaS4.js} +1 -1
  32. package/dist/client/assets/{Tool01-BESl5UwK.js → Tool01-QxHbhblg.js} +1 -1
  33. package/dist/client/assets/{Tool02-DqyN5EAT.js → Tool02-BCDN_1Xo.js} +1 -1
  34. package/dist/client/assets/{Trash01-CS8PIJzQ.js → Trash01-Cj3JYAEo.js} +1 -1
  35. package/dist/client/assets/{TrendUp01-CdckE-B6.js → TrendUp01-DzK9ot0h.js} +1 -1
  36. package/dist/client/assets/{Upload01-czWAw1BN.js → Upload01-KFKBkpR4.js} +1 -1
  37. package/dist/client/assets/{User01-DXGZ3oLJ.js → User01-Dl5fzUhp.js} +1 -1
  38. package/dist/client/assets/{Users01-CBbLYDIa.js → Users01-BJy43pjM.js} +1 -1
  39. package/dist/client/assets/{Users03-BD1PP9ya.js → Users03-F8u7i7b_.js} +1 -1
  40. package/dist/client/assets/{X-Bf-phyxi.js → X-BXltbVD2.js} +1 -1
  41. package/dist/client/assets/{XCircle-1IxPoLv5.js → XCircle-yFOiRrtf.js} +1 -1
  42. package/dist/client/assets/{XClose-rGu3DwMw.js → XClose-Da3NBEBI.js} +1 -1
  43. package/dist/client/assets/{Zap-SBZM22q4.js → Zap-Crm3GqN7.js} +1 -1
  44. package/dist/client/assets/{ZapSquare-B0NMT7rb.js → ZapSquare-CaJpcK5S.js} +1 -1
  45. package/dist/client/assets/{access-gate-BGX5hN4z.js → access-gate-CMSIF7Yz.js} +1 -1
  46. package/dist/client/assets/{add-section-modal-noaPTZQx.js → add-section-modal-DwwdVJrQ.js} +1 -1
  47. package/dist/client/assets/{agent-icon-3El2gICR.js → agent-icon-CyaUNCUi.js} +1 -1
  48. package/dist/client/assets/{agents-list-C3CEB2i7.js → agents-list-BCHJS5Gz.js} +1 -1
  49. package/dist/client/assets/{ai-providers-CFneIbdq.js → ai-providers-C3JPa3zY.js} +1 -1
  50. package/dist/client/assets/{alert-B0afMXau.js → alert-BSzqo8R4.js} +1 -1
  51. package/dist/client/assets/{alert-dialog-BD3fgi6_.js → alert-dialog-C4PFjOEh.js} +1 -1
  52. package/dist/client/assets/{app-editor-Bh0tzBiL.js → app-editor-DKpoHO9k.js} +1 -1
  53. package/dist/client/assets/{auth-m0Xx9INf.js → auth-CXKdfQgw.js} +1 -1
  54. package/dist/client/assets/{auth-catchall-BS9Ck193.js → auth-catchall-DBnAZiuC.js} +1 -1
  55. package/dist/client/assets/{auth-entry-CWWlVA1w.js → auth-entry-CC3xEPyd.js} +1 -1
  56. package/dist/client/assets/{auth-split-layout-Dd1W1-2G.js → auth-split-layout-Ddi_lyJC.js} +1 -1
  57. package/dist/client/assets/{authenticate-and-persist-oauth-C2HuKIUu.js → authenticate-and-persist-oauth-DrGiaowt.js} +1 -1
  58. package/dist/client/assets/{automation-list-row-DxJWU1Pn.js → automation-list-row-Bw6-fsDV.js} +1 -1
  59. package/dist/client/assets/{automation-runs-CDrcic-h.js → automation-runs-RHRZjcXw.js} +1 -1
  60. package/dist/client/assets/{automations-BEtdi6K9.js → automations-BU9ec-oB.js} +1 -1
  61. package/dist/client/assets/{avatar-CMNEI7XX.js → avatar-DiF5BiHS.js} +1 -1
  62. package/dist/client/assets/{badge-Csu-VYbL.js → badge-Cn4q77Rd.js} +1 -1
  63. package/dist/client/assets/{block-document-DmjcjEEh.js → block-document-BlXK3MFl.js} +1 -1
  64. package/dist/client/assets/{brand-context-BNiHC0tN.js → brand-context-D9P7IO6j.js} +1 -1
  65. package/dist/client/assets/{buckets-Dmk6r8KW.js → buckets-D7aD0F1A.js} +1 -1
  66. package/dist/client/assets/{bulk-category-panel-DNc1mq-8.js → bulk-category-panel-CERMmn3j.js} +1 -1
  67. package/dist/client/assets/{calendar-CI6Bhtzm.js → calendar-BKRMM7KK.js} +1 -1
  68. package/dist/client/assets/{capability-load-error-P_TMkZ8R.js → capability-load-error-Djdgd6tB.js} +1 -1
  69. package/dist/client/assets/{card-DGpcWUSK.js → card--2Pl4GOK.js} +1 -1
  70. package/dist/client/assets/{category-editor-DbjAXWa4.js → category-editor-BUKZhTg2.js} +1 -1
  71. package/dist/client/assets/{chat-context-DypAFNGW.js → chat-context-EBBFr98p.js} +1 -1
  72. package/dist/client/assets/{checkbox-DCFmw5-K.js → checkbox-DWuqxseG.js} +1 -1
  73. package/dist/client/assets/{cli-auth-success-CsL5tZg0.js → cli-auth-success-BFm_MSri.js} +1 -1
  74. package/dist/client/assets/{collection-detail-BKH9Wo23.js → collection-detail-BpsXb7Zm.js} +1 -1
  75. package/dist/client/assets/{collection-display-button-CXlnTPvg.js → collection-display-button-BaWovjNO.js} +1 -1
  76. package/dist/client/assets/{collection-search-Dm1dRGGP.js → collection-search-BG4IEzZ9.js} +1 -1
  77. package/dist/client/assets/{collection-table-wrapper-D0YAIKwe.js → collection-table-wrapper-BO8PJDWH.js} +1 -1
  78. package/dist/client/assets/{collection-tabs-Duie0vvG.js → collection-tabs-D6m0I8St.js} +1 -1
  79. package/dist/client/assets/{command-31LtjKdH.js → command-BA7Yfj-h.js} +1 -1
  80. package/dist/client/assets/{commerce-onboarding-CnjzWGXz.js → commerce-onboarding-DkQ5_a0a.js} +1 -1
  81. package/dist/client/assets/{companions-core-Bkqu3Z0M.js → companions-core-D21U9qoU.js} +1 -1
  82. package/dist/client/assets/{connect-desktop-dialog-ddoQWg57.js → connect-desktop-dialog-DVARNDK7.js} +1 -1
  83. package/dist/client/assets/{connect-h--tfEMV.js → connect-pCbSSjI6.js} +1 -1
  84. package/dist/client/assets/{connection-Dlw87aln.js → connection-DNkl_V9S.js} +1 -1
  85. package/dist/client/assets/{connection-card-D28OUSTt.js → connection-card-BZ_wCv8f.js} +1 -1
  86. package/dist/client/assets/{connection-detail-D0iV16Vt.js → connection-detail-BeOZCm2N.js} +1 -1
  87. package/dist/client/assets/{connection-form-helpers-BuhzZCwx.js → connection-form-helpers-DcP2VPcY.js} +1 -1
  88. package/dist/client/assets/{connections-DUvg2Pd4.js → connections-Da1NN1_m.js} +1 -1
  89. package/dist/client/assets/{decopilot-sse-pool-UflRCrax.js → decopilot-sse-pool-BMmdCxoY.js} +1 -1
  90. package/dist/client/assets/{dialog-DIWVb8Jc.js → dialog-DMvhYizd.js} +1 -1
  91. package/dist/client/assets/{domain-settings-Zsj9hCwG.js → domain-settings-JYeWqJgu.js} +1 -1
  92. package/dist/client/assets/{drawer-CSZYJatc.js → drawer-BJXAwkpL.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-BLXhxuXB.js → dropdown-menu-BpKfUq-h.js} +1 -1
  94. package/dist/client/assets/{empty-state-BRxqu2xl.js → empty-state-BK1h6bSX.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-DFMinp6x.js → extract-connection-data-DEqLAJD7.js} +1 -1
  96. package/dist/client/assets/{file-explorer-FqC3ULF8.js → file-explorer-Dh21AJPm.js} +1 -1
  97. package/dist/client/assets/{form-CnbzKY-E.js → form-Tz1O0vy2.js} +1 -1
  98. package/dist/client/assets/{general-C37XhJ7H.js → general-wh-OdWGk.js} +1 -1
  99. package/dist/client/assets/{github-repo-picker-C6qDSpxD.js → github-repo-picker-K6-rqm71.js} +1 -1
  100. package/dist/client/assets/{hooks-C8NSKVNb.js → hooks-DN2wJI0K.js} +1 -1
  101. package/dist/client/assets/{index-DzWTTmyY.js → index-BlW1KruI.js} +3 -3
  102. package/dist/client/assets/{index-dpmiLD5x.js → index-BuwJdais.js} +1 -1
  103. package/dist/client/assets/{index-Bq5M27Fm.js → index-DImVAVbF.js} +5 -5
  104. package/dist/client/assets/{index-DL6jdBsP.js → index-Dd2Sc2xC.js} +1 -1
  105. package/dist/client/assets/{index-B77-zOzI.js → index-Dkn2_XlH.js} +1 -1
  106. package/dist/client/assets/{index-BOWZz0Ow.js → index-KETVAOix.js} +28 -28
  107. package/dist/client/assets/{index-u3p5BOND.js → index-TiJpoyWt.js} +1 -1
  108. package/dist/client/assets/{index-hN5FlFwu.js → index-ZegW5Zk6.js} +12 -12
  109. package/dist/client/assets/{index-B-Tq0rSj.js → index-kqExvN0Y.js} +1 -1
  110. package/dist/client/assets/{index-Zij2N4uY.js → index-oVRT2sUt.js} +1 -1
  111. package/dist/client/assets/{index-redirect-hc6CemAa.js → index-redirect-CgFSRdeM.js} +1 -1
  112. package/dist/client/assets/{index-zaCRDYnM.js → index-zp1mn_nb.js} +1 -1
  113. package/dist/client/assets/{input-CEWsYlQ0.js → input-DknqPTX-.js} +1 -1
  114. package/dist/client/assets/{integration-icon-Daa4R-mX.js → integration-icon-C62FDmLJ.js} +1 -1
  115. package/dist/client/assets/{invite-member-dialog-Cm95ryBS.js → invite-member-dialog-DT58i_Og.js} +1 -1
  116. package/dist/client/assets/{label-CEf3BQRX.js → label-TuIP_M6L.js} +1 -1
  117. package/dist/client/assets/{layout-DfVid4ZA.js → layout-B0bGSn0B.js} +1 -1
  118. package/dist/client/assets/{login-CUbc2ntq.js → login-DkrYc9nx.js} +1 -1
  119. package/dist/client/assets/{mcp-oauth-DiAcEIeA.js → mcp-oauth-fNGMcclb.js} +1 -1
  120. package/dist/client/assets/{members-CZ1PhGWF.js → members-Sxwml3d0.js} +1 -1
  121. package/dist/client/assets/{monaco-editor-jvolD9w9.js → monaco-editor-Bs3FCl3n.js} +1 -1
  122. package/dist/client/assets/{monitoring-stats-row-KgcTVAWA.js → monitoring-stats-row-CO0k-Jb4.js} +1 -1
  123. package/dist/client/assets/{multi-select-B-JMFVHn.js → multi-select-CF0HLFWE.js} +1 -1
  124. package/dist/client/assets/{oauth-callback-D_4FYY1r.js → oauth-callback-BnGWJ0LN.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-ai-provider-CRDdiOsX.js → oauth-callback-ai-provider-Ctof6bxs.js} +1 -1
  126. package/dist/client/assets/{onboarding-C6yiFQZa.js → onboarding-CPJPdp9N.js} +1 -1
  127. package/dist/client/assets/{org-install-yG-H_KR7.js → org-install-Cz4cZZKn.js} +1 -1
  128. package/dist/client/assets/{org-layout-onncRO03.js → org-layout-B-eFvi6H.js} +1 -1
  129. package/dist/client/assets/{organization-choice-DS6rDlpQ.js → organization-choice-BXWSvq0c.js} +1 -1
  130. package/dist/client/assets/{orgs-KFmtJSKT.js → orgs-CO_pcwhF.js} +1 -1
  131. package/dist/client/assets/{page-seo-form-CIlaRGgI.js → page-seo-form-CAJMWjl2.js} +1 -1
  132. package/dist/client/assets/{popover-C0mwwgxt.js → popover-Cg84_tj4.js} +1 -1
  133. package/dist/client/assets/{post-editor-bFAP4ajU.js → post-editor-BEFzc5JS.js} +1 -1
  134. package/dist/client/assets/{primitives-CdK_N21D.js → primitives-DfPyiFJO.js} +1 -1
  135. package/dist/client/assets/{profile-owVrfbV5.js → profile-C6WjtnCo.js} +1 -1
  136. package/dist/client/assets/project-app-view-D8tbqs8h.js +1 -0
  137. package/dist/client/assets/record-editor-BtATIIsW.js +1 -0
  138. package/dist/client/assets/{redirect-editor-vGaVTHnR.js → redirect-editor-BcWHLBI7.js} +1 -1
  139. package/dist/client/assets/registry-BhmH7LqN.js +2 -0
  140. package/dist/client/assets/{registry-layout-CDpGVgjM.js → registry-layout-IZq0uOoo.js} +1 -1
  141. package/dist/client/assets/{reports-DnBb0DcV.js → reports-npRoal7M.js} +14 -14
  142. package/dist/client/assets/{require-capability-pFxaSx8X.js → require-capability-FRwI9EtT.js} +1 -1
  143. package/dist/client/assets/{required-auth-layout-Bjbykz5P.js → required-auth-layout-C-5R9VcV.js} +1 -1
  144. package/dist/client/assets/{reset-password-CKkUXjVi.js → reset-password-DcgUzwHN.js} +1 -1
  145. package/dist/client/assets/{roles-BhuRN2qt.js → roles-iLWEjxNa.js} +1 -1
  146. package/dist/client/assets/{search-input-BqbqfiJM.js → search-input-pTHyxFVn.js} +1 -1
  147. package/dist/client/assets/{secrets-KNsm3dOm.js → secrets-DRrw5Vyt.js} +1 -1
  148. package/dist/client/assets/{sections-editor-Bol2ms3m.js → sections-editor-RCUd1JMB.js} +1 -1
  149. package/dist/client/assets/{select-BKMJ5Ue7.js → select-DK6Dw3bS.js} +1 -1
  150. package/dist/client/assets/{select-model-B9rCeOX1.js → select-model-CwLRr5Km.js} +1 -1
  151. package/dist/client/assets/{self-tool-result-Bm-2oh3W.js → self-tool-result-DBYVlNHV.js} +1 -1
  152. package/dist/client/assets/{seo-editor-Co7YkIPf.js → seo-editor-CrxtSDM_.js} +1 -1
  153. package/dist/client/assets/{settings-layout-DstjyuuJ.js → settings-layout-COAAnJKA.js} +1 -1
  154. package/dist/client/assets/{settings-section-DPtCFMed.js → settings-section-BrQqV8nm.js} +1 -1
  155. package/dist/client/assets/{shell-controls-BlZsMgjn.js → shell-controls-DCUKxqli.js} +1 -1
  156. package/dist/client/assets/{shell-layout-DFLR0W3u.js → shell-layout-CmkW3FJu.js} +1 -1
  157. package/dist/client/assets/{sidebar-BUvZ2uzy.js → sidebar-y2MwuJ2T.js} +1 -1
  158. package/dist/client/assets/{skeleton-B-VwDiMe.js → skeleton-CvKL_DOf.js} +1 -1
  159. package/dist/client/assets/{sso-BoDjrPEs.js → sso-Cl0rpHM_.js} +1 -1
  160. package/dist/client/assets/{store-4vJF9Jgl.js → store-PoL_g2fr.js} +1 -1
  161. package/dist/client/assets/store-registry-DYNQayVV.js +2 -0
  162. package/dist/client/assets/{studio-tools-R1R4jE-o.js → studio-tools-DWV_cvsT.js} +1 -1
  163. package/dist/client/assets/{switch-DmGRUePd.js → switch-CHuP0csN.js} +1 -1
  164. package/dist/client/assets/{tab-id-tTiO0Kj0.js → tab-id-Dj3_BR43.js} +1 -1
  165. package/dist/client/assets/{table-aYLNUpk-.js → table-C6vwCB0S.js} +1 -1
  166. package/dist/client/assets/{tabs-DFqX_3Mj.js → tabs-DM7i8KJQ.js} +1 -1
  167. package/dist/client/assets/{textarea-DbUb-7lg.js → textarea-DwnbUWnr.js} +1 -1
  168. package/dist/client/assets/{toggle-group-j2Z854gi.js → toggle-group-CngF3yWq.js} +1 -1
  169. package/dist/client/assets/{toolbar-BXRIVhV8.js → toolbar-CAP0YxEM.js} +1 -1
  170. package/dist/client/assets/{tooltip-Dk67fAGR.js → tooltip-CJG6XIUi.js} +1 -1
  171. package/dist/client/assets/{use-ai-providers-BB-vpVOo.js → use-ai-providers-D_PTIccW.js} +1 -1
  172. package/dist/client/assets/{use-api-keys-B4WTFDPn.js → use-api-keys-Df8st-Tv.js} +1 -1
  173. package/dist/client/assets/{use-automations-Co47SEWv.js → use-automations-BuWpNQg8.js} +1 -1
  174. package/dist/client/assets/{use-autosave-BHjA1JJQ.js → use-autosave-BQv7ANGG.js} +1 -1
  175. package/dist/client/assets/{use-capability-Bta4-wcq.js → use-capability-C3pjyxxt.js} +1 -1
  176. package/dist/client/assets/{use-clock-tick-CQzXbjqr.js → use-clock-tick-VjRCi5xy.js} +1 -1
  177. package/dist/client/assets/{use-connection-C5A7eKKB.js → use-connection-CaEg8VAu.js} +1 -1
  178. package/dist/client/assets/{use-copy-Tloso2ZF.js → use-copy-Cgv9jwUu.js} +1 -1
  179. package/dist/client/assets/{use-create-virtual-mcp-EkeRzBlB.js → use-create-virtual-mcp-BrTTPwgs.js} +1 -1
  180. package/dist/client/assets/{use-debounced-autosave-DjeQnW-f.js → use-debounced-autosave-CtjyvJXW.js} +1 -1
  181. package/dist/client/assets/{use-debounced-value-BD62zdoK.js → use-debounced-value-C-5OjmX7.js} +1 -1
  182. package/dist/client/assets/{use-deco-credits-DyAtoxAl.js → use-deco-credits-BLvlWbBF.js} +1 -1
  183. package/dist/client/assets/{use-decopilot-events-B77mEi6n.js → use-decopilot-events-BzQByqk7.js} +1 -1
  184. package/dist/client/assets/{use-delete-connection-BoN-EWhr.js → use-delete-connection-DLhBOuKr.js} +1 -1
  185. package/dist/client/assets/{use-deployment-admin-CMshes-Y.js → use-deployment-admin-DC2-b41B.js} +1 -1
  186. package/dist/client/assets/{use-file-configs-BfJJjqJM.js → use-file-configs-BGjqsLu_.js} +1 -1
  187. package/dist/client/assets/{use-infinite-scroll-ByMWQlkp.js → use-infinite-scroll-C6KWpGNl.js} +1 -1
  188. package/dist/client/assets/{use-join-requests-Cz3kIF3g.js → use-join-requests-95ycRh59.js} +1 -1
  189. package/dist/client/assets/{use-mcp-auth-status-CCvAbwzl.js → use-mcp-auth-status-5_OurmGs.js} +1 -1
  190. package/dist/client/assets/{use-mcp-client-CnpE-5Q9.js → use-mcp-client-BUd73Lve.js} +1 -1
  191. package/dist/client/assets/{use-mcp-tools-Qw3kZQ76.js → use-mcp-tools-X7HBWC_e.js} +1 -1
  192. package/dist/client/assets/{use-members-BGrvyKZW.js → use-members-DZZuE2Al.js} +1 -1
  193. package/dist/client/assets/{use-mobile-DALJqSLq.js → use-mobile-VS13WCcG.js} +1 -1
  194. package/dist/client/assets/{use-navigate-to-agent-iL-HiHbb.js → use-navigate-to-agent-WRFchUdG.js} +1 -1
  195. package/dist/client/assets/{use-org-auth-client-CpnIrqkb.js → use-org-auth-client-B8EHZGxy.js} +1 -1
  196. package/dist/client/assets/{use-org-sso-CrNTrngm.js → use-org-sso-CyklIy1X.js} +1 -1
  197. package/dist/client/assets/{use-organization-roles-jmK8ENgV.js → use-organization-roles-Ci5w5FCP.js} +1 -1
  198. package/dist/client/assets/{use-organization-settings-BgbxciXE.js → use-organization-settings-CC051OzF.js} +1 -1
  199. package/dist/client/assets/{use-registry-app-BHjmJfvn.js → use-registry-app-Db4UIVpL.js} +1 -1
  200. package/dist/client/assets/{use-registry-connections-BkV-cgRp.js → use-registry-connections-CavLyRKv.js} +1 -1
  201. package/dist/client/assets/{use-secrets-DDPdFifm.js → use-secrets-DhtPvJms.js} +1 -1
  202. package/dist/client/assets/{use-status-sounds-TL3HFsJe.js → use-status-sounds-B5No1xyl.js} +1 -1
  203. package/dist/client/assets/{use-view-mode-D93VtIbV.js → use-view-mode-CjGVx6wN.js} +1 -1
  204. package/dist/client/assets/{use-virtual-mcp-Dv_4AxFb.js → use-virtual-mcp-8lemaCfB.js} +1 -1
  205. package/dist/client/assets/useInfiniteQuery-Ce4t3nf_.js +1 -0
  206. package/dist/client/assets/{useQueries-Z8mOmydr.js → useQueries-D4eVYELY.js} +1 -1
  207. package/dist/client/assets/{useRouterState-CjYXPbQN.js → useRouterState-CP1YuvzN.js} +1 -1
  208. package/dist/client/assets/useSuspenseInfiniteQuery-KCBIwWG5.js +1 -0
  209. package/dist/client/assets/{users-Cc5q3IjV.js → users-EFTlXIeF.js} +1 -1
  210. package/dist/client/assets/{variant-calendar-Dw8IOFVX.js → variant-calendar-B2CiUEac.js} +1 -1
  211. package/dist/client/assets/{view-mode-toggle-ByvTIDbk.js → view-mode-toggle-CRhPklAO.js} +1 -1
  212. package/dist/client/index.html +1 -1
  213. package/dist/server/cli.js +179 -179
  214. package/dist/server/server.js +153 -153
  215. package/package.json +1 -1
  216. package/dist/client/assets/project-app-view-CTXeRNg0.js +0 -1
  217. package/dist/client/assets/record-editor-CxB9Cpmw.js +0 -1
  218. package/dist/client/assets/registry-Cojk1ieS.js +0 -2
  219. package/dist/client/assets/store-registry-Br4ktCJn.js +0 -2
  220. package/dist/client/assets/useInfiniteQuery-DzEA8dT4.js +0 -1
  221. package/dist/client/assets/useSuspenseInfiniteQuery-f2VHaBYu.js +0 -1
@@ -1,26 +1,26 @@
1
- import{b7 as ke,b8 as ro,Y as R,aI as _e,a5 as Ut,b9 as as,a2 as Se,ba as Tr,bb as qe,a3 as _u,bc as pn,X as Q,bd as ls,be as io,bf as Iu,bg as Tu,bh as Ya,bi as Nu,bj as Pu,bk as Fu,bl as Ja,bm as $u,bn as Du,b0 as Za,a4 as nr,bo as Ru,c as je,r as N,m as Ur,j as m,ag as Xa,F as cs,a as ku,t as vr,bp as us,bq as Qa,br as Mu,bs as Uu,bt as Lu,b6 as el,bu as ds,bv as Bu,bw as Vu,bx as qu,by as zu,aC as Wu,aF as Qt,az as rr,aD as gn,aA as Hu,aE as Ku,bz as Gu,aB as Yu,bA as Ju,b as lt,B as Lr,k as fs,d as Zu,E as Xu,av as Qu}from"./index-Bq5M27Fm.js";import{P as An}from"./index-B77-zOzI.js";import{E as tl}from"./empty-state-BRxqu2xl.js";import{k as ed,l as td,n as nd,A as nl,o as rd,p as id,i as sd,u as od}from"./use-mcp-client-CnpE-5Q9.js";import{c as ad}from"./use-mcp-tools-Qw3kZQ76.js";import{A as rl,i as ld}from"./agent-icon-3El2gICR.js";import{i as cd}from"./Key01-DgXuAjNI.js";import{b as ud,u as dd,a as fd}from"./use-connection-C5A7eKKB.js";import{U as Cn,a as ii,e as so}from"./auth-m0Xx9INf.js";import{i as md,c as hd,d as pd,e as gd}from"./extract-connection-data-DFMinp6x.js";import{u as yd}from"./use-registry-connections-BkV-cgRp.js";import{f as bd}from"./use-organization-settings-BgbxciXE.js";import{s as xd}from"./Plus-BVyeqOLq.js";import{e as il,S as vd,a as Sd,b as wd,c as jd,d as Od}from"./select-BKMJ5Ue7.js";import{R as oo}from"./index-dpmiLD5x.js";import{R as Ed,I as Ad,a as Cd}from"./use-mcp-auth-status-CCvAbwzl.js";import{_ as Lt}from"./index-u3p5BOND.js";import{I as _d}from"./input-CEWsYlQ0.js";import{a as Id,b as Td,P as Nd}from"./popover-C0mwwgxt.js";import{a as Pd,T as Fd,b as $d,c as Dd}from"./tooltip-Dk67fAGR.js";import{a as Rd}from"./use-virtual-mcp-Dv_4AxFb.js";import{i as kd}from"./Check-CjO-ktNs.js";import{i as Md}from"./SearchMd-BzWL1qp_.js";import{a as Ud}from"./Users03-BD1PP9ya.js";import{u as Ld}from"./use-mobile-DALJqSLq.js";import{u as Bd}from"./use-create-virtual-mcp-EkeRzBlB.js";var Vd=class{apply(t,e){if(!e.type)return;const n=Array.isArray(e.type)?e.type:[e.type],r=new Set(n);if(r.has("string")||(t.string=!1),!r.has("number")&&!r.has("integer")&&(t.number=!1),r.has("boolean")||(t.boolean=!1),r.has("null")||(t.null=!1),r.has("array")||(t.array=!1),r.has("object")||(t.object=!1),r.has("integer")&&t.number!==!1){const i=t.number||_e();i instanceof pn&&(t.number=i.int())}}},qd=class{apply(t,e){if(e.const===void 0)return;const n=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof n=="string"?t.string=qe(n):typeof n=="number"?t.number=qe(n):typeof n=="boolean"?t.boolean=qe(n):n===null?t.null=as():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},zd=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const n={string:e.enum.filter(r=>typeof r=="string"),number:e.enum.filter(r=>typeof r=="number"),boolean:e.enum.filter(r=>typeof r=="boolean"),null:e.enum.filter(r=>r===null),array:e.enum.filter(r=>Array.isArray(r)),object:e.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};t.string=this.createTypeSchema(n.string,"string"),t.number=this.createTypeSchema(n.number,"number"),t.boolean=this.createTypeSchema(n.boolean,"boolean"),t.null=n.null.length>0?as():!1,t.array=n.array.length>0?void 0:!1,t.object=n.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return qe(t[0]);if(e==="string")return _u(t);if(e==="number"){const[n,r,...i]=t;return Tr([qe(n),qe(r),...i.map(s=>qe(s))])}return e==="boolean"?Tr([qe(!0),qe(!1)]):!1}},Wd=class{apply(t,e){const n=e;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=Fu();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),t.file=r,t.string=!1}}},Hd=class{apply(t,e){const n=e;e.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&t.string===void 0&&(t.string=R())}},Kd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||R();r instanceof ls&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Gd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||R();r instanceof ls&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Yd=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||R();if(r instanceof ls){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},Jd=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.min(n.minimum))}}},Zd=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.max(n.maximum))}}},Xd=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},Qd=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},ef=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},tf=class{apply(t,e){const n=e;e.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&t.array===void 0&&(t.array=Se(ke()))}},nf=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||Se(ke())).min(n.minItems))}},rf=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||Se(ke())).max(n.maxItems))}},sf=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||Se(ke());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=Se(r);if(t.array&&t.array instanceof Iu){const s=t.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}t.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?t.array=t.array||Se(ke()):t.array=Se(ke()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||Se(ke()):n.prefixItems&&(t.array=t.array||Se(ke()))}},of=class{apply(t,e){if(e.type!=="array")return;const n=e;if(!Array.isArray(n.items)||t.array===!1)return;const r=n.items.map(s=>Ie(s));let i;r.length===0?i=io([]):i=io(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),t.tuple=i,t.array=!1}},af=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||Q({}).passthrough())}},lf=class{apply(t,e){const n=e;e.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&t.object===void 0&&(t.object=Q({}).passthrough())}},cf=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||Q({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},uf=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||Q({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Gn(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,r)=>Gn(n,e[r]));if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Gn(t[i],e[i]))}return!1}function df(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>Gn(n,i))?!1:(e.push(n),!0))}}function Nr(t,e){return t.safeParse(e).success}var ff=class{apply(t,e){if(!e.not)return t;const n=Ie(e.not);return t.refine(r=>!Nr(n,r),{message:"Value must not match the 'not' schema"})}},mf=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(df(),{message:"Array items must be unique"})}},hf=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Ie(r)).reduce((r,i)=>Ya(r,i),t)}},pf=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Ie(e.anyOf[0]):Tr([Ie(e.anyOf[0]),Ie(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Ie(r))]);return Ya(t,n)}},gf=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const n=e.oneOf.map(r=>Ie(r));return t.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},yf=class{apply(t,e){const n=e;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ie(s));return t.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Nr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ie(n.items);for(let a=i.length;a<s.length;a++)if(!Nr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},bf=class{apply(t,e){const n=e;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return t;if(t instanceof Nu||t instanceof Pu){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ie(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?Q(r):Q(r).passthrough()}return t.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ie(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},xf=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const n=e.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?t:t.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Gn(r,i)),{message:"Value must match one of the enum values"})}},vf=class{apply(t,e){if(e.const===void 0)return t;const n=e.const;return typeof n!="object"||n===null?t:t.refine(r=>Gn(r,n),{message:"Value must equal the const value"})}},Sf=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},wf=class{apply(t,e){var n;const r=e;return!((n=r.required)!=null&&n.includes("__proto__"))||e.type!==void 0?t:ke().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(n=>Object.prototype.hasOwnProperty.call(t,n))}},jf=class{apply(t,e){var n;const r=e;if(r.contains===void 0)return t;const i=Ie(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return t.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const u of a)Nr(i,u)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Of=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},Ef=[new qd,new zd,new Vd,new Wd,new Hd,new tf,new lf,new Kd,new Gd,new Yd,new Jd,new Zd,new Xd,new Qd,new ef,new of,new nf,new rf,new sf,new cf,new uf,new af],Af=[new wf,new xf,new vf,new hf,new pf,new gf,new yf,new bf,new jf,new ff,new mf,new Of,new Sf];function Ie(t){if(typeof t=="boolean")return t?ke():ro();const e={};for(const i of Ef)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||R()),e.number!==!1&&n.push(e.number||_e()),e.boolean!==!1&&n.push(e.boolean||Ut()),e.null!==!1&&n.push(e.null||as()),e.array!==!1&&n.push(e.array||Se(ke())),e.tuple!==!1&&e.tuple!==void 0&&n.push(e.tuple),e.object!==!1)if(e.object)n.push(e.object);else{const i=Tu(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}e.file!==!1&&e.file!==void 0&&n.push(e.file);let r;n.length===0?r=ro():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=Tr(n):r=ke();for(const i of Af)r=i.apply(r,t);return r}class ao extends Event{constructor(e,n){var r,i;super(e),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,n,r){return r(lo(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(lo(this),n)}}function Cf(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function $i(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map($i).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${$i(t.cause)}`:t.message:`${t}`}function lo(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var sl=t=>{throw TypeError(t)},ms=(t,e,n)=>e.has(t)||sl("Cannot "+n),Z=(t,e,n)=>(ms(t,e,"read from private field"),n?n.call(t):e.get(t)),ve=(t,e,n)=>e.has(t)?sl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),pe=(t,e,n,r)=>(ms(t,e,"write to private field"),e.set(t,n),n),st=(t,e,n)=>(ms(t,e,"access private method"),n),Pe,Pt,Yt,Sr,Pr,Un,en,Ln,bt,Jt,sn,Zt,Fn,Ve,Di,Ri,ki,co,Mi,Ui,$n,Li,Bi;class wr extends EventTarget{constructor(e,n){var r,i;super(),ve(this,Ve),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ve(this,Pe),ve(this,Pt),ve(this,Yt),ve(this,Sr),ve(this,Pr),ve(this,Un),ve(this,en),ve(this,Ln,null),ve(this,bt),ve(this,Jt),ve(this,sn,null),ve(this,Zt,null),ve(this,Fn,null),ve(this,Ri,async s=>{var o;Z(this,Jt).reset();const{body:a,redirected:l,status:u,headers:c}=s;if(u===204){st(this,Ve,$n).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?pe(this,Yt,new URL(s.url)):pe(this,Yt,void 0),u!==200){st(this,Ve,$n).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){st(this,Ve,$n).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.OPEN);const d=new Event("open");if((o=Z(this,Fn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){st(this,Ve,$n).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const h=new TextDecoder,g=a.getReader();let f=!0;do{const{done:p,value:y}=await g.read();y&&Z(this,Jt).feed(h.decode(y,{stream:!p})),p&&(f=!1,Z(this,Jt).reset(),st(this,Ve,Li).call(this))}while(f)}),ve(this,ki,s=>{pe(this,bt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&st(this,Ve,Li).call(this,$i(s))}),ve(this,Mi,s=>{typeof s.id=="string"&&pe(this,Ln,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:Z(this,Yt)?Z(this,Yt).origin:Z(this,Pt).origin,lastEventId:s.id||""});Z(this,Zt)&&(!s.event||s.event==="message")&&Z(this,Zt).call(this,o),this.dispatchEvent(o)}),ve(this,Ui,s=>{pe(this,Un,s)}),ve(this,Bi,()=>{pe(this,en,void 0),Z(this,Pe)===this.CONNECTING&&st(this,Ve,Di).call(this)});try{if(e instanceof URL)pe(this,Pt,e);else if(typeof e=="string")pe(this,Pt,new URL(e,_f()));else throw new Error("Invalid URL")}catch{throw Cf("An invalid or illegal string was specified")}pe(this,Jt,ed({onEvent:Z(this,Mi),onRetry:Z(this,Ui)})),pe(this,Pe,this.CONNECTING),pe(this,Un,3e3),pe(this,Pr,(r=n?.fetch)!=null?r:globalThis.fetch),pe(this,Sr,(i=n?.withCredentials)!=null?i:!1),st(this,Ve,Di).call(this)}get readyState(){return Z(this,Pe)}get url(){return Z(this,Pt).href}get withCredentials(){return Z(this,Sr)}get onerror(){return Z(this,sn)}set onerror(e){pe(this,sn,e)}get onmessage(){return Z(this,Zt)}set onmessage(e){pe(this,Zt,e)}get onopen(){return Z(this,Fn)}set onopen(e){pe(this,Fn,e)}addEventListener(e,n,r){const i=n;super.addEventListener(e,i,r)}removeEventListener(e,n,r){const i=n;super.removeEventListener(e,i,r)}close(){Z(this,en)&&clearTimeout(Z(this,en)),Z(this,Pe)!==this.CLOSED&&(Z(this,bt)&&Z(this,bt).abort(),pe(this,Pe,this.CLOSED),pe(this,bt,void 0))}}Pe=new WeakMap,Pt=new WeakMap,Yt=new WeakMap,Sr=new WeakMap,Pr=new WeakMap,Un=new WeakMap,en=new WeakMap,Ln=new WeakMap,bt=new WeakMap,Jt=new WeakMap,sn=new WeakMap,Zt=new WeakMap,Fn=new WeakMap,Ve=new WeakSet,Di=function(){pe(this,Pe,this.CONNECTING),pe(this,bt,new AbortController),Z(this,Pr)(Z(this,Pt),st(this,Ve,co).call(this)).then(Z(this,Ri)).catch(Z(this,ki))},Ri=new WeakMap,ki=new WeakMap,co=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Z(this,Ln)?{"Last-Event-ID":Z(this,Ln)}:void 0},cache:"no-store",signal:(t=Z(this,bt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},Mi=new WeakMap,Ui=new WeakMap,$n=function(t,e){var n;Z(this,Pe)!==this.CLOSED&&pe(this,Pe,this.CLOSED);const r=new ao("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r)},Li=function(t,e){var n;if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.CONNECTING);const r=new ao("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r),pe(this,en,setTimeout(Z(this,Bi),Z(this,Un)))},Bi=new WeakMap,wr.CONNECTING=0,wr.OPEN=1,wr.CLOSED=2;function _f(){const t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}class If extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class Tf{constructor(e,n){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=td(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Cn("No auth provider");let e;try{e=await ii(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(e!=="AUTHORIZED")throw new Cn;return await this._startOrAuth()}async _commonHeaders(){const e={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(e.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const n=nd(this._requestInit?.headers);return new Headers({...e,...n})}_startOrAuth(){const e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new wr(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await e(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:u}=so(a);this._resourceMetadataUrl=l,this._scope=u}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new If(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=Ja.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(e){if(!this._authProvider)throw new Cn("No auth provider");if(await ii(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(e),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=so(i);if(this._resourceMetadataUrl=o,this._scope=a,await ii(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(e){this._protocolVersion=e}}const Nf="mcp";class Pf{constructor(e){this._url=e}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,n)=>{this._socket=new WebSocket(this._url,Nf),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{e()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=Ja.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(e){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(e)),n()})}}function Ff(){const t=new nl({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return $u(t),t}class $f{#e=Ff();#t=new Map;#n=new WeakMap;getValidator(e){const n=this.#n.get(e);if(n)return n;let r;const i=s=>{if(!r){const o=Df(e);let a=this.#t.get(o);a||(a=this.#e.compile(e),this.#t.set(o,a)),r=a}return r(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this.#e.errorsText(r.errors)}};return this.#n.set(e,i),i}}function Df(t){return JSON.stringify(t,(e,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const Rf=new $f;var uo;(function(t){t.Completable="McpCompletable"})(uo||(uo={}));class kf extends rd{constructor(e,n){super(e,n)}send(e,n){const r=Mf(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function Mf(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const n=e?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Uf extends id{constructor(e,n){super(e,{jsonSchemaValidator:Rf,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},Du,n)}}const Lf=async(t,e,n)=>{const r=Bf(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new Uf({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Bf=(t,e,n)=>{if(t.type==="Websocket")return new Pf(new URL(t.url));if(t.type!=="SSE"&&t.type!=="HTTP")return null;const i={...t.token?{authorization:`Bearer ${t.token}`}:{},...n??{},..."headers"in t?t.headers||{}:{}};if(t.type==="SSE"){const s={requestInit:{headers:i,signal:e}};return t.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:e})}),new Tf(new URL(t.url),s)}return new kf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},fo=t=>{try{return JSON.parse(t)}catch{return t}},hr=new Map,mo=(t,e)=>({...t,id:t.name,inputSchema:t.inputSchema?Ie(t.inputSchema):void 0,outputSchema:t.outputSchema?Ie(t.outputSchema):void 0,execute:n=>e(n.context,t.name)});function Vf(t){const e=n=>"connection"in t?Lf({connection:t.connection},void 0,n):t.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,u=r){const c=t?.debugId?.(),d=c?{"x-trace-debug-id":c}:void 0,{client:h}=await e(d),{structuredContent:g,isError:f,content:p}=await h.callTool({name:String(u),arguments:l});if(f){const x=p?.[0]?.text,S=typeof x=="string"?fo(x):null,E=S?.code&&typeof t?.getErrorByStatusCode=="function"?t.getErrorByStatusCode(S.code,S.message,S.traceId):null;throw E||new Error(`Tool ${String(u)} returned an error: ${JSON.stringify(g??p)}`)}if(g!==void 0)return g;const y=p?.[0]?.text;return typeof y=="string"?fo(y):void 0}async function s(){const{client:l}=await e(),{tools:u}=await l.listTools();return u}async function o(){if(!("connection"in t))return s();const l=t.connection,u=JSON.stringify(l);try{return hr.has(u)||hr.set(u,s()),await hr.get(u)}catch(c){console.error("Failed to list tools",c),hr.delete(u);return}}async function a(){return(await o()??[]).map(u=>mo(u,i))}return i.asTool=async()=>{const u=(await o()??[]).find(c=>c.name===r);if(!u)throw new Error(`Tool ${r} not found`);return mo(u,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>qf({connection:n}):globalThis[e]}});function qf(t){return Vf(t)}function zf(t){return{isImplementedBy:e=>{for(const n of t){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=e.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const Wf=Q({specversion:qe("1.0").describe("CloudEvents specification version"),id:R().describe("Unique identifier for this event (UUID recommended)"),source:R().describe("Connection ID of the event publisher"),type:R().describe("Event type (e.g., 'order.created', 'user.signup')"),time:R().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:R().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:R().optional().default("application/json").describe("Content type of the data attribute"),dataschema:R().url().optional().describe("URI to the schema for the data attribute"),data:Za().optional().describe("Event payload (any JSON value)")});Q({events:Se(Wf).min(1).describe("Batch of CloudEvents to process")});const Hf=Q({success:Ut().optional().describe("Whether this event was processed successfully"),error:R().optional().describe("Error message for this event"),retryAfter:_e().int().positive().optional().describe("Re-deliver this event after this many ms")});Q({success:Ut().optional().describe("Batch success - applies to events not in results"),error:R().optional().describe("Batch error message - applies to events not in results"),processedCount:_e().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:_e().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:nr(R(),Hf).optional().describe("Per-event results keyed by event ID")});const Kf=Q({type:qe("string"),enum:Se(R()).optional(),description:R().optional()}),Gf=Q({type:R(),description:R(),paramsSchema:nr(R(),Kf)});Q({});Q({triggers:Se(Gf)});Q({type:R(),params:nr(R(),R()),enabled:Ut(),callbackUrl:Ru().optional(),callbackToken:R().min(1).optional()});Q({success:Ut()});Q({prefix:R().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:_e().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:R().optional().describe("Token for pagination from previous response"),delimiter:R().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});Q({objects:Se(Q({key:R().describe("Object key/path"),size:_e().describe("Object size in bytes"),lastModified:R().describe("Last modified timestamp"),etag:R().describe("Entity tag for the object")})),nextContinuationToken:R().optional().describe("Token for fetching next page of results"),isTruncated:Ut().describe("Whether there are more results available"),commonPrefixes:Se(R()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});Q({key:R().describe("Object key/path to get metadata for")});Q({contentType:R().optional().describe("MIME type of the object"),contentLength:_e().describe("Size of the object in bytes"),lastModified:R().describe("Last modified timestamp"),etag:R().describe("Entity tag for the object"),metadata:nr(R(),R()).optional().describe("Custom metadata key-value pairs")});Q({key:R().describe("Object key/path to generate URL for"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});Q({url:R().describe("Presigned URL for downloading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});Q({key:R().describe("Object key/path for the upload"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:R().optional().describe("MIME type for the object being uploaded")});Q({url:R().describe("Presigned URL for uploading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});Q({key:R().describe("Object key/path to delete")});Q({success:Ut().describe("Whether the deletion was successful"),key:R().describe("The key that was deleted")});Q({keys:Se(R()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});Q({deleted:Se(R()).describe("Array of successfully deleted keys"),errors:Se(Q({key:R(),message:R()})).describe("Array of errors for failed deletions")});const Yf=Q({primary:R().optional().describe("Primary brand color (hex)"),secondary:R().optional().describe("Secondary brand color (hex)"),accent:R().optional().describe("Accent / highlight color (hex)"),background:R().optional().describe("Background color (hex)"),foreground:R().optional().describe("Foreground / text color (hex)")}),Jf=Q({heading:R().optional().describe("Font family for headings"),body:R().optional().describe("Font family for body text"),code:R().optional().describe("Font family for code / monospace")}),Zf=Q({logo:R().optional().describe("Logo URL"),favicon:R().optional().describe("Favicon URL"),ogImage:R().optional().describe("Open Graph image URL")}),Xf=Q({id:R(),name:R().describe("Brand / company name"),domain:R().optional().describe("Company domain (e.g. example.com)"),colors:Yf.optional().describe("Semantic color palette"),fonts:Jf.optional().describe("Font families by role"),assets:Zf.optional().describe("Visual identity assets"),overview:R().optional().describe("Company overview / description"),tagline:R().optional().describe("Brand tagline"),tone:R().optional().describe("Tone of voice description"),metadata:nr(R(),Za()).optional().describe("Extra design tokens and metadata")});Q({id:R().optional().describe("Brand ID. Omit to get the default brand.")});Q({});Q({items:Se(Xf)});const Qf={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function em(t){if(t)return Qf[t]}function LO(t,e){const n=t.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=e.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return zf(i).isImplementedBy(r)}const hs=N.createContext(null);function BO(t){const e=je.c(3),{children:n}=t,r=N.useContext(hs);if(!r?.tabsEl)return null;let i;return e[0]!==n||e[1]!==r.tabsEl?(i=Xa.createPortal(n,r.tabsEl),e[0]=n,e[1]=r.tabsEl,e[2]=i):i=e[2],i}function tm(t){const e=je.c(3),{children:n}=t,r=N.useContext(hs);if(!r?.actionsEl)return null;let i;return e[0]!==n||e[1]!==r.actionsEl?(i=Xa.createPortal(n,r.actionsEl),e[0]=n,e[1]=r.actionsEl,e[2]=i):i=e[2],i}const VO=tm;function qO(t){const e=je.c(21),{children:n,breadcrumb:r,hideHeader:i}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftEl:null,tabsEl:null,actionsEl:null},e[0]=s):s=e[0];const[o,a]=N.useState(s),l=N.useRef(null),u=N.useRef(null),c=N.useRef(null);let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=A=>{l.current=A,A&&a(_=>_.leftEl===A?_:{..._,leftEl:A})},e[1]=d):d=e[1];const h=d;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=A=>{u.current=A,A&&a(_=>_.tabsEl===A?_:{..._,tabsEl:A})},e[2]=g):g=e[2];const f=g;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=A=>{c.current=A,A&&a(_=>_.actionsEl===A?_:{..._,actionsEl:A})},e[3]=p):p=e[3];const y=p,x=i&&"hidden";let S;e[4]!==x?(S=Ur(x),e[4]=x,e[5]=S):S=e[5];let E;e[6]===Symbol.for("react.memo_cache_sentinel")?(E=m.jsx("div",{ref:h,className:"flex items-center gap-2 min-w-0"}),e[6]=E):E=e[6];let j;e[7]!==r?(j=m.jsxs(An.Header.Left,{children:[r,E]}),e[7]=r,e[8]=j):j=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=m.jsxs(An.Header.Right,{children:[m.jsx("div",{ref:f,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),m.jsx("div",{ref:y,className:"flex items-center gap-2 shrink-0"})]}),e[9]=b):b=e[9];let v;e[10]!==S||e[11]!==j?(v=m.jsxs(An.Header,{className:S,children:[j,b]}),e[10]=S,e[11]=j,e[12]=v):v=e[12];let w;e[13]!==n?(w=m.jsx(An.Content,{children:n}),e[13]=n,e[14]=w):w=e[14];let O;e[15]!==v||e[16]!==w?(O=m.jsxs(An,{children:[v,w]}),e[15]=v,e[16]=w,e[17]=O):O=e[17];let C;return e[18]!==o||e[19]!==O?(C=m.jsx(hs,{value:o,children:O}),e[18]=o,e[19]=O,e[20]=C):C=e[20],C}function nm(t){return t.startsWith("@")?t:`@${t}`}function rm(){const{org:t}=cs(),{data:e}=ku.useSession(),n=ud(),r=yd(),i=bd(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!t||!e?.user?.id){vr.error("Not authenticated");return}const l=nm(a),c=(await Promise.all(s.map(async p=>{const y=md(p.id,t.id);try{const x=await hd(p.id,t.id,t.slug,y,{where:{appName:l}});return pd(x??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!c){vr.error(`MCP Server not found in registry: ${a}`);return}const d=gd(c,t.id,e.user.id),h=d.connection_type==="STDIO",g=!!d.connection_url,f=h&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!g&&!f){vr.error("This MCP Server cannot be connected: no connection method available");return}return await n.create.mutateAsync(d),{id:d.id,connection:d}},isInstalling:n.create.isPending}}function q(t){return typeof t!="object"||t===null||typeof t.lastModified=="number"&&typeof File<"u"&&t instanceof File||typeof t.getMonth=="function"&&typeof Date<"u"&&t instanceof Date?!1:!Array.isArray(t)}function im(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),q(t.additionalItems)}function ho(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const ot="__additional_property",tn="additionalProperties",Ot="allOf",ee="anyOf",Ne="const",$t="default",ps="dependencies",sm="enum",Ae="__errors",de="$id",gs="if",an="items",om="_$junk_option_schema_id$_",jr="$name",W="oneOf",Vi="patternProperties",se="properties",si="readonly",ol="required",Fr="submitButtonOptions",ue="$ref",Bn="__rjsf_ref",Dn="$schema",al="root",ll="_",am=["discriminator","propertyName"],po="formContext",lm="layoutGridLookupMap",ys="__rjsf_additionalProperties",cl="__rjsf_rootSchema",cm="ui:field",bs="ui:widget",vt="ui:options",qi="ui:globalOptions",um="ui:definitions",dm="https://json-schema.org/draft/2019-09/schema",Or="https://json-schema.org/draft/2020-12/schema";function B(t={},e={}){return t?Object.keys(t).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=t[r];return r===bs&&q(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===vt&&q(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function ul(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=B(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var dl=typeof global=="object"&&global&&global.Object===Object&&global,fm=typeof self=="object"&&self&&self.Object===Object&&self,nt=dl||fm||Function("return this")(),Me=nt.Symbol,fl=Object.prototype,mm=fl.hasOwnProperty,hm=fl.toString,_n=Me?Me.toStringTag:void 0;function pm(t){var e=mm.call(t,_n),n=t[_n];try{t[_n]=void 0;var r=!0}catch{}var i=hm.call(t);return r&&(e?t[_n]=n:delete t[_n]),i}var gm=Object.prototype,ym=gm.toString;function bm(t){return ym.call(t)}var xm="[object Null]",vm="[object Undefined]",go=Me?Me.toStringTag:void 0;function ct(t){return t==null?t===void 0?vm:xm:go&&go in Object(t)?pm(t):bm(t)}function ml(t,e){return function(n){return t(e(n))}}var Br=ml(Object.getPrototypeOf,Object);function Ue(t){return t!=null&&typeof t=="object"}var Sm="[object Object]",wm=Function.prototype,jm=Object.prototype,hl=wm.toString,Om=jm.hasOwnProperty,Em=hl.call(Object);function Et(t){if(!Ue(t)||ct(t)!=Sm)return!1;var e=Br(t);if(e===null)return!0;var n=Om.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&hl.call(n)==Em}function zi(t){const e={[Ae]:[],addError(n){this[Ae].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:zi(r)}),e);if(Et(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:zi(n[i])}),e)}return e}var we=Array.isArray,Am="[object Symbol]";function ir(t){return typeof t=="symbol"||Ue(t)&&ct(t)==Am}var Cm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_m=/^\w*$/;function xs(t,e){if(we(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||ir(t)?!0:_m.test(t)||!Cm.test(t)||e!=null&&t in Object(e)}function ne(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Im="[object AsyncFunction]",Tm="[object Function]",Nm="[object GeneratorFunction]",Pm="[object Proxy]";function sr(t){if(!ne(t))return!1;var e=ct(t);return e==Tm||e==Nm||e==Im||e==Pm}var oi=nt["__core-js_shared__"],yo=(function(){var t=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Fm(t){return!!yo&&yo in t}var $m=Function.prototype,Dm=$m.toString;function Bt(t){if(t!=null){try{return Dm.call(t)}catch{}try{return t+""}catch{}}return""}var Rm=/[\\^$.*+?()[\]{}|]/g,km=/^\[object .+?Constructor\]$/,Mm=Function.prototype,Um=Object.prototype,Lm=Mm.toString,Bm=Um.hasOwnProperty,Vm=RegExp("^"+Lm.call(Bm).replace(Rm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qm(t){if(!ne(t)||Fm(t))return!1;var e=sr(t)?Vm:km;return e.test(Bt(t))}function zm(t,e){return t?.[e]}function Vt(t,e){var n=zm(t,e);return qm(n)?n:void 0}var Yn=Vt(Object,"create");function Wm(){this.__data__=Yn?Yn(null):{},this.size=0}function Hm(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Km="__lodash_hash_undefined__",Gm=Object.prototype,Ym=Gm.hasOwnProperty;function Jm(t){var e=this.__data__;if(Yn){var n=e[t];return n===Km?void 0:n}return Ym.call(e,t)?e[t]:void 0}var Zm=Object.prototype,Xm=Zm.hasOwnProperty;function Qm(t){var e=this.__data__;return Yn?e[t]!==void 0:Xm.call(e,t)}var eh="__lodash_hash_undefined__";function th(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Yn&&e===void 0?eh:e,this}function Dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Dt.prototype.clear=Wm;Dt.prototype.delete=Hm;Dt.prototype.get=Jm;Dt.prototype.has=Qm;Dt.prototype.set=th;function nh(){this.__data__=[],this.size=0}function or(t,e){return t===e||t!==t&&e!==e}function Vr(t,e){for(var n=t.length;n--;)if(or(t[n][0],e))return n;return-1}var rh=Array.prototype,ih=rh.splice;function sh(t){var e=this.__data__,n=Vr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ih.call(e,n,1),--this.size,!0}function oh(t){var e=this.__data__,n=Vr(e,t);return n<0?void 0:e[n][1]}function ah(t){return Vr(this.__data__,t)>-1}function lh(t,e){var n=this.__data__,r=Vr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ut(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ut.prototype.clear=nh;ut.prototype.delete=sh;ut.prototype.get=oh;ut.prototype.has=ah;ut.prototype.set=lh;var Jn=Vt(nt,"Map");function ch(){this.size=0,this.__data__={hash:new Dt,map:new(Jn||ut),string:new Dt}}function uh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qr(t,e){var n=t.__data__;return uh(e)?n[typeof e=="string"?"string":"hash"]:n.map}function dh(t){var e=qr(this,t).delete(t);return this.size-=e?1:0,e}function fh(t){return qr(this,t).get(t)}function mh(t){return qr(this,t).has(t)}function hh(t,e){var n=qr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dt.prototype.clear=ch;dt.prototype.delete=dh;dt.prototype.get=fh;dt.prototype.has=mh;dt.prototype.set=hh;var ph="Expected a function";function vs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ph);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(vs.Cache||dt),n}vs.Cache=dt;var gh=500;function yh(t){var e=vs(t,function(r){return n.size===gh&&n.clear(),r}),n=e.cache;return e}var bh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xh=/\\(\\)?/g,pl=yh(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(bh,function(n,r,i,s){e.push(i?s.replace(xh,"$1"):r||n)}),e});function yn(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var bo=Me?Me.prototype:void 0,xo=bo?bo.toString:void 0;function gl(t){if(typeof t=="string")return t;if(we(t))return yn(t,gl)+"";if(ir(t))return xo?xo.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Ss(t){return t==null?"":gl(t)}function bn(t,e){return we(t)?t:xs(t,e)?[t]:pl(Ss(t))}function At(t){if(typeof t=="string"||ir(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function zr(t,e){e=bn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[At(e[n++])];return n&&n==r?t:void 0}function D(t,e,n){var r=t==null?void 0:zr(t,e);return r===void 0?n:r}const{getOwnPropertyNames:vh,getOwnPropertySymbols:Sh}=Object,{hasOwnProperty:wh}=Object.prototype;function ai(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function pr(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:s}=i,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);const l=t(n,r,i);return s.delete(n),s.delete(r),l}}function vo(t){return vh(t).concat(Sh(t))}const jh=Object.hasOwn||((t,e)=>wh.call(t,e)),Oh="__v",Eh="__o",Ah="_owner",{getOwnPropertyDescriptor:So,keys:wo}=Object,qt=Object.is||function(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n};function Ch(t,e){return t===e}function _h(t,e){return t.byteLength===e.byteLength&&$r(new Uint8Array(t),new Uint8Array(e))}function Ih(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function Th(t,e){return t.byteLength===e.byteLength&&$r(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Nh(t,e){return qt(t.getTime(),e.getTime())}function Ph(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function jo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const u=e.entries();let c=!1,d=0;for(;(a=u.next())&&!a.done;){if(i[d]){d++;continue}const h=o.value,g=a.value;if(n.equals(h[0],g[0],l,d,t,e,n)&&n.equals(h[1],g[1],h[0],g[0],t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}function Fh(t,e,n){const r=wo(t);let i=r.length;if(wo(e).length!==i)return!1;for(;i-- >0;)if(!yl(t,e,n,r[i]))return!1;return!0}function In(t,e,n){const r=vo(t);let i=r.length;if(vo(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!yl(t,e,n,s)||(o=So(t,s),a=So(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function $h(t,e){return qt(t.valueOf(),e.valueOf())}function Dh(t,e){return t.source===e.source&&t.flags===e.flags}function Oo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let o,a;for(;(o=s.next())&&!o.done;){const l=e.values();let u=!1,c=0;for(;(a=l.next())&&!a.done;){if(!i[c]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function $r(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Rh(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function yl(t,e,n,r){return(r===Ah||r===Eh||r===Oh)&&(t.$$typeof||e.$$typeof)?!0:jh(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const kh=Object.prototype.toString;function Mh(t){const e=Vh(t),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:u,getUnsupportedCustomComparator:c}=t;return function(h,g,f){if(h===g)return!0;if(h==null||g==null)return!1;const p=typeof h;if(p!==typeof g)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(h,g,f):p==="function"?i(h,g,f):!1;const y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return a(h,g,f);if(y===Array)return n(h,g,f);if(y===Date)return r(h,g,f);if(y===RegExp)return l(h,g,f);if(y===Map)return s(h,g,f);if(y===Set)return u(h,g,f);if(y===Promise)return!1;if(Array.isArray(h))return n(h,g,f);const x=kh.call(h),S=e[x];if(S)return S(h,g,f);const E=c&&c(h,g,f,x);return E?E(h,g,f):!1}}function Uh({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:_h,areArraysEqual:n?In:Ih,areDataViewsEqual:Th,areDatesEqual:Nh,areErrorsEqual:Ph,areFunctionsEqual:Ch,areMapsEqual:n?ai(jo,In):jo,areNumbersEqual:qt,areObjectsEqual:n?In:Fh,arePrimitiveWrappersEqual:$h,areRegExpsEqual:Dh,areSetsEqual:n?ai(Oo,In):Oo,areTypedArraysEqual:n?ai($r,In):$r,areUrlsEqual:Rh,getUnsupportedCustomComparator:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=pr(r.areArraysEqual),s=pr(r.areMapsEqual),o=pr(r.areObjectsEqual),a=pr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Lh(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Bh({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:u=t?new WeakMap:void 0,meta:c}=n();return e(a,l,{cache:u,equals:r,meta:c,strict:i})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return e(a,l,s)}}function Vh({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:g}){return{"[object Arguments]":l,"[object Array]":e,"[object ArrayBuffer]":t,"[object AsyncGeneratorFunction]":s,"[object BigInt]":a,"[object BigInt64Array]":h,"[object BigUint64Array]":h,"[object Boolean]":u,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":h,"[object Float32Array]":h,"[object Float64Array]":h,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":h,"[object Int16Array]":h,"[object Int32Array]":h,"[object Map]":o,"[object Number]":u,"[object Object]":(f,p,y)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,y),"[object RegExp]":c,"[object Set]":d,"[object String]":u,"[object URL]":g,"[object Uint8Array]":h,"[object Uint8ClampedArray]":h,"[object Uint16Array]":h,"[object Uint32Array]":h}}ft();ft({strict:!0});ft({circular:!0});ft({circular:!0,strict:!0});ft({createInternalComparator:()=>qt});ft({strict:!0,createInternalComparator:()=>qt});ft({circular:!0,createInternalComparator:()=>qt});ft({circular:!0,createInternalComparator:()=>qt,strict:!0});function ft(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=Uh(t),o=Mh(s),a=n?n(o):Lh(o);return Bh({circular:e,comparator:o,createState:r,equals:a,strict:i})}const ie=ft({circular:!0,createCustomConfig:()=>({areFunctionsEqual(t,e){return typeof e=="function"}})});var Tn={exports:{}},li,Eo;function bl(){if(Eo)return li;Eo=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),r=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(b){let v="",w=0,O=0;for(O=0;O<b.length;O++)if(w=b[O].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=b[O];break}for(O+=1;O<b.length;O++){if(w=b[O].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=b[O]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(b){return b.length=0,!0}function l(b,v,w){if(b.length){const O=s(b);if(O!=="")v.push(O);else return w.error=!0,!1;b.length=0}return!0}function u(b){let v=0;const w={error:!1,address:"",zone:""},O=[],C=[];let A=!1,_=!1,I=l;for(let T=0;T<b.length;T++){const P=b[T];if(!(P==="["||P==="]"))if(P===":"){if(A===!0&&(_=!0),!I(C,O,w))break;if(++v>7){w.error=!0;break}T>0&&b[T-1]===":"&&(A=!0),O.push(":");continue}else if(P==="%"){if(!I(C,O,w))break;I=a}else{C.push(P);continue}}return C.length&&(I===a?w.zone=C.join(""):_?O.push(C.join("")):O.push(s(C))),w.address=O.join(""),w}function c(b){if(d(b,":")<2)return{host:b,isIPV6:!1};const v=u(b);if(v.error)return{host:b,isIPV6:!1};{let w=v.address,O=v.address;return v.zone&&(w+="%"+v.zone,O+="%25"+v.zone),{host:w,isIPV6:!0,escapedHost:O}}}function d(b,v){let w=0;for(let O=0;O<b.length;O++)b[O]===v&&w++;return w}function h(b){let v=b;const w=[];let O=-1,C=0;for(;C=v.length;){if(C===1){if(v===".")break;if(v==="/"){w.push("/");break}else{w.push(v);break}}else if(C===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){w.push("/");break}}else if(C===3&&v==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),w.length!==0&&w.pop();continue}}if((O=v.indexOf("/",1))===-1){w.push(v);break}else w.push(v.slice(0,O)),v=v.slice(O)}return w.join("")}const g={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function y(b,v){const w=v?p:f;return w.lastIndex=0,b.replace(w,O=>g[O])}function x(b,v=!1){if(b.indexOf("%")===-1)return b;let w="";for(let O=0;O<b.length;O++){if(b[O]==="%"&&O+2<b.length){const C=b.slice(O+1,O+3);if(n(C)){const A=C.toUpperCase(),_=String.fromCharCode(parseInt(A,16));v&&r(_)?w+=_:w+="%"+A,O+=2;continue}}w+=b[O]}return w}function S(b){let v="";for(let w=0;w<b.length;w++){if(b[w]==="%"&&w+2<b.length){const O=b.slice(w+1,w+3);if(n(O)){const C=O.toUpperCase(),A=String.fromCharCode(parseInt(C,16));A!=="."&&r(A)?v+=A:v+="%"+C,w+=2;continue}}i(b[w])?v+=b[w]:v+=escape(b[w])}return v}function E(b){let v="";for(let w=0;w<b.length;w++){if(b[w]==="%"&&w+2<b.length){const O=b.slice(w+1,w+3);if(n(O)){v+="%"+O.toUpperCase(),w+=2;continue}}v+=escape(b[w])}return v}function j(b){const v=[];if(b.userinfo!==void 0&&(v.push(b.userinfo),v.push("@")),b.host!==void 0){let w=unescape(b.host);if(!e(w)){const O=c(w);O.isIPV6===!0?w=`[${O.escapedHost}]`:w=y(w,!1)}v.push(w)}return(typeof b.port=="number"||typeof b.port=="string")&&(v.push(":"),v.push(String(b.port))),v.length?v.join(""):void 0}return li={nonSimpleDomain:o,recomposeAuthority:j,reescapeHostDelimiters:y,normalizePercentEncoding:x,normalizePathEncoding:S,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:e,isUUID:t,normalizeIPv6:c,stringArrayToHexStripped:s},li}var ci,Ao;function qh(){if(Ao)return ci;Ao=1;const{isUUID:t}=bl(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(b){return n.indexOf(b)!==-1}function i(b){return b.secure===!0?!0:b.secure===!1?!1:b.scheme?b.scheme.length===3&&(b.scheme[0]==="w"||b.scheme[0]==="W")&&(b.scheme[1]==="s"||b.scheme[1]==="S")&&(b.scheme[2]==="s"||b.scheme[2]==="S"):!1}function s(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function o(b){const v=String(b.scheme).toLowerCase()==="https";return(b.port===(v?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function a(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function l(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){const[v,w]=b.resourceName.split("?");b.path=v&&v!=="/"?v:void 0,b.query=w,b.resourceName=void 0}return b.fragment=void 0,b}function u(b,v){if(!b.path)return b.error="URN can not be parsed",b;const w=b.path.match(e);if(w){const O=v.scheme||b.scheme||"urn";b.nid=w[1].toLowerCase(),b.nss=w[2];const C=`${O}:${v.nid||b.nid}`,A=j(C);b.path=void 0,A&&(b=A.parse(b,v))}else b.error=b.error||"URN can not be parsed.";return b}function c(b,v){if(b.nid===void 0)throw new Error("URN without nid cannot be serialized");const w=v.scheme||b.scheme||"urn",O=b.nid.toLowerCase(),C=`${w}:${v.nid||O}`,A=j(C);A&&(b=A.serialize(b,v));const _=b,I=b.nss;return _.path=`${O||v.nid}:${I}`,v.skipEscape=!0,_}function d(b,v){const w=b;return w.uuid=w.nss,w.nss=void 0,!v.tolerant&&(!w.uuid||!t(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function h(b){const v=b;return v.nss=(b.uuid||"").toLowerCase(),v}const g={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:g.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},y={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},E={http:g,https:f,ws:p,wss:y,urn:{scheme:"urn",parse:u,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(E,null);function j(b){return b&&(E[b]||E[b.toLowerCase()])||void 0}return ci={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:j},ci}var Co;function zh(){if(Co)return Tn.exports;Co=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=bl(),{SCHEMES:u,getSchemeHandler:c}=qh();function d(O,C){return typeof O=="string"?O=j(O,C):typeof O=="object"&&(O=E(p(O,C),C)),O}function h(O,C,A){const _=A?Object.assign({scheme:"null"},A):{scheme:"null"},I=g(E(O,_),E(C,_),_,!0);return _.skipEscape=!0,p(I,_)}function g(O,C,A,_){const I={};return _||(O=E(p(O,A),A),C=E(p(C,A),A)),A=A||{},!A.tolerant&&C.scheme?(I.scheme=C.scheme,I.userinfo=C.userinfo,I.host=C.host,I.port=C.port,I.path=e(C.path||""),I.query=C.query):(C.userinfo!==void 0||C.host!==void 0||C.port!==void 0?(I.userinfo=C.userinfo,I.host=C.host,I.port=C.port,I.path=e(C.path||""),I.query=C.query):(C.path?(C.path[0]==="/"?I.path=e(C.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?I.path="/"+C.path:O.path?I.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+C.path:I.path=C.path,I.path=e(I.path)),I.query=C.query):(I.path=O.path,C.query!==void 0?I.query=C.query:I.query=O.query),I.userinfo=O.userinfo,I.host=O.host,I.port=O.port),I.scheme=O.scheme),I.fragment=C.fragment,I}function f(O,C,A){const _=v(O,A),I=v(C,A);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(O,C){const A={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},_=Object.assign({},C),I=[],T=c(_.scheme||A.scheme);T&&T.serialize&&T.serialize(A,_),A.path!==void 0&&(_.skipEscape?A.path=r(A.path):(A.path=s(A.path),A.scheme!==void 0&&(A.path=A.path.split("%3A").join(":")))),_.reference!=="suffix"&&A.scheme&&I.push(A.scheme,":");const P=n(A);if(P!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(P),A.path&&A.path[0]!=="/"&&I.push("/")),A.path!==void 0){let F=A.path;!_.absolutePath&&(!T||!T.absolutePath)&&(F=e(F)),P===void 0&&F[0]==="/"&&F[1]==="/"&&(F="/%2F"+F.slice(2)),I.push(F)}return A.query!==void 0&&I.push("?",A.query),A.fragment!==void 0&&I.push("#",A.fragment),I.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function x(O,C){if(C[2]!==void 0&&O.path&&O.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof O.port=="number"&&(O.port<0||O.port>65535))return"URI port is malformed."}function S(O,C){const A=Object.assign({},C),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;A.reference==="suffix"&&(A.scheme?O=A.scheme+":"+O:O="//"+O);const P=O.match(y);if(P){_.scheme=P[1],_.userinfo=P[3],_.host=P[4],_.port=parseInt(P[5],10),_.path=P[6]||"",_.query=P[7],_.fragment=P[8],isNaN(_.port)&&(_.port=P[5]);const F=x(_,P);if(F!==void 0&&(_.error=_.error||F,I=!0),_.host)if(a(_.host)===!1){const M=t(_.host);_.host=M.host.toLowerCase(),T=M.isIPV6}else T=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",A.reference&&A.reference!=="suffix"&&A.reference!==_.reference&&(_.error=_.error||"URI is not a "+A.reference+" reference.");const $=c(A.scheme||_.scheme);if(!A.unicodeSupport&&(!$||!$.unicodeSupport)&&_.host&&(A.domainHost||$&&$.domainHost)&&T===!1&&l(_.host))try{_.host=new URL("http://"+_.host).hostname}catch(k){_.error=_.error||"Host's domain name can not be converted to ASCII: "+k}if((!$||$&&!$.skipNormalize)&&(O.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=o(unescape(_.host),T))),_.path&&(_.path=i(_.path)),_.fragment))try{_.fragment=encodeURI(decodeURIComponent(_.fragment))}catch{_.error=_.error||"URI malformed"}$&&$.parse&&$.parse(_,A)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function E(O,C){return S(O,C).parsed}function j(O,C){return b(O,C).normalized}function b(O,C){const{parsed:A,malformedAuthorityOrPort:_}=S(O,C);return{normalized:_?O:p(A,C),malformedAuthorityOrPort:_}}function v(O,C){if(typeof O=="string"){const{normalized:A,malformedAuthorityOrPort:_}=b(O,C);return _?void 0:A}if(typeof O=="object")return p(O,C)}const w={SCHEMES:u,normalize:d,resolve:h,resolveComponent:g,equal:f,serialize:p,parse:E};return Tn.exports=w,Tn.exports.default=w,Tn.exports.fastUri=w,Tn.exports}var Wh=zh();const ws=us(Wh);var Nn={},_o;function Hh(){if(_o)return Nn;_o=1;var t=/~/,e=/~[01]/g;function n(u){switch(u){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+u)}function r(u){return t.test(u)?u.replace(e,n):u}function i(u,c,d){for(var h,g,f=1,p=c.length;f<p;){if(c[f]==="constructor"||c[f]==="prototype"||c[f]==="__proto__")return u;if(h=r(c[f++]),g=p>f,typeof u[h]>"u"&&(Array.isArray(u)&&h==="-"&&(h=u.length),g&&(c[f]!==""&&c[f]<1/0||c[f]==="-"?u[h]=[]:u[h]={})),!g)break;u=u[h]}var y=u[h];return d===void 0?delete u[h]:u[h]=d,y}function s(u){if(typeof u=="string"){if(u=u.split("/"),u[0]==="")return u;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(u)){for(const c of u)if(typeof c!="string"&&typeof c!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return u}throw new Error("Invalid JSON pointer.")}function o(u,c){if(typeof u!="object")throw new Error("Invalid input object.");c=s(c);var d=c.length;if(d===1)return u;for(var h=1;h<d;){if(u=u[r(c[h++])],d===h)return u;if(typeof u!="object"||u===null)return}}function a(u,c,d){if(typeof u!="object")throw new Error("Invalid input object.");if(c=s(c),c.length===0)throw new Error("Invalid JSON pointer for set.");return i(u,c,d)}function l(u){var c=s(u);return{get:function(d){return o(d,c)},set:function(d,h){return a(d,c,h)}}}return Nn.get=o,Nn.set=a,Nn.compile=l,Nn}var Kh=Hh();const ui=us(Kh);var Gh=Object.prototype;function Wr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Gh;return t===n}var Yh=ml(Object.keys,Object),Jh=Object.prototype,Zh=Jh.hasOwnProperty;function xl(t){if(!Wr(t))return Yh(t);var e=[];for(var n in Object(t))Zh.call(t,n)&&n!="constructor"&&e.push(n);return e}var Wi=Vt(nt,"DataView"),Hi=Vt(nt,"Promise"),on=Vt(nt,"Set"),Ki=Vt(nt,"WeakMap"),Io="[object Map]",Xh="[object Object]",To="[object Promise]",No="[object Set]",Po="[object WeakMap]",Fo="[object DataView]",Qh=Bt(Wi),ep=Bt(Jn),tp=Bt(Hi),np=Bt(on),rp=Bt(Ki),Re=ct;(Wi&&Re(new Wi(new ArrayBuffer(1)))!=Fo||Jn&&Re(new Jn)!=Io||Hi&&Re(Hi.resolve())!=To||on&&Re(new on)!=No||Ki&&Re(new Ki)!=Po)&&(Re=function(t){var e=ct(t),n=e==Xh?t.constructor:void 0,r=n?Bt(n):"";if(r)switch(r){case Qh:return Fo;case ep:return Io;case tp:return To;case np:return No;case rp:return Po}return e});var ip="[object Arguments]";function $o(t){return Ue(t)&&ct(t)==ip}var vl=Object.prototype,sp=vl.hasOwnProperty,op=vl.propertyIsEnumerable,ln=$o((function(){return arguments})())?$o:function(t){return Ue(t)&&sp.call(t,"callee")&&!op.call(t,"callee")},ap=9007199254740991;function js(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ap}function zt(t){return t!=null&&js(t.length)&&!sr(t)}function lp(){return!1}var Sl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Do=Sl&&typeof module=="object"&&module&&!module.nodeType&&module,cp=Do&&Do.exports===Sl,Ro=cp?nt.Buffer:void 0,up=Ro?Ro.isBuffer:void 0,Rt=up||lp,dp="[object Arguments]",fp="[object Array]",mp="[object Boolean]",hp="[object Date]",pp="[object Error]",gp="[object Function]",yp="[object Map]",bp="[object Number]",xp="[object Object]",vp="[object RegExp]",Sp="[object Set]",wp="[object String]",jp="[object WeakMap]",Op="[object ArrayBuffer]",Ep="[object DataView]",Ap="[object Float32Array]",Cp="[object Float64Array]",_p="[object Int8Array]",Ip="[object Int16Array]",Tp="[object Int32Array]",Np="[object Uint8Array]",Pp="[object Uint8ClampedArray]",Fp="[object Uint16Array]",$p="[object Uint32Array]",he={};he[Ap]=he[Cp]=he[_p]=he[Ip]=he[Tp]=he[Np]=he[Pp]=he[Fp]=he[$p]=!0;he[dp]=he[fp]=he[Op]=he[mp]=he[Ep]=he[hp]=he[pp]=he[gp]=he[yp]=he[bp]=he[xp]=he[vp]=he[Sp]=he[wp]=he[jp]=!1;function Dp(t){return Ue(t)&&js(t.length)&&!!he[ct(t)]}function Os(t){return function(e){return t(e)}}var wl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=wl&&typeof module=="object"&&module&&!module.nodeType&&module,Rp=Vn&&Vn.exports===wl,di=Rp&&dl.process,cn=(function(){try{var t=Vn&&Vn.require&&Vn.require("util").types;return t||di&&di.binding&&di.binding("util")}catch{}})(),ko=cn&&cn.isTypedArray,ar=ko?Os(ko):Dp,kp="[object Map]",Mp="[object Set]",Up=Object.prototype,Lp=Up.hasOwnProperty;function ge(t){if(t==null)return!0;if(zt(t)&&(we(t)||typeof t=="string"||typeof t.splice=="function"||Rt(t)||ar(t)||ln(t)))return!t.length;var e=Re(t);if(e==kp||e==Mp)return!t.size;if(Wr(t))return!xl(t).length;for(var n in t)if(Lp.call(t,n))return!1;return!0}function Bp(){this.__data__=new ut,this.size=0}function Vp(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function qp(t){return this.__data__.get(t)}function zp(t){return this.__data__.has(t)}var Wp=200;function Hp(t,e){var n=this.__data__;if(n instanceof ut){var r=n.__data__;if(!Jn||r.length<Wp-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new dt(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new ut(t);this.size=e.size}We.prototype.clear=Bp;We.prototype.delete=Vp;We.prototype.get=qp;We.prototype.has=zp;We.prototype.set=Hp;function Es(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Dr=(function(){try{var t=Vt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function As(t,e,n){e=="__proto__"&&Dr?Dr(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Kp=Object.prototype,Gp=Kp.hasOwnProperty;function Cs(t,e,n){var r=t[e];(!(Gp.call(t,e)&&or(r,n))||n===void 0&&!(e in t))&&As(t,e,n)}function xn(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?As(n,a,l):Cs(n,a,l)}return n}function jl(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Yp=9007199254740991,Jp=/^(?:0|[1-9]\d*)$/;function Hr(t,e){var n=typeof t;return e=e??Yp,!!e&&(n=="number"||n!="symbol"&&Jp.test(t))&&t>-1&&t%1==0&&t<e}var Zp=Object.prototype,Xp=Zp.hasOwnProperty;function Ol(t,e){var n=we(t),r=!n&&ln(t),i=!n&&!r&&Rt(t),s=!n&&!r&&!i&&ar(t),o=n||r||i||s,a=o?jl(t.length,String):[],l=a.length;for(var u in t)(e||Xp.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Hr(u,l)))&&a.push(u);return a}function ze(t){return zt(t)?Ol(t):xl(t)}function Qp(t,e){return t&&xn(e,ze(e),t)}function eg(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var tg=Object.prototype,ng=tg.hasOwnProperty;function rg(t){if(!ne(t))return eg(t);var e=Wr(t),n=[];for(var r in t)r=="constructor"&&(e||!ng.call(t,r))||n.push(r);return n}function lr(t){return zt(t)?Ol(t,!0):rg(t)}function ig(t,e){return t&&xn(e,lr(e),t)}var El=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mo=El&&typeof module=="object"&&module&&!module.nodeType&&module,sg=Mo&&Mo.exports===El,Uo=sg?nt.Buffer:void 0,Lo=Uo?Uo.allocUnsafe:void 0;function Al(t,e){if(e)return t.slice();var n=t.length,r=Lo?Lo(n):new t.constructor(n);return t.copy(r),r}function _s(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function og(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Cl(){return[]}var ag=Object.prototype,lg=ag.propertyIsEnumerable,Bo=Object.getOwnPropertySymbols,Is=Bo?function(t){return t==null?[]:(t=Object(t),og(Bo(t),function(e){return lg.call(t,e)}))}:Cl;function cg(t,e){return xn(t,Is(t),e)}function Ts(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var ug=Object.getOwnPropertySymbols,_l=ug?function(t){for(var e=[];t;)Ts(e,Is(t)),t=Br(t);return e}:Cl;function dg(t,e){return xn(t,_l(t),e)}function Il(t,e,n){var r=e(t);return we(t)?r:Ts(r,n(t))}function Gi(t){return Il(t,ze,Is)}function Ns(t){return Il(t,lr,_l)}var fg=Object.prototype,mg=fg.hasOwnProperty;function hg(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&mg.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Rr=nt.Uint8Array;function Ps(t){var e=new t.constructor(t.byteLength);return new Rr(e).set(new Rr(t)),e}function pg(t,e){var n=e?Ps(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var gg=/\w*$/;function yg(t){var e=new t.constructor(t.source,gg.exec(t));return e.lastIndex=t.lastIndex,e}var Vo=Me?Me.prototype:void 0,qo=Vo?Vo.valueOf:void 0;function bg(t){return qo?Object(qo.call(t)):{}}function Tl(t,e){var n=e?Ps(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var xg="[object Boolean]",vg="[object Date]",Sg="[object Map]",wg="[object Number]",jg="[object RegExp]",Og="[object Set]",Eg="[object String]",Ag="[object Symbol]",Cg="[object ArrayBuffer]",_g="[object DataView]",Ig="[object Float32Array]",Tg="[object Float64Array]",Ng="[object Int8Array]",Pg="[object Int16Array]",Fg="[object Int32Array]",$g="[object Uint8Array]",Dg="[object Uint8ClampedArray]",Rg="[object Uint16Array]",kg="[object Uint32Array]";function Mg(t,e,n){var r=t.constructor;switch(e){case Cg:return Ps(t);case xg:case vg:return new r(+t);case _g:return pg(t,n);case Ig:case Tg:case Ng:case Pg:case Fg:case $g:case Dg:case Rg:case kg:return Tl(t,n);case Sg:return new r;case wg:case Eg:return new r(t);case jg:return yg(t);case Og:return new r;case Ag:return bg(t)}}var zo=Object.create,Nl=(function(){function t(){}return function(e){if(!ne(e))return{};if(zo)return zo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Pl(t){return typeof t.constructor=="function"&&!Wr(t)?Nl(Br(t)):{}}var Ug="[object Map]";function Lg(t){return Ue(t)&&Re(t)==Ug}var Wo=cn&&cn.isMap,Bg=Wo?Os(Wo):Lg,Vg="[object Set]";function qg(t){return Ue(t)&&Re(t)==Vg}var Ho=cn&&cn.isSet,zg=Ho?Os(Ho):qg,Wg=1,Hg=2,Kg=4,Fl="[object Arguments]",Gg="[object Array]",Yg="[object Boolean]",Jg="[object Date]",Zg="[object Error]",$l="[object Function]",Xg="[object GeneratorFunction]",Qg="[object Map]",ey="[object Number]",Dl="[object Object]",ty="[object RegExp]",ny="[object Set]",ry="[object String]",iy="[object Symbol]",sy="[object WeakMap]",oy="[object ArrayBuffer]",ay="[object DataView]",ly="[object Float32Array]",cy="[object Float64Array]",uy="[object Int8Array]",dy="[object Int16Array]",fy="[object Int32Array]",my="[object Uint8Array]",hy="[object Uint8ClampedArray]",py="[object Uint16Array]",gy="[object Uint32Array]",me={};me[Fl]=me[Gg]=me[oy]=me[ay]=me[Yg]=me[Jg]=me[ly]=me[cy]=me[uy]=me[dy]=me[fy]=me[Qg]=me[ey]=me[Dl]=me[ty]=me[ny]=me[ry]=me[iy]=me[my]=me[hy]=me[py]=me[gy]=!0;me[Zg]=me[$l]=me[sy]=!1;function qn(t,e,n,r,i,s){var o,a=e&Wg,l=e&Hg,u=e&Kg;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!ne(t))return t;var c=we(t);if(c){if(o=hg(t),!a)return _s(t,o)}else{var d=Re(t),h=d==$l||d==Xg;if(Rt(t))return Al(t,a);if(d==Dl||d==Fl||h&&!i){if(o=l||h?{}:Pl(t),!a)return l?dg(t,ig(o,t)):cg(t,Qp(o,t))}else{if(!me[d])return i?t:{};o=Mg(t,d,a)}}s||(s=new We);var g=s.get(t);if(g)return g;s.set(t,o),zg(t)?t.forEach(function(y){o.add(qn(y,e,n,y,t,s))}):Bg(t)&&t.forEach(function(y,x){o.set(x,qn(y,e,n,x,t,s))});var f=u?l?Ns:Gi:l?lr:ze,p=c?void 0:f(t);return Es(p||t,function(y,x){p&&(x=y,y=t[x]),Cs(o,x,qn(y,e,n,x,t,s))}),o}function Rl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function yy(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function by(t,e){return e.length<2?t:zr(t,yy(e,0,-1))}var xy=Object.prototype,vy=xy.hasOwnProperty;function kl(t,e){e=bn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=At(e[n]);if(i==="__proto__"&&!vy.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=by(t,e);return s==null||delete s[At(Rl(e))]}function Sy(t){return Et(t)?void 0:t}var Ko=Me?Me.isConcatSpreadable:void 0;function wy(t){return we(t)||ln(t)||!!(Ko&&t&&t[Ko])}function cr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=wy),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?cr(a,e-1,n,r,i):Ts(i,a):r||(i[i.length]=a)}return i}function Yi(t){var e=t==null?0:t.length;return e?cr(t,1):[]}function jy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var Go=Math.max;function Ml(t,e,n){return e=Go(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Go(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),jy(t,this,a)}}function Oy(t){return function(){return t}}function Kr(t){return t}var Ey=Dr?function(t,e){return Dr(t,"toString",{configurable:!0,enumerable:!1,value:Oy(e),writable:!0})}:Kr,Ay=800,Cy=16,_y=Date.now;function Iy(t){var e=0,n=0;return function(){var r=_y(),i=Cy-(r-n);if(n=r,i>0){if(++e>=Ay)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Ul=Iy(Ey);function Ll(t){return Ul(Ml(t,void 0,Yi),t+"")}var Ty=1,Ny=2,Py=4,un=Ll(function(t,e){var n={};if(t==null)return n;var r=!1;e=yn(e,function(s){return s=bn(s,t),r||(r=s.length>1),s}),xn(t,Ns(t),n),r&&(n=qn(n,Ty|Ny|Py,Sy));for(var i=e.length;i--;)kl(n,e[i]);return n});function kr(t,e){if(de in t&&ws.equal(t[de],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(ne(r)){const i=kr(r,e);if(i!==void 0)return i}}else if(ne(n)){const r=kr(n,e);if(r!==void 0)return r}}function Ji(t,e){const n=D(t,de,e);let r=t;ue in r&&(r={...r,[ue]:ws.resolve(n,r[ue])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>ne(o)?Ji(o,n):o)}:ne(s)&&(r={...r,[i]:Ji(s,n)});return r}function Fs(t,e){const n=e[t];return[un(e,[t]),n]}function Bl(t,e={},n=[],r=D(e,[de])){const i=t||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||de in e&&e[de]===o?s=ui.get(e,l):e[Dn]===Or&&(s=kr(e,o.replace(/\/$/,"")),s!==void 0&&(s=ui.get(s,l)))}else if(e[Dn]===Or){const l=o?ws.resolve(o,i):i,[u,...c]=l.replace(/#\/?$/,"").split("#");s=kr(e,u.replace(/\/$/,"")),s!==void 0&&(o=s[de],ge(c)||(s=ui.get(s,decodeURIComponent(c.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const a=s[ue];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...h]=n,g=[...h,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${g}`)}const[l,u]=Fs(ue,s),c=Bl(u,e,[...n,i],o);return Object.keys(l).length>0?e[Dn]===dm||e[Dn]===Or?{[Ot]:[l,c]}:{...l,...c}:c}return s}function Zn(t,e={},n=D(e,[de])){return Bl(t,e,[],n)}var Fy=Object.prototype,$y=Fy.hasOwnProperty;function Dy(t,e){return t!=null&&$y.call(t,e)}function Vl(t,e,n){e=bn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=At(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&js(i)&&Hr(o,i)&&(we(t)||ln(t)))}function X(t,e){return t!=null&&Vl(t,e,Dy)}var Ry="[object String]";function Ct(t){return typeof t=="string"||!we(t)&&Ue(t)&&ct(t)==Ry}function He(t){let e;const n=D(t,am);return Ct(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}var ky=1/0;function My(t){var e=t==null?0:t.length;return e?cr(t,ky):[]}function Zi(t,e,n){(n!==void 0&&!or(t[e],n)||n===void 0&&!(e in t))&&As(t,e,n)}function Uy(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var ql=Uy();function Xn(t){return Ue(t)&&zt(t)}function Xi(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Ly(t){return xn(t,lr(t))}function By(t,e,n,r,i,s,o){var a=Xi(t,n),l=Xi(e,n),u=o.get(l);if(u){Zi(t,n,u);return}var c=s?s(a,l,n+"",t,e,o):void 0,d=c===void 0;if(d){var h=we(l),g=!h&&Rt(l),f=!h&&!g&&ar(l);c=l,h||g||f?we(a)?c=a:Xn(a)?c=_s(a):g?(d=!1,c=Al(l,!0)):f?(d=!1,c=Tl(l,!0)):c=[]:Et(l)||ln(l)?(c=a,ln(a)?c=Ly(a):(!ne(a)||sr(a))&&(c=Pl(l))):d=!1}d&&(o.set(l,c),i(c,l,r,s,o),o.delete(l)),Zi(t,n,c)}function zl(t,e,n,r,i){t!==e&&ql(e,function(s,o){if(i||(i=new We),ne(s))By(t,e,o,n,zl,r,i);else{var a=r?r(Xi(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Zi(t,o,a)}},lr)}function Gr(t,e){return Ul(Ml(t,e,Kr),t+"")}function Vy(t,e,n){if(!ne(n))return!1;var r=typeof e;return(r=="number"?zt(n)&&Hr(e,n.length):r=="string"&&e in n)?or(n[e],t):!1}function qy(t){return Gr(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&Vy(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var zy=qy(function(t,e,n){zl(t,e,n)});function $s(t,e,n,r){if(!ne(t))return t;e=bn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=At(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var c=a[l];u=r?r(c,l,a):void 0,u===void 0&&(u=ne(c)?c:Hr(e[i+1])?[]:{})}Cs(a,l,u),a=a[l]}return t}function ce(t,e,n){return t==null?t:$s(t,e,n)}function Wl(t){return typeof t=="function"?t:Kr}var Wy=/\s/;function Hy(t){for(var e=t.length;e--&&Wy.test(t.charAt(e)););return e}var Ky=/^\s+/;function Gy(t){return t&&t.slice(0,Hy(t)+1).replace(Ky,"")}var Yo=NaN,Yy=/^[-+]0x[0-9a-f]+$/i,Jy=/^0b[01]+$/i,Zy=/^0o[0-7]+$/i,Xy=parseInt;function Qy(t){if(typeof t=="number")return t;if(ir(t))return Yo;if(ne(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ne(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Gy(t);var n=Jy.test(t);return n||Zy.test(t)?Xy(t.slice(2),n?2:8):Yy.test(t)?Yo:+t}var Jo=1/0,eb=17976931348623157e292;function tb(t){if(!t)return t===0?t:0;if(t=Qy(t),t===Jo||t===-Jo){var e=t<0?-1:1;return e*eb}return t===t?t:0}function Hl(t){var e=tb(t),n=e%1;return e===e?n?e-n:e:0}var nb=9007199254740991,fi=4294967295,rb=Math.min;function Kl(t,e){if(t=Hl(t),t<1||t>nb)return[];var n=fi,r=rb(t,fi);e=Wl(e),t-=fi;for(var i=jl(r,e);++n<t;)e(n);return i}function Gl(t,e){return t&&ql(t,e,ze)}var ib="__lodash_hash_undefined__";function sb(t){return this.__data__.set(t,ib),this}function ob(t){return this.__data__.has(t)}function kt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new dt;++e<n;)this.add(t[e])}kt.prototype.add=kt.prototype.push=sb;kt.prototype.has=ob;function ab(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Qn(t,e){return t.has(e)}var lb=1,cb=2;function Yl(t,e,n,r,i,s){var o=n&lb,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var d=-1,h=!0,g=n&cb?new kt:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var f=t[d],p=e[d];if(r)var y=o?r(p,f,d,e,t,s):r(f,p,d,t,e,s);if(y!==void 0){if(y)continue;h=!1;break}if(g){if(!ab(e,function(x,S){if(!Qn(g,S)&&(f===x||i(f,x,n,r,s)))return g.push(S)})){h=!1;break}}else if(!(f===p||i(f,p,n,r,s))){h=!1;break}}return s.delete(t),s.delete(e),h}function ub(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Ds(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var db=1,fb=2,mb="[object Boolean]",hb="[object Date]",pb="[object Error]",gb="[object Map]",yb="[object Number]",bb="[object RegExp]",xb="[object Set]",vb="[object String]",Sb="[object Symbol]",wb="[object ArrayBuffer]",jb="[object DataView]",Zo=Me?Me.prototype:void 0,mi=Zo?Zo.valueOf:void 0;function Ob(t,e,n,r,i,s,o){switch(n){case jb:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case wb:return!(t.byteLength!=e.byteLength||!s(new Rr(t),new Rr(e)));case mb:case hb:case yb:return or(+t,+e);case pb:return t.name==e.name&&t.message==e.message;case bb:case vb:return t==e+"";case gb:var a=ub;case xb:var l=r&db;if(a||(a=Ds),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=fb,o.set(t,e);var c=Yl(a(t),a(e),r,i,s,o);return o.delete(t),c;case Sb:if(mi)return mi.call(t)==mi.call(e)}return!1}var Eb=1,Ab=Object.prototype,Cb=Ab.hasOwnProperty;function _b(t,e,n,r,i,s){var o=n&Eb,a=Gi(t),l=a.length,u=Gi(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:Cb.call(e,h)))return!1}var g=s.get(t),f=s.get(e);if(g&&f)return g==e&&f==t;var p=!0;s.set(t,e),s.set(e,t);for(var y=o;++d<l;){h=a[d];var x=t[h],S=e[h];if(r)var E=o?r(S,x,h,e,t,s):r(x,S,h,t,e,s);if(!(E===void 0?x===S||i(x,S,n,r,s):E)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var j=t.constructor,b=e.constructor;j!=b&&"constructor"in t&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof b=="function"&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(e),p}var Ib=1,Xo="[object Arguments]",Qo="[object Array]",gr="[object Object]",Tb=Object.prototype,ea=Tb.hasOwnProperty;function Nb(t,e,n,r,i,s){var o=we(t),a=we(e),l=o?Qo:Re(t),u=a?Qo:Re(e);l=l==Xo?gr:l,u=u==Xo?gr:u;var c=l==gr,d=u==gr,h=l==u;if(h&&Rt(t)){if(!Rt(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new We),o||ar(t)?Yl(t,e,n,r,i,s):Ob(t,e,l,n,r,i,s);if(!(n&Ib)){var g=c&&ea.call(t,"__wrapped__"),f=d&&ea.call(e,"__wrapped__");if(g||f){var p=g?t.value():t,y=f?e.value():e;return s||(s=new We),i(p,y,n,r,s)}}return h?(s||(s=new We),_b(t,e,n,r,i,s)):!1}function Yr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ue(t)&&!Ue(e)?t!==t&&e!==e:Nb(t,e,n,r,Yr,i)}var Pb=1,Fb=2;function $b(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],u=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var c=new We,d;if(!(d===void 0?Yr(u,l,Pb|Fb,r,c):d))return!1}}return!0}function Jl(t){return t===t&&!ne(t)}function Db(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Jl(i)]}return e}function Zl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Rb(t){var e=Db(t);return e.length==1&&e[0][2]?Zl(e[0][0],e[0][1]):function(n){return n===t||$b(n,t,e)}}function kb(t,e){return t!=null&&e in Object(t)}function Xl(t,e){return t!=null&&Vl(t,e,kb)}var Mb=1,Ub=2;function Lb(t,e){return xs(t)&&Jl(e)?Zl(At(t),e):function(n){var r=D(n,t);return r===void 0&&r===e?Xl(n,t):Yr(e,r,Mb|Ub)}}function Bb(t){return function(e){return e?.[t]}}function Vb(t){return function(e){return zr(e,t)}}function qb(t){return xs(t)?Bb(At(t)):Vb(t)}function Rs(t){return typeof t=="function"?t:t==null?Kr:typeof t=="object"?we(t)?Lb(t[0],t[1]):Rb(t):qb(t)}function zb(t,e,n){var r=we(t),i=r||Rt(t)||ar(t);if(e=Rs(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:ne(t)?n=sr(s)?Nl(Br(t)):{}:n={}}return(i?Es:Gl)(t,function(o,a,l){return e(n,o,a,l)}),n}function Wb(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Hb(t){return t!==t}function Kb(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Ql(t,e,n){return e===e?Kb(t,e,n):Wb(t,Hb,n)}function ks(t,e){var n=t==null?0:t.length;return!!n&&Ql(t,e,0)>-1}function Er(){}var Gb=1/0,Yb=on&&1/Ds(new on([,-0]))[1]==Gb?function(t){return new on(t)}:Er,Jb=200;function ec(t,e,n){var r=-1,i=ks,s=t.length,o=!0,a=[],l=a;if(s>=Jb){var u=Yb(t);if(u)return Ds(u);o=!1,i=Qn,l=new kt}else l=a;e:for(;++r<s;){var c=t[r],d=c;if(c=c!==0?c:0,o&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function tc(t){return t&&t.length?ec(t):[]}function er(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":typeof t=="number"&&!Number.isNaN(t)?"number":typeof t=="object"?"object":"string"}var Zb=Gr(function(t){return ec(cr(t,1,Xn,!0))});function Le(t){let{type:e}=t;return!e&&t.const?er(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties||t.patternProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(n=>n!=="null"):e=e[0]),e)}function at(t,e){const n={...t};return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];return t&&i in t&&q(o)?r[i]=at(s,o):t&&e&&(Le(t)==="object"||Le(e)==="object")&&i===ol&&Array.isArray(s)&&Array.isArray(o)?r[i]=Zb(s,o):r[i]=o,r},n)}var Xb="[object Number]";function nc(t){return typeof t=="number"||Ue(t)&&ct(t)==Xb}function rc(t,e,n){var r;if(t&&n){const i=D(t,n);if(i===void 0)return;for(let s=0;s<e.length;s+=1){const o=e[s],a=D(o,[se,n],{});if(a.type!=="object"&&a.type!=="array"&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Mr(t,e,n,r,i){if(e===void 0)return 0;const s=rc(e,n,i);if(nc(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&X(a,[se,i])){const l=D(e,i),u=D(a,[se,i],{});if(t.isValid(u,l,r))return o}else if(a[se]){const l={anyOf:Object.keys(a[se]).map(c=>({required:[c]}))};let u;if(a.anyOf){const{...c}=a;c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u={...a,...l};if(delete u.required,t.isValid(u,e,r))return o}else if(t.isValid(a,e,r))return o}return 0}const Qb=Object.prototype;function Rn(t){for(const e in t)if(Qb.hasOwnProperty.call(t,e))return!1;return!0}const e0=["array","boolean","integer","null","number","object","string"];new Set(e0);const t0=["$defs","definitions","properties","patternProperties","dependencies"];new Set(t0);const n0=["items","allOf","oneOf","anyOf"];new Set(n0);const r0=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(r0);function Ar(t){return typeof t=="object"}function Ye(t){return Ar(t)?Rn(t):t===!0}function nn(t,e){return t<e?-1:t>e?1:0}function hi(t,e){const n=t.length;if(n===0)return e;let r=e.length;if(r===0)return t;if(n<r){const s=t;t=e,e=s,r=n}const i=new Set(t);for(let s=0;s<r;s++)i.add(e[s]);return Array.from(i)}function i0(t,e){const n=[];if(t.length===0||e.length===0)return n;if(t.length>e.length){const i=t;t=e,e=i}const r=new Set(e);for(let i=0;i<t.length&&r.size>0;i++){const s=t[i];r.delete(s)&&n.push(s)}return n}function ta(t){return t.length===0}function pi(t){return(e,n)=>{const r=e.length-n.length;if(r!==0)return r;for(let i=0;i<e.length;i++)if(e[i]!==n[i]){const s=t(e[i],n[i]);if(s!==0)return s}return 0}}function ic(t,{threshold:e=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=e){const o=[];let a=0;e:for(let l=0;l<r;l++){const u=n[l];for(let c=0;c<a;c++)if(t(u,o[c])===0)continue e;a=o.push(u)}return o}const i=n.slice().sort(t);let s=0;for(let o=1;o<r;o++)t(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function s0(t){return(e,n)=>{const r=[];let i=e.length,s=n.length;if(i===0||s===0)return r;if(i>s){const c=e;e=n,n=c;const d=i;i=s,s=d}const o=[...e].sort(t),a=[...n].sort(t);let l=0,u=0;for(;l<i&&u<s;){const c=t(o[l],a[u]);c===0?((r.length===0||t(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,u++):c<0?l++:u++}return r}}function o0(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const na=o0,sc=()=>0,a0=t=>t===void 0,l0=t=>typeof t!="object",ra={boolean:0,number:1,string:2};function c0(t,e){const n=typeof t,r=typeof e;return n===r?nn(t,e):ra[n]-ra[r]}function u0(t,e){const n=t.length;if(n===0)return e;const r=e.length;if(r===0)return t;if(r>n){const o=t;t=e,e=o}const i=new Set(t),s=e.length;for(let o=0;o<s;o++){const a=e[o];i.has(a)||t.push(a)}return t}function Jr(t,e,n=sc){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function Xt(t){return Jr(a0,t)}function pt(t,e){return Jr(n=>n===void 0||t(n),e)}function gi(t,e){return Jr(Array.isArray,t,e)}const be=Xt(nn),yi=pt(t=>t===0,(t,e)=>t-e);function d0({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=na(e,p=>Object.keys(p).sort());function r(p){return(y,x)=>{const S=n(y),E=n(x),j=Math.min(S.length,E.length);for(let b=0;b<j;b++){const v=nn(S[b],E[b]);if(v!==0)return v}if(S.length!==E.length)return S.length-E.length;for(let b=0;b<j;b++){const v=S[b],w=p(y[v],x[v]);if(w!==0)return w}return 0}}function i(p){const y=pi(p),x=na(t,ic(p,{threshold:0}));return(S,E)=>y(x(S),x(E))}const s=i(nn);function o(p,y){if(Ar(p)){if(Ar(y)){const x=Object.keys(p),S=Object.keys(y),E=u0(x,S),j=E.length;for(let b=0;b<j;b++){const v=E[b];if(p[v]===y[v])continue;const O=(f[v]??a)(p[v],y[v]);if(O!==0)return O}return 0}return y===!0&&Rn(p)?0:1}return Ar(y)?p===!0&&Rn(y)?0:-1:nn(p,y)}const a=Xt(u),l=Jr(l0,gi(r(a),pi(u)),c0);function u(p,y){return p===null?-1:y===null?1:l(p,y)}const c=Xt(o),d=pt(Rn,r(c)),h=Xt(i(o)),g=pt(Ye,o),f={$id:be,$comment:be,$defs:d,$ref:be,$schema:be,const:a,contains:c,contentEncoding:be,contentMediaType:be,default:a,definitions:d,description:be,else:c,examples:a,exclusiveMaximum:be,exclusiveMinimum:be,format:be,if:c,maximum:be,maxItems:be,maxLength:be,maxProperties:be,minimum:be,multipleOf:be,not:c,pattern:be,propertyNames:c,readOnly:be,then:c,title:be,writeOnly:be,uniqueItems:pt(p=>p===!1,sc),minLength:yi,minItems:yi,minProperties:yi,required:pt(ta,s),enum:pt(ta,i(u)),type:Xt((p,y)=>{const x=Array.isArray(p),S=Array.isArray(y);return!x&&!S?nn(p,y):s(x?p:[p],S?y:[y])}),items:pt(p=>!Array.isArray(p)&&Ye(p),gi(o,pi(o))),anyOf:h,allOf:h,oneOf:h,properties:d,patternProperties:d,additionalProperties:g,additionalItems:g,dependencies:pt(Rn,r(Xt(gi(o,s))))};return{compareSchemaValues:u,compareSchemaDefinitions:o}}function ia(t){return t}const oc=(t,e)=>t?oc(e%t,t):e,f0=(t,e)=>Math.abs(t*e)/oc(t,e);function m0(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function bi(t,e,n){const r=t.length,i=e.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=t[s];for(let a=0;a<i;a++)n(o,e[a])}}function xi(t,e){return t||e}function sa(t){return(e,n)=>{const r={...e},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=e[a]===void 0?n[a]:t(e[a],n[a])}return r}}function h0(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function Tt(t,e,n){n===void 0||Ye(n)?delete t[e]:t[e]=n}const p0=["properties","patternProperties","additionalProperties"];function oa(t){const e=Object.keys(t),n=e.length,r=[];for(let i=0;i<n;i++){const s=e[i];r.push({regExp:new RegExp(s),schema:t[s]})}return[r,e]}const aa=[[],[]];function la(t,e,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(e))continue;const o=s.schema;if(o===!1)return!0;t.push(o)}return!1}const g0=["items","additionalItems"],y0=["if","then","else"];function ca(t,e){return e.if!==void 0&&(t.if=e.if),e.then!==void 0&&(t.then=e.then),e.else!==void 0&&(t.else=e.else),t}function vi(t,e){if(t===e)return t;switch(t){case"number":if(e==="integer")return"integer";case"integer":if(e==="number")return"integer";default:return}}function Nt(t,e,n){return[t,e,n]}function b0(t){const e=new Map;for(const[n,r,i]of t){const s=o=>{if(!i(o))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(o[n])}, ${r}: ${JSON.stringify(o[r])})`)};for(const o of[[n,r],[r,n]]){let a=e.get(o[0]);a===void 0&&(a=[],e.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return e}const x0=[Nt("minimum","maximum",t=>t.maximum>=t.minimum),Nt("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Nt("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Nt("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Nt("minLength","maxLength",t=>t.maxLength>=t.minLength),Nt("minItems","maxItems",t=>t.maxItems>=t.minItems),Nt("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function v0({mergePatterns:t=m0,isSubRegExp:e=Object.is,intersectJson:n=i0,deduplicateJsonSchemaDef:r=ia,defaultMerger:i=ia,assigners:s=[],checks:o=x0,mergers:a}={}){function l(j){const b=j.length;let v=j[0];for(let w=1;w<b;w++){const O=x(v,j[w]);if(O===!1)return!1;Ye(O)||(v=O)}return v}function u(j,b,v,w,O,C,A){if(j.length=0,v===!1)return!1;if(j.push(v),O!==void 0){if(O===!1)return!1;j.push(O)}if(la(j,b,C))return!1;const I=j.length<2;if(A===!1){if(I)return;if(la(j,b,w))return!1}else I&&A!==void 0&&j.push(A);return j.length===1?j[0]:l(j)}function c(j,b,v,w,O,C){const A=v.length;if(A>0&&O!==!1)if(C)Object.assign(j,b);else for(let _=0;_<A;_++){const I=v[_];w.has(I)||(j[I]=x(b[I],O))}return j}const d=(j,{properties:b={},patternProperties:v,additionalProperties:w=!0},{properties:O={},patternProperties:C,additionalProperties:A=!0})=>{const _=Ye(w),I=Ye(A);if(_&&I)return Tt(j,"properties",S(b,O)),Tt(j,"patternProperties",v&&C?S(v,C):v??C),delete j.additionalProperties,j;const T=x(w,A);Tt(j,"additionalProperties",T);const P={},F=Object.keys(b),$=F.length,[k,M]=v?oa(v):aa,[U,J]=C?oa(C):aa,ae=[],fe=new Set,ye=I?void 0:A;for(let z=0;z<$;z++){const re=F[z];fe.add(re);const oe=u(ae,re,b[re],k,O[re],U,ye);oe!==void 0&&(P[re]=oe)}const L=Object.keys(O),le=L.length,te=_?void 0:w;for(let z=0;z<le;z++){const re=L[z];if(fe.has(re))continue;const oe=u(ae,re,O[re],U,void 0,k,te);oe!==void 0&&(P[re]=oe)}Tt(j,"properties",P);let H={};const K=new Set;return M.length>0&&J.length>0&&bi(M,J,(z,re)=>{e(z,re)&&K.add(z),e(re,z)&&K.add(re),H[t(z,re)]=x(v[z],C[re])}),H=c(H,v,M,K,A,I),H=c(H,C,J,K,w,_),Tt(j,"patternProperties",H),j},h=(j,{items:b=[],additionalItems:v},{items:w=[],additionalItems:O})=>{const C=Array.isArray(b),A=Array.isArray(w),_=[];if(j.items=_,C&&A){const[I,T,P]=b.length<w.length?[b.length,v,w]:[w.length,O,b];let F=0;for(;F<I;F++)_.push(x(b[F],w[F]));if(T===!1)j.additionalItems=!1;else{const $=T===void 0||Ye(T);for(;F<P.length;F++)_.push($?P[F]:x(P[F],T));Tt(j,"additionalItems",v!==void 0&&O!==void 0?x(v,O):v??O)}}else if(C||A){const[I,T,P]=C?[b,w,v]:[w,b,O];Tt(j,"additionalItems",P&&x(P,T));for(let F=0;F<I.length;F++)_.push(x(I[F],T))}else delete j.additionalItems,j.items=x(b,w);return j},g=(j,b,v)=>{ca(j,b);const w=ca({},v);return j.allOf===void 0?j.allOf=[w]:j.allOf=j.allOf.concat(w),j};function f(j,b){const v=[];if(bi(j,b,(w,O)=>{try{v.push(x(w,O))}catch{}}),v.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(j)}" and "${JSON.stringify(b)}"; the merged result is empty`);return r(v)}const p=h0([[p0,d],[g0,h],[y0,g],...s]),y=b0(o);function x(j,b){if(j===!1||b===!1)return!1;if(Ye(j))return Ye(b)?!0:b;if(Ye(b))return j;let v={...j};const w=new Set,O=new Set,C=Object.keys(b),A=C.length;for(let _=0;_<A;_++){const I=C[_],T=b[I];if(T===void 0)continue;const P=y.get(I);if(P!==void 0){const M=P.length;for(let U=0;U<M;U++){const J=P[U];j[J.oppositeKey]!==void 0&&O.add(J.check)}}const F=j[I];if(F===void 0){v[I]=T;continue}const $=p.get(I);if($){w.add($);continue}const k=E[I]??i;v[I]=k(F,T)}for(const _ of w)v=_(v,j,b);for(const _ of O)_(v);return v}const S=sa(x),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(j,b)=>{if(j===b)return j;const v=Array.isArray(j),w=Array.isArray(b);if(!v&&!w){const O=vi(j,b);if(O!==void 0)return O}else if(v||w){const O=new Set;if(v&&w)bi(j,b,(A,_)=>{const I=vi(A,_);I!==void 0&&O.add(I)});else{const A=v?j:b,_=v?b:j,I=A.length;for(let T=0;T<I;T++){const P=vi(_,A[T]);P!==void 0&&O.add(P)}}const C=O.size;if(C===1)return O.values().next().value;if(C>1)return Array.from(O)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${j.toString()}, ${b.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(j,b)=>{const v=r([j,b]);return v.length===1?v[0]:{anyOf:v}},pattern:t,readOnly:xi,writeOnly:xi,enum:(j,b)=>{const v=n(j,b);if(v.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(j)}", "${JSON.stringify(b)}"`);return v},anyOf:f,oneOf:f,allOf:(j,b)=>r(j.concat(b)),propertyNames:x,contains:x,dependencies:sa((j,b)=>Array.isArray(j)?Array.isArray(b)?hi(j,b):x(b,{required:j}):Array.isArray(b)?x(j,{required:b}):x(j,b)),examples:(j,b)=>{if(!Array.isArray(j)||!Array.isArray(b))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(j)}" and "${JSON.stringify(b)}"`);return hi(j,b)},multipleOf:(j,b)=>{let v=1;for(;!Number.isInteger(j)||!Number.isInteger(b);)v*=10,j*=10,b*=10;return f0(j,b)/v},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:xi,required:hi,...a};return{mergeSchemaDefinitions:x,mergeArrayOfSchemaDefinitions:l}}function S0(t){const e=[],n=[t];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){e.push(r);continue}const{allOf:i,...s}=r;e.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return e}function w0(t){return e=>t(S0(e))}const{compareSchemaDefinitions:j0,compareSchemaValues:O0}=d0(),{mergeArrayOfSchemaDefinitions:E0}=v0({intersectJson:s0(O0),deduplicateJsonSchemaDef:ic(j0)}),ac=w0(E0);function Ce(t,e,n={},r,i,s=!1){return Ze(t,e,n,r,void 0,void 0,i,s)[0]}function A0(t,e,n,r,i,s,o){const{if:a,then:l,else:u,...c}=e,d=t.isValid(a,s||{},n);let h=[c],g=[];if(r)l&&typeof l!="boolean"&&(g=g.concat(Ze(t,l,n,s,r,i,o))),u&&typeof u!="boolean"&&(g=g.concat(Ze(t,u,n,s,r,i,o)));else{const f=d?l:u;f&&typeof f!="boolean"&&(g=g.concat(Ze(t,f,n,s,r,i,o)))}return g.length&&(h=g.map(f=>at(c,f))),h.flatMap(f=>Ze(t,f,n,s,r,i,o))}function lc(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>Kl(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function cc(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ce(n,[r],t.patternProperties[r]),n),{})}function C0(t,e,n,r,i,s,o,a){const l=uc(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(ps in e)return fc(t,e,n,r,i,s,o).flatMap(c=>Ze(t,c,n,s,r,i,o));if(Ot in e&&Array.isArray(e[Ot])){const u=e.allOf.map(d=>Ze(t,d,n,s,r,i,o));return lc(u).map(d=>({...e,allOf:d}))}return[e]}function uc(t,e,n,r,i,s,o,a){const l=St(e,n,i,void 0,a);return l!==e?Ze(t,l,n,s,r,i,o,a):[e]}function St(t,e,n,r,i){if(!q(t))return t;let s=t,o=r;if(ue in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...Zn(a,e,o),...l,[Bn]:a},de in s&&(o=s[de])}if(se in s){const a=[],l=zb(s[se],(u,c,d)=>{const h=[...n];u[d]=St(c,e,h,o,i),a.push(h)},{});zy(n,tc(My(a))),s={...s,[se]:l}}if(an in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:St(s.items,e,n,o,i)}),i){let a,l;ee in t&&Array.isArray(t[ee])?(a=ee,l=s[ee]):W in t&&Array.isArray(t[W])&&(a=W,l=s[W]),a&&l&&(s={...s,[a]:l.map(u=>St(u,e,n,o,i))})}return ie(t,s)?t:s}function _0(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&q(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(Vi in s){const l=cc(s,a);if(!ge(l)){s.properties[a]=Ce(t,{[Ot]:Object.values(l)},n,D(o,[a]),i),ce(s.properties,[a,ot],!0);return}}if(tn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ue in s.additionalProperties?l=Ce(t,{[ue]:D(s.additionalProperties,[ue])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ee in s.additionalProperties||W in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:er(D(o,[a]))}:l={type:er(D(o,[a]))},s.properties[a]=l,ce(s.properties,[a,ot],!0)}else s.properties[a]={type:"null"},ce(s.properties,[a,ot],!0)}}),s}function I0(t){return ac(t)}function Ze(t,e,n,r,i=!1,s=[],o,a){return q(e)?C0(t,e,n,i,s,r,o,a).flatMap(u=>{var c;let d=u;if(gs in d)return A0(t,d,n,i,s,r,o);if(Ot in d){if(i){const{allOf:g,...f}=d;return[...g,f]}try{const g=[],f=[];(c=d.allOf)===null||c===void 0||c.forEach(p=>{typeof p=="object"&&p.contains?g.push(p):f.push(p)}),g.length&&(d={...d,allOf:f}),d=o?o(d):I0(d),g.length&&(d.allOf=g)}catch(g){console.warn(`could not merge subschemas in allOf:
2
- `,g);const{allOf:f,...p}=d;return p}}return se in d&&Vi in d&&(d=Object.keys(d.properties).reduce((g,f)=>{const p=cc(g,f);return ge(p)||(g.properties[f]=Ce(t,{allOf:[g.properties[f],...Object.values(p)]},n,D(r,[f]),o)),g},{...d,properties:{...d.properties}})),Vi in d||tn in d&&d.additionalProperties!==!1?_0(t,d,n,r,o):d}):[{}]}function T0(t,e,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=e;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const u=i===void 0&&r?{}:i,c=He(e);s=s.map(h=>St(h,n,[]));const d=Mr(t,u,s,n,c);if(r){const h=dc(s,!1,n);return Mr(t,u,h,n,c),s.map(g=>at(l,g))}return[at(l,s[d])]}return[e]}function dc(t,e=!1,n){return t.map(r=>{if(!q(r))return r?{}:{not:{}};const i=e&&n?St(r,n,[]):r;return i.additionalProperties===!1?{...i,additionalProperties:!0}:i})}function fc(t,e,n,r,i,s,o){const{dependencies:a,...l}=e;return T0(t,l,n,r,s).flatMap(c=>mc(t,a,c,n,r,i,s,o))}function mc(t,e,n,r,i,s,o,a){let l=[n];for(const u in e)if((i||D(o,[u])!==void 0)&&(!n.properties||u in n.properties)){const[c,d]=Fs(u,e);return Array.isArray(d)?l[0]=N0(n,d):q(d)&&(l=P0(t,n,r,u,d,i,s,o,a)),l.flatMap(h=>mc(t,c,h,r,i,s,o,a))}return l}function N0(t,e){if(!e)return t;const n=Array.isArray(t.required)?Array.from(new Set([...t.required,...e])):e;return{...t,required:n}}function P0(t,e,n,r,i,s,o,a,l){return Ze(t,i,n,a,s,o,l).flatMap(c=>{const{oneOf:d,...h}=c,g=at(e,h);if(d===void 0)return g;const f=d.map(y=>typeof y=="boolean"||!(ue in y)?[y]:uc(t,y,n,s,o,a));return lc(f).flatMap(y=>F0(t,g,n,r,y,s,o,a,l))})}function F0(t,e,n,r,i,s,o,a,l){const u=i.filter(c=>{if(typeof c=="boolean"||!c||!c.properties)return!1;const{[r]:d}=c.properties;if(d){const h={type:"object",properties:{[r]:d}};return t.isValid(h,a,n)||s}return!1});return!s&&u.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[e]):u.flatMap(c=>{const d=c,[h]=Fs(r,d.properties),g={...d,properties:h};return Ze(t,g,n,a,s,o,l).map(p=>at(e,p))})}function kn(t,e,n,r,i,s={},o){if(Array.isArray(n[i])){const l=He(n)||r,u=n[i].map(d=>Ce(t,d,e,s,o)),c=D(s,l);if(c!==void 0)return u.find(d=>ie(D(d,[se,l,$t],D(d,[se,l,Ne])),c))}}function hc(t,e,n,r,i){let s=n;if(X(n,ue)&&(s=Ce(t,n,e,void 0,i)),ge(r))return s;const o=Array.isArray(r)?[...r]:r.split("."),[a,...l]=o;if(a!==void 0&&a!==""&&X(s,a))return s=D(s,a),hc(t,e,s,l,i)}function Cr(t,e,n,r,i,s){const o=hc(t,e,n,r,s);return o===void 0?i:o}const ua={title:"!@#$_UNKNOWN_$#@!"};function $0(t,e,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop(),u=String(l);o.length&&o.forEach(g=>{a=Cr(t,e,a,[se,g],{},s),X(a,W)?a=kn(t,e,a,u,W,D(i,g),s):X(a,ee)&&(a=kn(t,e,a,u,ee,D(i,g),s))}),X(a,W)?a=kn(t,e,a,u,W,i,s):X(a,ee)&&(a=kn(t,e,a,u,ee,i,s));let c=Cr(t,e,a,[se,l],ua,s);c===ua&&(c=void 0);const d=Cr(t,e,a,ol,[],s);let h;return c&&Array.isArray(d)&&(h=d.includes(u)),{field:c,isRequired:h}}function D0(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function R0(t,e){return function(n,r){if(n==null)return n;if(!zt(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var pc=R0(Gl);function k0(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function M0(t,e,n){var r=we(t)?D0:k0,i=arguments.length<3;return r(t,Rs(e),n,i,pc)}const U0={type:"object",$id:om,properties:{__not_really_there__:{type:"number"}}};function Qi(t,e,n,r,i){let s=0;return n&&(ne(n.properties)?s+=M0(n.properties,(o,a,l)=>{const u=D(r,l);if(typeof a=="boolean")return o;if(X(a,ue)){const c=Ce(t,a,e,u,i);return o+Qi(t,e,c,u||{},i)}if((X(a,W)||X(a,ee))&&u){const c=X(a,W)?W:ee,d=He(a);return o+dn(t,e,u,D(a,c),-1,d,i)}if(a.type==="object"){const c=ne(u)?1:0;return o+c+Qi(t,e,a,u,i)}if(a.type===er(u)){let c=o+1;return a.default?c+=u===a.default?1:-1:a.const&&(c+=u===a.const?1:-1),c}return o},0):Ct(n.type)&&n.type===er(r)&&(s+=1)),s}function dn(t,e,n,r,i=-1,s,o){const a=r.map(h=>St(h,e,[])),l=rc(n,r,s);if(nc(l))return l;const u=a.reduce((h,g,f)=>(Mr(t,n,[U0,g],e,s)===1&&h.push(f),h),[]);if(u.length===1)return u[0];u.length||Kl(a.length,h=>u.push(h));const c=new Set,{bestIndex:d}=u.reduce((h,g)=>{const{bestScore:f}=h,p=a[g],y=Qi(t,e,p,n,o);return c.add(y),y>f?{bestIndex:g,bestScore:y}:h},{bestIndex:i,bestScore:0});return c.size===1&&i>=0?i:d}function gc(t){const e=t[Ne],n=Le(t);return q(e)&&Ct(e?.$data)&&n!=="object"&&n!=="array"}function yc(t){return Array.isArray(t.enum)&&t.enum.length===1||Ne in t}function Ms(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>q(e))}function fn(t){return t==null}function tr(t,e,n=!1,r=!1,i=!1){if(Array.isArray(e)){const s=Array.isArray(t)?t:[],o=i?s:e,a=i?e:s,l=o.map((u,c)=>a[c]!==void 0?tr(s[c],e[c],n,r,i):u);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(q(e)){const s=Object.assign({},t);return Object.keys(e).reduce((o,a)=>{var l;const u=D(e,a),c=q(t)&&a in t,d=a in e,h=(l=D(t,a))!==null&&l!==void 0?l:{},g=c&&q(h)&&Object.values(h).some(y=>q(y)),f=c&&q(D(t,a)),p=d&&q(u);return f&&p&&!g?(o[a]={...D(t,a),...u},o):(o[a]=tr(D(t,a),u,n,r,i&&(c||!d)),s)},s)}return r&&(t!==void 0&&fn(e)||typeof e=="number"&&Number.isNaN(e))||i&&!fn(e)?t:e}function Mt(t,e,n=!1){return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];if(t&&i in t&&q(o))r[i]=Mt(s,o,n);else if(n&&Array.isArray(s)&&Array.isArray(o)){let a=o;n==="preventDuplicates"&&(a=o.reduce((l,u)=>(s.includes(u)||l.push(u),l),[])),r[i]=s.concat(a)}else r[i]=o;return r},{...t})}function L0(t){if(sm in t&&Array.isArray(t.enum)&&t.enum.length===1)return t.enum[0];if(Ne in t)return t.const;throw new Error("schema cannot be inferred as a constant")}function B0(t,e){const n=new Map(t.map(s=>[String(s.value),s])),r=new Set(e.filter(s=>s!=="*").map(String)),i=t.filter(s=>!r.has(String(s.value)));return e.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function mn(t,e){if(t.enum){let s,o;if(e){const{enumNames:l,enumOrder:u}=B(e);s=l,o=u}let a=t.enum.map((l,u)=>({label:Array.isArray(s)?s[u]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=B0(a,o)),a}let n,r;t.anyOf?(n=t.anyOf,r=e?.anyOf):t.oneOf&&(n=t.oneOf,r=e?.oneOf);let i=He(t);if(e){const{optionsSchemaSelector:s=i}=B(e);i=s}return n&&n.map((s,o)=>{const{title:a}=B(r?.[o]),l=s;let u,c=a;if(i){const d=D(l,[se,i],{});u=D(d,$t,D(d,Ne)),c=c||d?.title||l.title||String(u)}else u=L0(l),c=c||l.title||String(u);return{schema:l,label:c,value:u}})}function Zr(t,e,n={},r){const i=Ce(t,e,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&yc(o)):!1}function Us(t,e,n,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:Zr(t,e.items,n,r)}const V0=["string","number","integer","boolean","null"];var hn;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(hn||(hn={}));function Si(t,e=hn.Ignore,n=-1){if(n>=0){if(Array.isArray(t.items)&&n<t.items.length){const r=t.items[n];if(typeof r!="boolean")return r}}else if(t.items&&!Array.isArray(t.items)&&typeof t.items!="boolean")return t.items;return e!==hn.Ignore&&q(t.additionalItems)?t.additionalItems:{}}function bc(t,e){const{default:n,type:r}=t;return Array.isArray(r)&&r.includes("null")&&ge(e)&&n===null?null:e}function da(t,e,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:u="populateAllDefaults"}=o;if(r===!0||a)t[e]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!q(n)||!ge(n))&&(t[e]=n);else if(u!=="skipDefaults"){const c=i===void 0?s.includes(e):i;q(n)?u==="skipEmptyDefaults"?ge(n)||(t[e]=n):(!ge(n)||s.includes(e))&&(c||u!=="populateRequiredDefaults")&&(t[e]=n):n!==void 0&&(u==="populateAllDefaults"||u==="skipEmptyDefaults"||c&&s.includes(e))&&(t[e]=n)}}function wt(t,e,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:o=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:u=void 0,required:c,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:h}=n;let g=q(i)?i:{};const f=q(e)?e:{};let p=r,y=null,x=l,S=a;if(f[Ne]!==void 0&&l?.constAsDefaults!=="never"&&!gc(f))p=f[Ne];else if(q(p)&&q(f.default)&&!f[ee]&&!f[W]&&!f[ue])p=Mt(p,f.default);else if($t in f&&!f[ee]&&!f[W]&&!f[ue])p=f.default;else if(ue in f){const b=f[ue];a.includes(b)||(S=a.concat(b),y=Zn(b,s));const v=i===void 0||q(i)&&ge(i);y&&!p&&v&&(p=f.default),d&&y&&!q(i)&&(g=i)}else if(ps in f){const b={...fa(t,f,n,p),...g};[y]=fc(t,f,s,!1,[],b,u)}else if(Ms(f))p=f.items.map((b,v)=>wt(t,b,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,parentDefaults:Array.isArray(r)?r[v]:void 0,rawFormData:g,required:c,shouldMergeDefaultsIntoFormData:d}));else if(W in f){const{oneOf:b,...v}=f;if(b.length===0)return;const w=He(f),{type:O="null"}=v;!Array.isArray(O)&&V0.includes(O)&&x?.constAsDefaults==="skipOneOf"&&(x={...x,constAsDefaults:"never"}),y=b[dn(t,s,i??f.default,b,0,w,u)],y=at(v,y)}else if(ee in f){const{anyOf:b,...v}=f;if(b.length===0)return;const w=He(f);y=b[dn(t,s,i??f.default,b,0,w,u)],y=at(v,y)}if(y)return wt(t,y,{rootSchema:s,includeUndefinedValues:o,_recurseList:S,experimental_defaultFormStateBehavior:x,experimental_customMergeAllOf:u,parentDefaults:p,rawFormData:i??g,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});p===void 0&&(p=f.default);const E=fa(t,f,n,p);let j=E??p;if(d){const{arrayMinItems:b={}}=l||{},{mergeExtraDefaults:v}=b,w=q0(t,f,s,i,l,u);(!q(i)||Ot in f)&&(j=tr(j,w,v,!0))}return j}function q0(t,e,n,r,i,s){const o=!yc(e)&&Zr(t,e,n,s);let a=r;if(o){const u=mn(e);a=u?.some(d=>ie(d.value,r))?r:void 0}return e[Ne]&&i?.constAsDefaults==="always"&&(a=e.const),a}function z0(t,e,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:a=void 0,required:l,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}={},d){{const h=q(n)?n:{},g=e,p=o?.allOf==="populateDefaults"&&Ot in g||o?.emptyObjectFields!=="skipEmptyDefaults"&&gs in g?Ce(t,g,r,h,a):g,y=p[Ne],x=Object.keys(p.properties||{}).reduce((S,E)=>{var j;const b=D(p,[se,E],{}),v=q(y)&&y[E]!==void 0,w=(q(b)&&Ne in b||v)&&o?.constAsDefaults!=="never"&&!gc(b),O=wt(t,b,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[E]),rawFormData:D(h,[E]),required:(j=p.required)===null||j===void 0?void 0:j.includes(E),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c});return da(S,E,O,i,l,p.required,o,w,b?.type==="null"),S},{});if(p.additionalProperties&&!c){const S=q(p.additionalProperties)?p.additionalProperties:{},E=new Set,j=[];Object.keys(h).filter(b=>!p.properties||!p.properties[b]).forEach(b=>{E.add(b),j.push(b)}),q(d)&&j.length===0&&Object.keys(d).filter(b=>!p.properties||!p.properties[b]).forEach(b=>E.add(b)),E.forEach(b=>{var v;const w=wt(t,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[b]),rawFormData:D(h,[b]),required:(v=p.required)===null||v===void 0?void 0:v.includes(b),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c});da(x,b,w,i,l,j)})}return bc(e,x)}}function W0(t,e,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:a,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}={},d){var h,g;let f=d;const p=e,y=(h=s?.arrayMinItems)!==null&&h!==void 0?h:{},{populate:x,mergeExtraDefaults:S}=y,E=x==="never",j=x==="requiredOnly",b=x==="all"||!E&&!j,v=(g=y?.computeSkipPopulate)!==null&&g!==void 0?g:(()=>!1),O=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((_,I)=>{const T=Si(p,hn.Fallback,I),P=Array.isArray(n)?n[I]:void 0;return wt(t,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:_,rawFormData:P,required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c})})),Array.isArray(n)){const _=Si(p);if(E)f=n;else{const I=n.map((P,F)=>wt(t,_,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:P,parentDefaults:D(f,[F]),required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}));f=tr(f,I,(j&&a||b)&&S)}}if(E)return f??O;if(j&&!a)return f||void 0;let C;const A=Array.isArray(f)?f.length:0;if(!p.minItems||Us(t,p,r,o)||v(t,p,r)||p.minItems<=A)C=f||!a&&!l?f:O;else{const _=f||[],I=Si(p,hn.Invert),T=I.default,P=Array.from({length:p.minItems-A},()=>wt(t,I,{parentDefaults:T,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:u}));C=_.concat(P)}return bc(e,C)}function fa(t,e,n={},r){switch(Le(e)){case"object":return z0(t,e,n,r);case"array":return W0(t,e,n,r);default:return}}function xc(t,e,n,r,i=!1,s,o,a){if(!q(e))throw new Error(`Invalid schema: ${e}`);const l=Ce(t,e,r,n,o),u=wt(t,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&q(l.default))return{...u,...n};if(q(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:c}=s||{};return tr(u,n,!0,c==="useDefaultIfFormDataUndefined",!0)}return u}function vc(t={}){return"widget"in B(t)&&B(t).widget!=="hidden"}function Sc(t,e,n={},r,i){if(n[bs]==="files")return!0;if(e.items){const s=Ce(t,e.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function H0(t,e,n={},r,i,s){const o=B(n,i),{label:a=!0}=o;let l=!!a;if(l){const u=Le(e),c=D(e,ot,!1);u==="array"&&(l=c||Us(t,e,r,s)||Sc(t,e,n,r,s)||vc(n)),u==="object"&&(l=c),u==="boolean"&&n&&!n[bs]&&(l=!1),n&&n[cm]&&(l=!1)}return l}function wc(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=zr(t,o);n(a,o)&&$s(s,bn(o,t),a)}return s}function K0(t,e){return wc(t,e,function(n,r){return Xl(t,r)})}var Ls=Ll(function(t,e){return t==null?{}:K0(t,e)});function G0(t,e){if(e.length===0&&typeof t!="object")return t;const n=Ls(t,e);return Array.isArray(t)?Object.keys(n).map(r=>n[r]):n}function Y0(t,e){const n=(i,s)=>typeof i!="object"||ge(i)||s&&!ge(i),r=(i,s=[],o=[[]])=>{const a=Object.keys(i);return a.forEach(l=>{const u=i[l];if(typeof u=="object"){const c=o.map(d=>[...d,l]);u[ys]&&u[jr]!==""?s.push(u[jr]):r(u,s,c)}else l===jr&&u!==""&&o.forEach(c=>{const d=D(e,c),h=a.length===1;(n(d,h)||Array.isArray(d)&&d.every(g=>n(g,h)))&&s.push(c)})}),s};return r(t)}function zn(t){return fn(t)||t===""?!0:Array.isArray(t)?t.length===0:q(t)?Object.values(t).every(zn):!1}function J0(t,e){return e?e(t):ac(t)}function Z0(t,e,n={},r,i){function s(f){return q(f)}function o(f){return q(f)}function a(f,p,y){var x;const{properties:S,additionalProperties:E,patternProperties:j,propertyNames:b}=f,v=new Set((x=f.required)!==null&&x!==void 0?x:[]);function w(C,A,_,I=!1){var T;const P=g(A,_,y[C]);if(!I&&q(P)){let F=o(A)?A:{};F.$ref!==void 0&&(F=Zn(F.$ref,n));const $=new Set((T=F.required)!==null&&T!==void 0?T:[]);if(Object.entries(P).every(([M,U])=>!$.has(M)&&zn(U)))return}P!==void 0&&(y[C]=P)}if(S!==void 0)for(const[C,A]of Object.entries(S))w(C,A,p[C],v.has(C));let O;if(j!==void 0){O=[];const C=Object.entries(j).map(([_,I])=>[new RegExp(_),I]),A=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))if(!A.has(_)){const T=C.find(([P])=>P.test(_));T===void 0?O.push(_):w(_,T[1],I)}}if(E!==void 0&&E!==!1){const C=E;if(O!==void 0)for(const A of O)w(A,C,p[A]);else{const A=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))A.has(_)||w(_,C,I)}}if(b!==void 0)for(const[C,A]of Object.entries(p))y[C]=A;return y}function l(f,p,y){const{items:x,additionalItems:S}=f;if(x!==void 0)if(Array.isArray(x))for(let E=0;E<x.length;E+=1)y.push(g(x[E],p[E]));else for(let E=0;E<p.length;E+=1)y.push(g(x,p[E]));if(S)for(let E=y.length;E<p.length;E+=1)y.push(g(S,p[E]));return y}function u(f,p,y){const{if:x,then:S,else:E}=f;if(x===void 0)return y;const b=(o(x)?t.isValid(x,p,n):x)?S:E;return b===void 0?y:g(b,p,y)}function c(f,p,y,x){if(!Array.isArray(f)||Zr(t,p,n,i))return x;const S=dc(f,!0,n),E=dn(t,n,y,S,0,He(p),i),j=f[E],b=q(j)?St(j,n,[]):S[E];return g(b,y,x)}function d(f,p,y){const{anyOf:x}=f;if(!Array.isArray(x))return y;if(p===void 0||Array.isArray(p)&&p.length===0||q(p)&&Object.keys(p).length===0){let S=y;for(const E of x)S=g(E,p,S);return S}return c(x,f,p,y)}function h(f,p,y){const{dependencies:x}=f;if(x===void 0||!s(p))return y;let S=y;for(const[E,j]of Object.entries(x))E in p&&!Array.isArray(j)&&(S=g(j,p,S));return S}function g(f,p,y){if(p===void 0||f===!1)return;if(f===!0||ge(f))return p;let x=f;const{$ref:S,allOf:E}=x;if(S!==void 0)return g(Zn(S,n),p,y);E&&(x=J0(x,i));let j=d(x,p,c(x.oneOf,x,p,y));const b=Le(x);if(b==="object"){if(!s(p))return;j=a(x,p,s(j)?j:{})}else if(b==="array"){if(!Array.isArray(p))return;j=l(x,p,Array.isArray(j)?j:[])}else j===void 0&&(j=p);return h(x,p,u(x,p,j))}return g(e,r)}const De=Symbol("no Value");function jc(t){if(Array.isArray(t.enum))return t.enum;const e=t.oneOf||t.anyOf;if(!Array.isArray(e))return;const n=e.map(r=>Ne in r?r[Ne]:Array.isArray(r.enum)&&r.enum.length===1?r.enum[0]:De).filter(r=>r!==De);return n.length>0?n:void 0}function X0(t,e){const n=jc(t);if(!n||n.some(i=>ie(i,e)))return De;const r=D(t,$t,De);return r!==De&&n.some(i=>ie(i,r))?r:n.length===1?n[0]:void 0}function es(t,e,n,r,i={},s){let o;if(X(n,se)){const a={};if(X(r,se)){const c=D(r,se,{});Object.keys(c).forEach(d=>{X(i,d)&&(a[d]=void 0)})}const l=Object.keys(D(n,se,{})),u={};l.forEach(c=>{const d=D(i,c);let h=D(r,[se,c],{}),g=D(n,[se,c],{});X(h,ue)&&(h=Ce(t,h,e,d,s)),X(g,ue)&&(g=Ce(t,g,e,d,s));const f=D(h,"type"),p=D(g,"type");if(!f||f===p)if(X(a,c)&&delete a[c],p==="object"||p==="array"&&Array.isArray(d)){const y=es(t,e,g,h,d,s);(y!==void 0||p==="array")&&(u[c]=y)}else{const y=D(g,$t,De),x=D(h,$t,De);y!==De&&y!==d&&(x===d?a[c]=y:D(g,"readOnly")===!0&&(a[c]=void 0));const S=D(g,Ne,De),E=D(h,Ne,De);if(S!==De&&S!==d&&(a[c]=E===d?S:void 0),X(i,c)){const j=X0(g,d);j!==De&&(a[c]=j)}}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...u}}else if(D(r,"type")==="array"&&D(n,"type")==="array"&&Array.isArray(i)){let a=D(r,"items"),l=D(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){X(a,ue)&&(a=Ce(t,a,e,i,s)),X(l,ue)&&(l=Ce(t,l,e,i,s));const u=D(a,"type"),c=D(l,"type");if(!u||u===c){const d=D(n,"maxItems",-1);if(c==="object")o=i.reduce((h,g)=>{const f=es(t,e,l,a,g,s);return f!==void 0&&(d<0||h.length<d)&&h.push(f),h},[]);else{const h=jc(l),g=h?i.filter(f=>h.some(p=>ie(p,f))):i;o=d>0&&g.length>d?g.slice(0,d):g}}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}function gt(t,e,n,r,i,s=[],o){if(ue in e||ps in e||Ot in e||gs in e){const l=Ce(t,e,r,i,o);if(s.findIndex(c=>ie(c,l))===-1)return gt(t,l,n,r,i,s.concat(l),o)}let a={[jr]:n.replace(/^\./,"")};if(W in e||ee in e){const l=W in e?e.oneOf:e.anyOf,u=He(e),c=dn(t,r,i,l,0,u,o),d=l[c];a={...a,...gt(t,d,n,r,i,s,o)}}if(tn in e&&e[tn]!==!1){ce(a,ys,!0);const l=ne(e[tn])?e[tn]:{},u=D(e,se,{});for(const c of Object.keys(i??{}))c in u||(a[c]=gt(t,l,`${n}.${c}`,r,D(i,[c]),s,o))}if(an in e&&Array.isArray(i)){const{items:l,additionalItems:u}=e;Array.isArray(l)?i.forEach((c,d)=>{l[d]?a[d]=gt(t,l[d],`${n}.${d}`,r,c,s,o):u?a[d]=gt(t,u,`${n}.${d}`,r,c,s,o):console.warn(`Unable to generate path schema for "${n}.${d}". No schema defined for it`)}):i.forEach((c,d)=>{a[d]=gt(t,l,`${n}.${d}`,r,c,s,o)})}else if(se in e)for(const l in e.properties){const u=D(e,[se,l],{});a[l]=gt(t,u,`${n}.${l}`,r,D(i,[l]),s,o)}return a}function Q0(t,e,n="",r,i,s){return gt(t,e,n,r,i,void 0,s)}class ex{constructor(e,n,r,i){n&&n[Dn]===Or?this.rootSchema=Ji(n,D(n,de,"#")):this.rootSchema=n,this.validator=e,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,n,r={},i){return!e||!n?!1:this.validator!==e||!ie(this.rootSchema,n)||!ie(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(e,n,r){return $0(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,n,r,i){return kn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(e,n,r=!1,i){return xc(this.validator,e,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(e,n,r){return H0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,n,r,i){return dn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,n,r){return Mr(this.validator,e,n,this.rootSchema,r)}getFromSchema(e,n,r){return Cr(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}isFilesArray(e,n){return Sc(this.validator,e,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return Us(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return Zr(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,n){return Z0(this.validator,e,this.rootSchema,n)}retrieveSchema(e,n,r){return Ce(this.validator,e,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(e,n,r){return es(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}toPathSchema(e,n,r){return Q0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function tx(t,e,n={},r){return new ex(t,e,n,r)}function nx(t){var e;if(!t.includes("data:"))throw new Error("File is invalid: URI must be a dataURI");const r=t.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,s]=r,[o,...a]=i.split(";"),l=o||"",u=decodeURI(((e=a.map(c=>c.split("=")).find(([c])=>c==="name"))===null||e===void 0?void 0:e[1])||"unknown");try{const c=atob(s),d=new Array(c.length);for(let g=0;g<c.length;g+=1)d[g]=c.charCodeAt(g);return{blob:new window.Blob([new Uint8Array(d)],{type:l}),name:u}}catch(c){throw new Error(`File is invalid: ${c.message}`)}}function yt(t,e){let n=String(t);for(;n.length<e;)n=`0${n}`;return n}function Oc(t,e){const n=t<=0&&e<=0,r=t<0||e<0;if(!n&&r)throw new Error(`Both start (${t}) and stop (${e}) must both be <= 0 or > 0, got one of each`);const i=new Date().getFullYear(),s=n?i+t:t,o=n?i+e:e;if(s>o)return Oc(e,t).reverse();const a=[];for(let l=s;l<=o;l+=1)a.push({value:l,label:yt(l,2)});return a}function rx(t,e){let n=t;if(Array.isArray(e)){const r=n.split(/(%\d)/);e.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function ix(t,e){return rx(t,e)}function Xr(t,e=[],n){if(Array.isArray(t))return t.map(s=>Xr(s,e)).filter(s=>s!==void 0);const r=t===""||t===null?-1:Number(t),i=e[r];return i?i.value:n}function Ec(t,e,n=[]){const r=Xr(t,n);return Array.isArray(e)?e.filter(i=>!ie(i,r)):ie(r,e)?void 0:e}function ur(t,e){return Array.isArray(e)?e.some(n=>ie(n,t)):ie(e,t)}function sx(t,e=[],n=!1){const r=e.map((i,s)=>ur(i.value,t)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Ac(t,e,n,r="indexed",i){if(typeof t>"u"||n&&Array.isArray(t)&&t.length<1||!n&&t===i)return i;if(r==="realValue")return n?t.map(String):String(t);const o=sx(t,e,n);return typeof o>"u"?i:o}function Cc(t,e,n=[]){const r=Xr(t,n);if(!fn(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return e.slice(0,i).concat(r,e.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return e}function ma(t,e,n){if(t===""||!Array.isArray(e))return n;const r=e.find(s=>String(s.value)===t);if(r)return r.value;const i=Number(t);return!Number.isNaN(i)&&i>=0&&i<e.length?e[i].value:n}function Te(t,e,n="indexed",r){return n!=="realValue"?Xr(t,e,r):Array.isArray(t)?t.map(i=>ma(i,e,r)):ma(t,e,r)}function dr(t,e,n="indexed"){return n!=="realValue"?String(e):fn(t)?"":String(typeof t=="object"?e:t)}var ox=1,ax=4;function Bs(t){return qn(t,ox|ax)}function lx(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:$s(t,e,n,r)}class _c{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let r=Array.isArray(e)&&e.length>0||typeof e=="string"?D(this.errorSchema,e):this.errorSchema;return!r&&e&&(r={},lx(this.errorSchema,e,r,Object)),r}resetAllErrors(e){return this.errorSchema=e?Bs(e):{},this}addErrors(e,n){const r=this.getOrCreateErrorBlock(n);let i=D(r,Ae);return Array.isArray(i)||(i=[],r[Ae]=i),Array.isArray(e)?ce(r,Ae,[...new Set([...i,...e])]):ce(r,Ae,[...new Set([...i,e])]),this}setErrors(e,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(e)?[...new Set([...e])]:[e];return ce(r,Ae,i),this}clearErrors(e){const n=this.getOrCreateErrorBlock(e);return ce(n,Ae,[]),this}}var cx=200;function ux(t,e,n,r){var i=-1,s=ks,o=!0,a=t.length,l=[],u=e.length;if(!a)return l;e.length>=cx&&(s=Qn,o=!1,e=new kt(e));e:for(;++i<a;){var c=t[i],d=c;if(c=c!==0?c:0,o&&d===d){for(var h=u;h--;)if(e[h]===d)continue e;l.push(c)}else s(e,d,r)||l.push(c)}return l}var dx=Gr(function(t,e){return Xn(t)?ux(t,cr(e,1,Xn,!0)):[]});function fx(t,e){if(t==null)return{};var n=yn(Ns(t),function(r){return[r]});return e=Rs(e),wc(t,n,function(r,i){return e(r,i[0])})}function ha(t,e){const n=Et(t),r=Et(e);if(t===e||!n&&!r)return[];if(n&&!r)return ze(t);if(!n&&r)return ze(e);const i=ze(fx(t,(o,a)=>!ie(o,D(e,a)))),s=dx(ze(e),ze(t));return[...i,...s]}function mx(t,e,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:u}=t,c={type:"day",range:[1,31],value:i},d={type:"month",range:[1,12],value:s},h={type:"year",range:n,value:o},g=[];switch(r){case"MDY":g.push(d,c,h);break;case"DMY":g.push(c,d,h);break;default:g.push(h,d,c)}return e&&g.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:u}),g}function Ic(t){const e={};return t.multipleOf&&(e.step=t.multipleOf),(t.minimum||t.minimum===0)&&(e.min=t.minimum),(t.maximum||t.maximum===0)&&(e.max=t.maximum),e}function Tc(t,e,n={},r=!0){const i={type:e||"text",...Ic(t)};return n.inputType?i.type=n.inputType:e||(t.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):t.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(t.formatMinimum!==void 0&&(i.min=t.formatMinimum),t.formatMaximum!==void 0&&(i.max=t.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function vn(t){var e;return(e=t?.optionValueFormat)!==null&&e!==void 0?e:"indexed"}const pa={props:{disabled:!1},submitText:"Submit",norender:!1};function Nc(t={}){const e=B(t);if(e&&e[Fr]){const n=e[Fr];return{...pa,...n}}return pa}function V(t,e,n={}){const{templates:r}=e;if(t==="ButtonTemplates")return r[t];if(Object.hasOwn(n,t)&&typeof n[t]=="string"&&Object.hasOwn(r,n[t])){const i=n[t];return r[i]}return n[t]||r[t]}var hx=0;function Pc(t){var e=++hx;return Ss(t)+e}function Vs(){if(D(globalThis,"process.env.NODE_ENV")!=="test")return{};const t=new Map;return new Proxy({},{get(e,n){return t.has(n)||t.set(n,Pc("test-id-")),t.get(n)}})}const wi={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function px(t){let e=D(t,"MergedWidget");if(!e){const n=t.defaultProps&&t.defaultProps.options||{};e=({options:r,...i})=>m.jsx(t,{options:{...n,...r},...i}),ce(t,"MergedWidget",e)}return e}function tt(t,e,n={}){const r=Le(t);if(typeof e=="function"||e&&oo.isForwardRef(N.createElement(e))||oo.isMemo(e))return px(e);if(typeof e!="string")throw new Error(`Unsupported widget definition: ${typeof e} in schema: ${JSON.stringify(t)}`);if(e in n){const i=n[e];return tt(t,i,n)}if(typeof r=="string"){if(!(r in wi))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(t)}`);if(e in wi[r]){const i=n[wi[r][e]];return tt(t,i,n)}}throw new Error(`No widget '${e}' for type '${r}' in schema: ${JSON.stringify(t)}`)}function gx(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e&=e}return e.toString(16)}function yx(t){const e=new Set;return JSON.stringify(t,(n,r)=>(e.add(n),r)),JSON.stringify(t,Array.from(e).sort())}function Xe(t){return gx(yx(t))}function bx(t){return Xe(t)}function xx(t,e,n={}){try{return tt(t,e,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function Wt(t,e){return`${Ct(t)?t:t[de]}__${e}`}function Ht(t){return Wt(t,"description")}function qs(t){return Wt(t,"error")}function Qr(t){return Wt(t,"examples")}function zs(t){return Wt(t,"help")}function ei(t){return Wt(t,"title")}function Fe(t,e=!1){const n=e?` ${Qr(t)}`:"";return`${qs(t)} ${Ht(t)} ${zs(t)}${n}`}function Ft(t,e){return`${t}-${e}`}function Qe(t,e){return Wt(t,e)}function ji(t,e){return Wt(t,`optional${e}`)}function Sn(t){return!fn(t)&&(!ne(t)||Array.isArray(t)||!ge(t))}function vx(t,e){const{rootSchema:n,schemaUtils:r}=t;if(ie(e,n))return!0;if(ue in n){const i=r.retrieveSchema(n);return ie(e,un(i,Bn))}return!1}function Fc(t,e,n){return e?n:t}function Sx(t){return t?new Date(t).toJSON():void 0}function Ws(t,e,n){const r=[lm];return X(t,po)&&r.unshift(po),D(t,[...r,e],n)}function wx(t,e){if(!Array.isArray(e))return t;const n=c=>c.reduce((d,h)=>(d[h]=!0,d),{}),r=c=>c.length>1?`properties '${c.join("', '")}'`:`property '${c[0]}'`,i=n(t),s=e.filter(c=>c==="*"||i[c]),o=n(s),a=t.filter(c=>!o[c]),l=s.indexOf("*");if(l===-1){if(a.length)throw new Error(`uiSchema order list does not contain ${r(a)}`);return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const u=[...s];return u.splice(l,1,...a),u}function Oi(t,e=!0){if(!t)return{year:-1,month:-1,day:-1,hour:e?-1:0,minute:e?-1:0,second:e?-1:0};const n=new Date(t);if(Number.isNaN(n.getTime()))throw new Error(`Unable to parse date ${t}`);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:e?n.getUTCHours():0,minute:e?n.getUTCMinutes():0,second:e?n.getUTCSeconds():0}}function rn(t,e,n,r){if(!q(e))return r;const i=Ce(t,e,n,r);if(Array.isArray(r)){const c=i.items;if(!c)return r;let d=!1;const h=r.map((g,f)=>{let p=c;Array.isArray(c)&&(p=c[f]||i.additionalItems||{});const y=rn(t,p,n,g);return y!==g&&(d=!0),y===void 0?{}:y});return d?h:r}const{properties:s,required:o=[]}=i;if(!q(r)||!s)return r;const a={},l=r;let u=!1;for(const c of Object.keys(l)){const d=l[c],h=s[c]||{},g=o.includes(c),f=q(d),p=Array.isArray(d);if((f||p)&&s[c]){const y=rn(t,h,n,d);(g||!zn(y))&&(a[c]=y,u=!0)}else(g||!zn(d)||!s[c])&&(a[c]=d,zn(d)||(u=!0))}if(!(!u&&Object.keys(a).length===0))return a}function jx(t,e,n){var r,i;const s=(r=t[Bn])!==null&&r!==void 0?r:t[ue],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!e||ge(e)?l={...a}:l=Mt(a,e):l=e||{},o){let u=t;if(s&&t[ue]&&!t[Bn])try{u=Zn(s,n.rootSchema)}catch(c){return console.warn(`could not resolve $ref in resolveUiSchema:
3
- `,c),l}for(const c of[W,ee]){const d=u[c];if(Array.isArray(d)&&d.length>0){const h=l[c],g=Array.isArray(h)?[...h]:[];let f=!1;for(let p=0;p<d.length;p++){const y=d[p],x=(i=y?.[Bn])!==null&&i!==void 0?i:y?.[ue];if(x&&x in o){const S=g[p]||{};g[p]=Mt(o[x],S),f=!0}}f&&(l[c]=g)}}}return l}function Wn(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return Wn(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return Wn(t.oneOf[0]);if(t.allOf){const e=n=>Wn(n);return t.allOf.some(e)}return!1}function ga(t,e){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){const s=n[i];if(!Object.hasOwn(e,s)||!Object.is(t[s],e[s]))return!1}return!0}function $c(t,e,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=t;return!ga(o,e)||!ga(a,n)}const{props:i,state:s}=t;return!ie(i,e)||!ie(s,n)}function ya(t){const e=tc(t.map(n=>ne(n)?Le(n):void 0).flat().filter(n=>n!==void 0));return e.length===1?e[0]:e}function fr(t,e,n,r){const{enableOptionalDataFieldForType:i=[]}=B(r,t.globalUiOptions);let s;return ee in e&&Array.isArray(e[ee])?s=ya(e[ee]):W in e&&Array.isArray(e[W])?s=ya(e[W]):s=Le(e),!vx(t,e)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function ba(t,e=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=t,l=Date.UTC(n,r-1,i,s,o,a),u=new Date(l).toJSON();return e?u:u.slice(0,10)}function Hs(t,e=[]){if(!t)return[];let n=[];return Ae in t&&(n=n.concat(t[Ae].map(r=>{const i=`.${e.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(t).reduce((r,i)=>{if(i!==Ae){const s=t[i];if(Et(s))return r.concat(Hs(s,[...e,i]))}return r},n)}function Dc(t){return we(t)?yn(t,At):ir(t)?[t]:_s(pl(Ss(t)))}function Ox(t){const e=new _c;return t.length&&t.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:Dc(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&e.addErrors(i,s)}),e.ErrorSchema}function Be(t,e,n,r){const i=Array.isArray(n)?n:n?.path,s=t===""?[]:[t],o=i?i.concat(...s):s,a=[e.idPrefix,...o].join(e.idSeparator);let l;return e.nameGenerator&&o.length>0&&(l=e.nameGenerator(o,e.idPrefix,r)),{path:o,[de]:a,...l!==void 0&&{name:l}}}function Rc(t){return Object.keys(t).reduce((e,n)=>{if(n==="addError")return e;const r=t[n];return Et(r)?{...e,[n]:Rc(r)}:{...e,[n]:r}},{})}function Ex(t){return Object.values(t).every(e=>e!==-1)}function Ax(t){const{className:e="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:u,autofocus:c,registry:d,onBlur:h,onFocus:g}=t,f=`${o}_${n}`,{SelectWidget:p}=d.widgets,y=N.useCallback(x=>s(n,x),[s,n]);return m.jsx(p,{schema:{type:"integer"},id:f,name:a,className:e,options:{enumOptions:Oc(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:u,autofocus:c,onChange:y,onBlur:h,onFocus:g,registry:d,label:"","aria-describedby":Fe(o)})}function Cx(t){const{time:e=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=t,[a,l]=N.useState(Oi(o,e));N.useEffect(()=>{l(Oi(o,e))},[e,o]);const u=N.useCallback((g,f)=>{const p={...a,[g]:typeof f>"u"?-1:f};Ex(p)?s(ba(p,e)):l(p)},[a,s,e]),c=N.useCallback(g=>{g.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),d=N.useCallback(g=>{if(g.preventDefault(),n||r)return;const f=Oi(new Date().toJSON(),e);s(ba(f,e))},[n,r,e,s]);return{elements:N.useMemo(()=>mx(a,e,i.yearsRange,i.format),[a,e,i.yearsRange,i.format]),handleChange:u,handleClear:c,handleSetNow:d}}function Kt(t){const e=N.useRef(t);return ie(t,e.current)||(e.current=t),e.current}function _x(t,e){return t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function Ix(t){const{name:e,size:n,type:r}=t;return new Promise((i,s)=>{const o=new window.FileReader;o.onerror=s,o.onload=a=>{var l;typeof((l=a.target)===null||l===void 0?void 0:l.result)=="string"?i({dataURL:_x(a.target.result,e),name:e,size:n,type:r}):i({dataURL:null,name:e,size:n,type:r})},o.readAsDataURL(t)})}function Tx(t){return Promise.all(Array.from(t).map(Ix))}function xa(t){return t.reduce((e,n)=>{if(!n)return e;try{const{blob:r,name:i}=nx(n);return[...e,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return e}},[])}function Nx(t,e,n=!1){const r=N.useMemo(()=>n&&t?Array.isArray(t)?t:[t]:[],[t,n]),i=N.useMemo(()=>Array.isArray(t)?xa(t):xa([t||""]),[t]),s=N.useCallback(async a=>{const u=(await Tx(a)).map(c=>c.dataURL||null);e(n?r.concat(...u):u[0])},[r,n,e]),o=N.useCallback(a=>{if(n){const l=r.filter((u,c)=>c!==a);e(l)}else e(void 0)},[r,n,e]);return{filesInfo:i,handleChange:s,handleRemove:o}}function Px(t){if(!t)return"";const e=new Date(t),n=yt(e.getFullYear(),4),r=yt(e.getMonth()+1,2),i=yt(e.getDate(),2),s=yt(e.getHours(),2),o=yt(e.getMinutes(),2),a=yt(e.getSeconds(),2),l=yt(e.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Mn(t,e,n=!1){if(!e)return t;const{errors:r,errorSchema:i}=t;let s=Hs(e),o=e;return ge(i)||(o=Mt(i,e,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function Fx(t){const e=t;for(const n in e)if(Object.hasOwn(e,n)){const r=e[n];n===ue&&typeof r=="string"&&r.startsWith("#")?e[n]=cl+r:e[n]=Ks(r)}return t}function $x(t){return t.map(e=>Ks(e))}function Ks(t){return Array.isArray(t)?$x([...t]):ne(t)?Fx({...t}):t}var G;(function(t){t.ArrayItemTitle="Item",t.MissingItems="Missing items definition",t.EmptyArray="No items yet. Use the button below to add some.",t.YesLabel="Yes",t.NoLabel="No",t.CloseLabel="Close",t.ErrorsLabel="Errors",t.NewStringDefault="New Value",t.AddButton="Add",t.AddItemButton="Add Item",t.CopyButton="Copy",t.MoveDownButton="Move down",t.MoveUpButton="Move up",t.RemoveButton="Remove",t.NowLabel="Now",t.ClearLabel="Clear",t.AriaDateLabel="Select a date",t.PreviewLabel="Preview",t.DecrementAriaLabel="Decrease value by 1",t.IncrementAriaLabel="Increase value by 1",t.OptionalObjectAdd="Add data for optional field",t.OptionalObjectRemove="Remove data for optional field",t.OptionalObjectEmptyMsg="No data for optional field",t.Type="Type",t.Value="Value",t.ClearButton="clear input",t.UnknownFieldType="Unknown field type %1",t.OptionPrefix="Option %1",t.TitleOptionPrefix="%1 option %2",t.KeyLabel="%1 Key",t.DeprecatedLabel="%1 (deprecated)",t.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',t.UnsupportedField="Unsupported field schema.",t.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",t.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",t.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",t.FilesInfo="**%1** (%2, %3 bytes)"})(G||(G={}));function Dx(t,e){var n=we(t)?Es:pc;return n(t,Wl(e))}function Rx(t,e){return t==null?!0:kl(t,e)}function ts(){return Pc("rjsf-array-item-")}function va(t){return Array.isArray(t)?t.map(e=>({key:ts(),item:e})):[]}function kc(t){return Array.isArray(t)?t.map(e=>e.item):[]}function kx(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}function Mc(t,e,n,r){let{addable:i}=B(r,t.globalUiOptions);return i!==!1&&(e.maxItems!==void 0?i=n.length<e.maxItems:i=!0),i}function Uc(t,e,n,r){if(typeof t.items=="function")try{return t.items(e,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return t.items}function Mx(t,e){const{schemaUtils:n,globalFormOptions:r}=t;let i=e.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:Ms(e)&&im(e)&&(i=e.additionalItems),n.getDefaultFormState(i)}function Ux(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:u,onBlur:c,onFocus:d,registry:h,rawErrors:g,name:f,onSelectChange:p}=t,{widgets:y,schemaUtils:x,globalFormOptions:S,globalUiOptions:E}=h,j=x.retrieveSchema(e.items,i),b=r?.items??r,v=mn(j,b),{widget:w="select",title:O,...C}=B(r,E),A=tt(e,w,y),_=O??e.title??f,I=x.getDisplayLabel(e,r,E),T=Kt(Be("",S,n,!0));return m.jsx(A,{id:T[de],name:f,multiple:!0,onChange:p,onBlur:c,onFocus:d,options:{...C,enumOptions:v},schema:e,uiSchema:r,registry:h,value:i,disabled:s,readonly:o,required:l,label:_,hideLabel:!I,placeholder:u,autofocus:a,rawErrors:g,htmlName:T.name})}function Lx(t){const{schema:e,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:u,onBlur:c,onFocus:d,formData:h=[],registry:g,rawErrors:f,name:p,onSelectChange:y}=t,{widgets:x,schemaUtils:S,globalFormOptions:E,globalUiOptions:j}=g,{widget:b,title:v,...w}=B(r,j),O=tt(e,b,x),C=v??e.title??p,A=S.getDisplayLabel(e,r,j),_=Kt(Be("",E,n,!0));return m.jsx(O,{id:_[de],name:p,multiple:!0,onChange:y,onBlur:c,onFocus:d,options:w,schema:e,uiSchema:r,registry:g,value:h,disabled:i,readonly:s,hideError:l,required:a,label:C,hideLabel:!A,placeholder:u,autofocus:o,rawErrors:f,htmlName:_.name})}function Bx(t){const{schema:e,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:u,onFocus:c,registry:d,formData:h=[],rawErrors:g,onSelectChange:f}=t,{widgets:p,schemaUtils:y,globalFormOptions:x,globalUiOptions:S}=d,{widget:E="files",title:j,...b}=B(n,S),v=tt(e,E,p),w=j??e.title??i,O=y.getDisplayLabel(e,n,S),C=Kt(Be("",x,r,!0));return m.jsx(v,{options:b,id:C[de],name:i,multiple:!0,onChange:f,onBlur:u,onFocus:c,schema:e,uiSchema:n,value:h,disabled:s,readonly:o,required:l,registry:d,autofocus:a,rawErrors:g,label:w,hideLabel:!O,htmlName:C.name})}function Lc(t){const{itemKey:e,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:u,canAdd:c,canRemove:d=!0,canMoveUp:h,canMoveDown:g,itemSchema:f,itemData:p,itemUiSchema:y,itemFieldPathId:x,itemErrorSchema:S,autofocus:E,onBlur:j,onFocus:b,onChange:v,rawErrors:w,totalItems:O,title:C,handleAddItem:A,handleCopyItem:_,handleRemoveItem:I,handleReorderItems:T}=t,{schemaUtils:P,fields:{ArraySchemaField:F,SchemaField:$},globalUiOptions:k}=a,M=Kt(x),U=F||$,J=V("ArrayFieldItemTemplate",a,l),ae=P.getDisplayLabel(f,y,k),{description:fe}=B(y),ye=!!fe||!!f.description,{orderable:L=!0,removable:le=!0,copyable:te=!1}=l,H={moveUp:L&&h,moveDown:L&&g,copy:te&&c,remove:le&&d,toolbar:!1};H.toolbar=Object.keys(H).some(xe=>H[xe]);const K=N.useCallback(xe=>{A(xe,n+1)},[A,n]),z=N.useCallback(xe=>{_(xe,n)},[_,n]),re=N.useCallback(xe=>{I(xe,n)},[I,n]),oe=N.useCallback(xe=>{T(xe,n,n-1)},[T,n]),Oe=N.useCallback(xe=>{T(xe,n,n+1)},[T,n]),Ee={children:m.jsx(U,{name:r,title:C,index:n,schema:f,uiSchema:y,formData:p,errorSchema:S,fieldPathId:M,required:kx(f),onChange:v,onBlur:j,onFocus:b,registry:a,disabled:i,readonly:o,hideError:s,autofocus:E,rawErrors:w}),buttonsProps:{fieldPathId:M,disabled:i,readonly:o,canAdd:c,hasCopy:H.copy,hasMoveUp:H.moveUp,hasMoveDown:H.moveDown,hasRemove:H.remove,index:n,totalItems:O,onAddItem:K,onCopyItem:z,onRemoveItem:re,onMoveUpItem:oe,onMoveDownItem:Oe,registry:a,schema:f,uiSchema:y},itemKey:e,className:"rjsf-array-item",disabled:i,hasToolbar:H.toolbar,index:n,totalItems:O,readonly:o,registry:a,schema:f,uiSchema:y,parentUiSchema:u,displayLabel:ae,hasDescription:ye};return m.jsx(J,{...Ee})}function Vx(t){const{schema:e,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:u=!1,autofocus:c=!1,required:d=!1,hideError:h=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,onChange:x,keyedFormData:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v}=t,w=e.title||a||o,{schemaUtils:O,fields:C,formContext:A,globalFormOptions:_,globalUiOptions:I}=g,{OptionalDataControlsField:T}=C,P=B(n,I),F=ne(e.items)?e.items:{},$=O.retrieveSchema(F),k=kc(S),M=fr(g,e,d,n),U=Sn(s),J=Mc(g,e,k,n)&&(!M||U),ae=U?S:[],fe=M?" rjsf-optional-array-field":"",ye=t.childFieldPathId??i,L=M?m.jsx(T,{...t,fieldPathId:ye}):void 0,le={canAdd:J,items:ae.map((H,K)=>{const{key:z,item:re}=H,oe=re,Oe=O.retrieveSchema(F,oe),Ee=r?r[K]:void 0,xe=Be(K,_,ye),$e=Uc(n,re,K,A),mt={itemKey:z,index:K,name:o&&`${o}-${K}`,registry:g,uiOptions:P,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:d,title:w?`${w}-${K+1}`:void 0,canAdd:J,canMoveUp:K>0,canMoveDown:K<k.length-1,itemSchema:Oe,itemFieldPathId:xe,itemErrorSchema:Ee,itemData:oe,itemUiSchema:$e,autofocus:c&&K===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:S.length,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v,onChange:x};return m.jsx(Lc,{...mt},z)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${$.type}${fe}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:u,required:d,schema:e,title:w,formData:k,rawErrors:y,registry:g,optionalDataControl:L},te=V("ArrayFieldTemplate",g,P);return m.jsx(te,{...le})}function qx(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:u=!1,autofocus:c=!1,required:d=!1,hideError:h=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,keyedFormData:x,onChange:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v}=t;let{formData:w=[]}=t;const O=e.title||a||o,{schemaUtils:C,fields:A,formContext:_,globalFormOptions:I,globalUiOptions:T}=g,P=B(n,T),{OptionalDataControlsField:F}=A,$=fr(g,e,d,n),k=Sn(r),U=(ne(e.items)?e.items:[]).map((K,z)=>C.retrieveSchema(K,w[z])),J=ne(e.additionalItems)?C.retrieveSchema(e.additionalItems,r):null,ae=t.childFieldPathId??s;w.length<U.length&&(w=w.concat(new Array(U.length-w.length)));const fe=k?x:[],ye=$?" rjsf-optional-array-field":"",L=$?m.jsx(F,{...t,fieldPathId:ae}):void 0,le=Mc(g,e,w,n)&&!!J&&(!$||k),te={canAdd:le,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${ye}`,disabled:l,fieldPathId:s,formData:r,items:fe.map((K,z)=>{const{key:re,item:oe}=K,Oe=oe,Ee=z>=U.length,xe=(Ee&&ne(e.additionalItems)?C.retrieveSchema(e.additionalItems,Oe):U[z])||{},$e=Be(z,I,ae);let mt;Ee?mt=n.additionalItems:Array.isArray(n.items)?mt=n.items[z]:mt=Uc(n,oe,z,_);const On=i?i[z]:void 0,En={index:z,itemKey:re,name:o&&`${o}-${z}`,registry:g,uiOptions:P,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:d,title:O?`${O}-${z+1}`:void 0,canAdd:le,canRemove:Ee,canMoveUp:z>=U.length+1,canMoveDown:Ee&&z<w.length-1,itemSchema:xe,itemData:Oe,itemUiSchema:mt,itemFieldPathId:$e,itemErrorSchema:On,autofocus:c&&z===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:x.length,onChange:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v};return m.jsx(Lc,{...En},re)}),onAddClick:E,readonly:u,required:d,registry:g,schema:e,uiSchema:n,title:O,errorSchema:i,rawErrors:y,optionalDataControl:L},H=V("ArrayFieldTemplate",g,P);return m.jsx(H,{...te})}function zx(t=[]){const e=N.useMemo(()=>Xe(t),[t]),[n,r]=N.useState(()=>({formDataHash:e,keyedFormData:va(t)}));let{keyedFormData:i,formDataHash:s}=n;if(e!==s){const a=Array.isArray(t)?t:[],l=i||[];i=a.length===l.length?l.map((u,c)=>({key:u.key,item:a[c]})):va(a),s=e,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=kc(a),u=Xe(l);return r({formDataHash:u,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function Wx(t){const{schema:e,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=t,{globalFormOptions:l,schemaUtils:u,translateString:c}=s,{keyedFormData:d,updateKeyedFormData:h}=zx(o),g=t.childFieldPathId??i,f=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const _ in r){const I=parseInt(_);w===void 0||I<w?ce(O,[I],r[_]):I>=w&&ce(O,[I+1],r[_])}}const C={key:ts(),item:Mx(s,e)},A=[...d];w!==void 0?A.splice(w,0,C):A.push(C),a(h(A),g.path,O)},[d,s,e,a,h,r,g]),p=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const _ in r){const I=parseInt(_);I<=w?ce(O,[I],r[_]):I>w&&ce(O,[I+1],r[_])}}const C={key:ts(),item:Bs(d[w].item)},A=[...d];w!==void 0?A.splice(w+1,0,C):A.push(C),a(h(A),g.path,O)},[d,a,h,r,g]),y=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const A in r){const _=parseInt(A);_<w?ce(O,[_],r[A]):_>w&&ce(O,[_-1],r[A])}}const C=d.filter((A,_)=>_!==w);a(h(C),g.path,O)},[d,a,h,r,g]),x=N.useCallback((v,w,O)=>{v&&(v.preventDefault(),v.currentTarget.blur());let C;if(r){C={};for(const I in r){const T=parseInt(I);T==w?ce(C,[O],r[w]):T==O?ce(C,[w],r[O]):ce(C,[I],r[T])}}function A(){const I=d.slice();return I.splice(w,1),I.splice(O,0,d[w]),I}const _=A();a(h(_),g.path,C)},[d,a,h,r,g]),S=N.useCallback((v,w,O,C)=>{a(v===void 0?null:v,w,O,C)},[a]),E=N.useCallback(v=>{a(v,g.path,void 0,g?.[de])},[a,g]),j={...t,formData:o,fieldPathId:g,onSelectChange:E},b={...t,handleAddItem:f,handleCopyItem:p,handleRemoveItem:y,handleReorderItems:x,keyedFormData:d,onChange:S};if(!(an in e)){if(!l.useFallbackUiForUnsupportedType){const w=B(n),O=V("UnsupportedFieldTemplate",s,w);return m.jsx(O,{schema:e,fieldPathId:i,reason:c(G.MissingItems),registry:s})}const v={...e,[an]:{type:void 0}};j.schema=v,b.schema=v}return u.isMultiSelect(j.schema)?m.jsx(Ux,{...j}):vc(n)?m.jsx(Lx,{...j}):Ms(j.schema)?m.jsx(qx,{...b}):u.isFilesArray(j.schema,n)?m.jsx(Bx,{...j}):m.jsx(Vx,{...b})}function Hx(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:u,hideError:c,autofocus:d,title:h,onChange:g,onFocus:f,onBlur:p,rawErrors:y}=t,{title:x}=e,{widgets:S,translateString:E,globalUiOptions:j}=o,{widget:b="checkbox",title:v,label:w=!0,enumNames:O,...C}=B(r,j),A=tt(e,b,S),_=E(G.YesLabel),I=E(G.NoLabel);let T;const P=v??x??h??n;if(Array.isArray(e.oneOf))T=mn({oneOf:e.oneOf.map($=>{if(ne($))return{...$,title:$.title||($.const===!0?_:I)}}).filter($=>$)},r);else{const $=e.enum??[!0,!1];!O&&$.length===2&&$.every(k=>typeof k=="boolean")?T=[{value:$[0],label:$[0]?_:I},{value:$[1],label:$[1]?_:I}]:T=mn({enum:$},r)}const F=N.useCallback(($,k,M)=>g($,i.path,k,M),[g,i]);return m.jsx(A,{options:{...C,enumOptions:T},schema:e,uiSchema:r,id:i.$id,name:n,onChange:F,onFocus:f,onBlur:p,label:P,hideLabel:!w,value:s,required:a,disabled:l,readonly:u,hideError:c,registry:o,autofocus:d,rawErrors:y,htmlName:i.name})}function Kx(t){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:t}}function Gx(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"?e:e==="object"?Array.isArray(t)?"array":"object":"string"}function Yx(t,e){switch(e){case"string":return String(t);case"number":{const n=Number(t);return isNaN(n)?0:n}case"boolean":return!!t;default:return t}}function Jx(t){const{id:e,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:u=!1,onBlur:c,onFocus:d,registry:h,fieldPathId:g,onChange:f,errorSchema:p}=t,{translateString:y,fields:x,globalFormOptions:S}=h,[E,j]=N.useState(Gx(n)),b=B(o),v=Kt(Be("__internal_type_selector",S,g)),w=y(G.Type),O=N.useMemo(()=>Kx(w),[w]),C=I=>{I!=null&&(j(I),f(Yx(n,I),g.path,p,e))};if(!S.useFallbackUiForUnsupportedType){const{reason:I=y(G.UnknownFieldType,[String(i.type)])}=t,T=V("UnsupportedFieldTemplate",h,b);return m.jsx(T,{schema:i,fieldPathId:g,reason:I,registry:h})}const A=V("FallbackFieldTemplate",h,b),{SchemaField:_}=x;return m.jsx(A,{schema:i,registry:h,typeSelector:m.jsx(_,{fieldPathId:v,name:`${s}__fallback_type`,schema:O,formData:E,onChange:C,onBlur:c,onFocus:d,registry:h,hideLabel:!r,disabled:l,readonly:u,required:a},n?Xe(n):"__empty__"),schemaField:m.jsx(_,{...t,schema:{type:E,title:y(G.Value),...E==="object"&&{additionalProperties:!0}}})})}function Zx(t,e){return yn(e,function(n){return t[n]})}function Xx(t){return t==null?[]:Zx(t,ze(t))}var Qx=Math.max;function ev(t,e,n,r){t=zt(t)?t:Xx(t),n=n?Hl(n):0;var i=t.length;return n<0&&(n=Qx(i+n,0)),Ct(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ql(t,e,n)>-1}var tv=Math.min;function nv(t,e,n){for(var r=ks,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,u=[];o--;){var c=t[o];l=tv(c.length,l),a[o]=i>=120&&c.length>=120?new kt(o&&c):void 0}c=t[0];var d=-1,h=a[0];e:for(;++d<i&&u.length<l;){var g=c[d],f=g;if(g=g!==0?g:0,!(h?Qn(h,f):r(u,f))){for(o=s;--o;){var p=a[o];if(!(p?Qn(p,f):r(t[o],f)))continue e}h&&h.push(f),u.push(g)}}return u}function rv(t){return Xn(t)?t:[]}var Sa=Gr(function(t){var e=yn(t,rv);return e.length&&e[0]===t[0]?nv(e):[]});function _r(t,e){return Yr(t,e)}function Bc(t){return t===void 0}var et;(function(t){t.ROW="ui:row",t.COLUMN="ui:col",t.COLUMNS="ui:columns",t.CONDITION="ui:condition"})(et||(et={}));var Hn;(function(t){t.ALL="all",t.SOME="some",t.NONE="none"})(Hn||(Hn={}));const iv=/^\$lookup=(.+)/,Ei="layoutGrid";function wa(t,e){return t??e}function sv(t){return/^\d+?$/.test(t)}const jt=Vs();function ov(t,e,n,r,i){const s=D(n,[qi],{}),o=D(n,t),a={...D(o,[vt],{}),...e,...s},l={...o};ge(a)||ce(l,[vt],a),ge(s)||ce(l,[qi],s);let{readonly:u}=B(l);return(i===!0||Bc(u)&&r===!0)&&(u=!0,X(a,si)?ce(l,[vt,si],!0):ce(l,`ui:${si}`,!0)),{fieldUiSchema:l,uiReadonly:u}}function av(t,e,n="$0m3tH1nG Un3xP3cT3d"){const r=Yi([e]).sort(),i=Yi([n]).sort();switch(t){case Hn.ALL:return _r(r,i);case Hn.SOME:return Sa(r,i).length>0;case Hn.NONE:return Sa(r,i).length===0;default:return!1}}function ti(t,e,n){let r={},i=t[e];if(Et(i)){const{children:s,className:o,...a}=i;if(i=s,o){const u=o.split(" ").map(c=>Ws(n,c,c)).join(" ");r={...a,className:u}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${e}" in ${JSON.stringify(t)}`);return{children:i,gridProps:r}}function ja(t,e,n){let r;if(sv(n)&&t&&t?.type==="array"&&X(t,an)){const i=Number(n),s=t[an];Array.isArray(s)?i>s.length?r=Rl(s):r=s[i]:r=s,e={[de]:e[de],path:[...e.path.slice(0,e.path.length-1),i]}}return{rawSchema:r,fieldPathId:e}}function lv(t,e,n,r,i){const{schemaUtils:s,globalFormOptions:o}=t;let a=n,l=i;const u=e.split("."),c=u.pop();let d=s.retrieveSchema(a,r),h=r,g=d.readOnly;u.forEach(y=>{if(l=Be(y,o,l),X(d,se))a=D(d,[se,y],{});else if(d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee,S=s.findSelectedOptionInXxxOf(d,y,x,h);a=D(S,[se,y],{})}else{const x=ja(d,l,y);a=x.rawSchema??{},l=x.fieldPathId}h=D(h,y,{}),d=s.retrieveSchema(a,h),g=wa(d.readOnly,g)});let f,p=!1;if(ge(d)&&(d=void 0),d&&c){if(d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee;d=s.findSelectedOptionInXxxOf(d,c,x,h)}l=Be(c,o,l),p=d!==void 0&&Array.isArray(d.required)&&ev(d.required,c);const y=ja(d,l,c);if(y.rawSchema?(d=y.rawSchema,l=y.fieldPathId):(d=D(d,[se,c]),d=d&&s.retrieveSchema(d)),g=wa(d?.readOnly,g),d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee,S=He(d);f={options:d[x],hasDiscriminator:!!S}}}return{schema:d,isRequired:p,isReadonly:g,optionsInfo:f,fieldPathId:l}}function cv(t,e){let n=t;return Ct(n)&&(n=Ws(e,n)),sr(n)?n:null}function uv(t,e){let n,r=null,i={},s;if(Ct(e)||Bc(e))n=e??"";else{const{name:o="",render:a,...l}=e;n=o,i=l,ge(i)||Dx(i,(u,c)=>{if(Ct(u)){const d=iv.exec(u);if(Array.isArray(d)&&d.length>1){const h=d[1];i[c]=Ws(t,h,h)}}}),r=cv(a,t),!o&&r&&(s=m.jsx(r,{...l,"data-testid":jt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function ni(t){const{childrenLayoutGridSchemaId:e,...n}=t,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return e.map(l=>N.createElement(Gs,{...n,key:`layoutGrid-${Xe(l)}`,schema:a,layoutGridSchema:l}))}function dv(t){const{layoutGridSchema:e,...n}=t,{formData:r,registry:i}=n,{children:s,gridProps:o}=ti(e,et.CONDITION,i),{operator:a,field:l="",value:u}=o,c=D(r,l,null);return av(a,c,u)?m.jsx(ni,{...n,childrenLayoutGridSchemaId:s}):null}function fv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.COLUMN,r),a=B(i),l=V("GridTemplate",r,a);return m.jsx(l,{column:!0,"data-testid":jt.col,...o,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:s})})}function mv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.COLUMNS,r),a=B(i),l=V("GridTemplate",r,a);return s.map(u=>m.jsx(l,{column:!0,"data-testid":jt.col,...o,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:[u]})},`column-${Xe(u)}`))}function hv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.ROW,r),a=B(i),l=V("GridTemplate",r,a);return m.jsx(l,{...o,"data-testid":jt.row,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:s})})}function pv(t){const{gridSchema:e,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:u,registry:c,layoutGridSchema:d,...h}=t,{onChange:g}=h,{fields:f}=c,{SchemaField:p,LayoutMultiSchemaField:y}=f,x=uv(c,e),{name:S,UIComponent:E,uiProps:j}=x,{schema:b,isRequired:v,isReadonly:w,optionsInfo:O,fieldPathId:C}=lv(c,S,n,l,s),A=Kt(C);if(x.rendered)return x.rendered;if(b){const _=O?.hasDiscriminator?y:p,{fieldUiSchema:I,uiReadonly:T}=ov(S,j,r,w,u);return m.jsx(_,{"data-testid":O?.hasDiscriminator?jt.layoutMultiSchemaField:jt.field,...h,name:S,required:v,readonly:T,schema:b,uiSchema:I,errorSchema:D(i,S),fieldPathId:A,formData:D(l,S),onChange:g,onBlur:o,onFocus:a,options:O?.options,registry:c})}return E?m.jsx(E,{"data-testid":jt.uiComponent,...h,name:S,required:v,formData:l,readOnly:!!w||u,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:c,...j}):null}function Gs(t){const{uiSchema:e}=t;let{layoutGridSchema:n}=t;const r=B(e);if(!n&&Ei in r&&ne(r[Ei])&&(n=r[Ei]),ne(n)){if(et.ROW in n)return m.jsx(hv,{...t,layoutGridSchema:n});if(et.COLUMN in n)return m.jsx(fv,{...t,layoutGridSchema:n});if(et.COLUMNS in n)return m.jsx(mv,{...t,layoutGridSchema:n});if(et.CONDITION in n)return m.jsx(dv,{...t,layoutGridSchema:n})}return m.jsx(pv,{...t,gridSchema:n})}Gs.TEST_IDS=jt;function gv(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=t,l=B(i,o.globalUiOptions),{title:u}=l,{title:c}=r,d=u||n||c||a;if(!d)return null;const h=V("TitleFieldTemplate",o,l);return m.jsx(h,{id:ei(e),title:d,required:s,schema:r,uiSchema:i,registry:o})}function Ai(t,e,n){const r="!@#!@$@#$!@$#";return t.map(({schema:s})=>s).find(s=>{const o=D(s,[se,e]);return D(o,$t,D(o,Ne,r))===n})}function Oa(t,e,n,r,i){const s=e.map(l=>n.retrieveSchema(l,i));let o=t;X(t,W)?o={...t,[W]:s}:X(t,ee)&&(o={...t,[ee]:s});const a=mn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function yv(t){const{name:e,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:u,registry:c,uiSchema:d,schema:h,autofocus:g,readonly:f,required:p,errorSchema:y,hideError:x=!1}=t,{widgets:S,schemaUtils:E,globalUiOptions:j}=c,[b,v]=N.useState(Oa(h,l,E,d,i)),w=D(s,de),O=He(h),C=V("FieldErrorTemplate",c,l),A=V("FieldTemplate",c,l),_=Xe(h),I=Xe(l),T=d?Xe(d):"",P=i?Xe(i):"";N.useEffect(()=>{v(Oa(h,l,E,d,i))},[_,I,E,T,P]);const{widget:F=O?"radio":"select",title:$="",placeholder:k="",optionsSchemaSelector:M=O,hideError:U,...J}=B(d);if(!M)throw new Error("No selector field provided for the LayoutMultiSchemaField");const ae=D(i,M);let fe=D(b[0]?.schema,[se,M],{});const ye=Ai(b,M,ae);fe=fe?.type?fe:{...fe,type:ye?.type||n};const L=tt(fe,F,S),le=U===void 0?x:!!U,te=D(y,[Ae],[]),H=un(y,[Ae]),K=E.getDisplayLabel(h,d,j),z=Oe=>{const Ee=Ai(b,M,Oe),xe=Ai(b,M,ae);let $e=E.sanitizeDataForNewSchema(Ee,xe,i);$e&&Ee&&($e=E.getDefaultFormState(Ee,$e,"excludeObjectChildren")),$e&&ce($e,M,Oe),a($e,s.path,void 0,w)},re={enumOptions:b,...J},oe=!le&&te.length>0?m.jsx(C,{fieldPathId:s,schema:h,errors:te,registry:c}):void 0;return m.jsx(A,{fieldPathId:s,id:w,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,required:p,readonly:!!f,registry:c,displayLabel:K,errors:oe,onChange:a,onKeyRename:Er,onKeyRenameBlur:Er,onRemoveProperty:Er,children:m.jsx(L,{id:w,name:e,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,autofocus:g,readonly:f,required:p,registry:c,multiple:!1,rawErrors:te,hideError:le,hideLabel:!K,errorSchema:H,placeholder:k,onChange:z,onBlur:o,onFocus:u,value:ae,options:re,htmlName:s.name})})}class Ea extends N.Component{constructor(e){super(e);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,s=r.map(o=>i.retrieveSchema(o,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(e,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!ie(e.options,i)){const{registry:{schemaUtils:l}}=this.props,u=i.map(c=>l.retrieveSchema(c,r));a={selectedOption:o,retrievedOptions:u}}if(!ie(r,e.formData)&&s.$id===e.fieldPathId.$id){const{retrievedOptions:l}=a,u=this.getMatchingOption(o,r,l);n&&u!==o&&(a={selectedOption:u,retrievedOptions:l})}a!==this.state&&this.setState(a)}getMatchingOption(e,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=He(i);return s.getClosestMatchingOption(n,r,e,o)}onOptionChange=e=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,u=e!==void 0?parseInt(e,10):-1;if(u===n)return;const c=u>=0?r[u]:void 0,d=n>=0?r[n]:void 0;let h=l.sanitizeDataForNewSchema(c,d,i);c&&(h=l.getDefaultFormState(c,h,"excludeObjectChildren")),this.setState({selectedOption:u},()=>{s(h,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:e,schema:n}=this.props;return`${e.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:u,schema:c,uiSchema:d}=this.props,{widgets:h,fields:g,translateString:f,globalUiOptions:p,schemaUtils:y}=u,{SchemaField:x}=g,S=V("MultiSchemaFieldTemplate",u,p),E=fr(u,c,l,d),j=Sn(i),{selectedOption:b,retrievedOptions:v}=this.state,{widget:w="select",placeholder:O,autofocus:C,autocomplete:A,title:_=c.title,...I}=B(d,p),T=tt({type:"number"},w,h),P=D(r,Ae,[]),F=un(r,[Ae]),$=y.getDisplayLabel(c,d,p),k=b>=0&&v[b]||null;let M;if(k){const{required:te}=c;M=te?at({required:te},k):k}let U=[];W in c&&d&&W in d?Array.isArray(d[W])?U=d[W]:console.warn(`uiSchema.oneOf is not an array for "${_||e}"`):ee in c&&d&&ee in d&&(Array.isArray(d[ee])?U=d[ee]:console.warn(`uiSchema.anyOf is not an array for "${_||e}"`));let J=d;b>=0&&U.length>b&&(J=U[b]);const ae=_?G.TitleOptionPrefix:G.OptionPrefix,fe=_?[_]:[],ye=v.map((te,H)=>{const{title:K=te.title}=B(U[H]);return{label:K||f(ae,fe.concat(String(H+1))),value:H}}),L=!E||j?m.jsx(T,{id:this.getFieldId(),name:`${e}${c.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||ge(ye),multiple:!1,rawErrors:P,errorSchema:F,value:b>=0?b:void 0,options:{enumOptions:ye,...I},registry:u,placeholder:O,autocomplete:A,autofocus:C,label:_??e,hideLabel:!$,readonly:a}):void 0,le=M&&M.type!=="null"&&m.jsx(x,{...this.props,schema:M,uiSchema:J})||null;return m.jsx(S,{schema:c,registry:u,uiSchema:d,selector:L,optionSchemaField:le})}}const bv=/\.([0-9]*0)*$/,xv=/[0.]0*$/;function vv(t){const{registry:e,onChange:n,formData:r,value:i}=t,[s,o]=N.useState(i),{StringField:a}=e.fields;let l=r;const u=N.useCallback((c,d,h,g)=>{o(c),`${c}`.charAt(0)==="."&&(c=`0${c}`);const f=typeof c=="string"&&c.match(bv)?ho(c.replace(xv,"")):ho(c);n(f,d,h,g)},[n]);if(typeof s=="string"&&typeof l=="number"){const c=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(c)&&(l=s)}return m.jsx(a,{...t,formData:l,onChange:u})}function Je(){return Je=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Je.apply(null,arguments)}const yr=["strong","em","del","mark"],Aa=[["**",yr[0]],["__",yr[0]],["~~",yr[2]],["==",yr[3]],["*","em"],["_","em"]];function Sv(t,e){for(var n=1,r=e+1;r<t.length&&n>0;)t[r]!=="\\"?(t[r]==="["&&n++,t[r]==="]"&&n--,r++):r+=2;if(n===0&&r<t.length&&(t[r]==="("||t[r]==="[")){var i=t[r]==="("?")":"]",s=1;for(r++;r<t.length&&s>0;)t[r]!=="\\"?(t[r]==="("&&i===")"&&s++,t[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function wv(t,e){if(!e||!e.inline&&!e.simple)return null;var n=t[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=Aa[o][0];if(t.startsWith(a)&&t.length>=2*a.length){r=a,i=a.length,s=Aa[o][1];break}}if(!r)return null;for(var l=i,u=!1,c=!1,d="",h=0,g="",f=!1,p="";l<t.length;){var y=t[l];if(f)g+=y,f=!1,p=y,l++;else if(y!=="\\")if(y!=="`"||h!==0){if(y==="["&&!u&&h===0){var x=Sv(t,l);if(x!==-1){g+=t.slice(l,x),l=x,p=t[x-1];continue}}if(c)g+=y,d?y===d&&(d=""):y==='"'||y==="'"?d=y:y===">"&&(c=!1),p=y,l++;else if(y!=="<"||u){if(y===`
1
+ import{b7 as ke,b8 as ro,Y as R,aI as _e,a5 as Ut,b9 as as,a2 as Se,ba as Tr,bb as qe,a3 as Iu,bc as pn,X as Q,bd as ls,be as io,bf as Tu,bg as Nu,bh as Ja,bi as Pu,bj as Fu,bk as $u,bl as Za,bm as Du,bn as Ru,b0 as Xa,a4 as nr,bo as ku,c as je,r as N,m as Ur,j as m,ag as Qa,F as cs,a as Mu,t as vr,bp as us,bq as el,br as Uu,bs as Lu,bt as Bu,b6 as tl,bu as ds,bv as Vu,bw as qu,bx as zu,by as Wu,aC as Hu,aF as Qt,az as rr,aD as gn,aA as Ku,aE as Gu,bz as Yu,aB as Ju,bA as Zu,b as lt,B as Lr,k as fs,d as Xu,E as Qu,av as ed}from"./index-DImVAVbF.js";import{P as An}from"./index-Dkn2_XlH.js";import{E as nl}from"./empty-state-BK1h6bSX.js";import{k as td,l as nd,n as rd,A as rl,o as id,p as sd,i as od,u as ad}from"./use-mcp-client-BUd73Lve.js";import{c as ld}from"./use-mcp-tools-X7HBWC_e.js";import{A as il,i as cd}from"./agent-icon-CyaUNCUi.js";import{i as ud}from"./Key01-DxV6vmid.js";import{b as dd,u as fd,a as md}from"./use-connection-CaEg8VAu.js";import{U as Cn,a as ii,e as so}from"./auth-CXKdfQgw.js";import{i as hd,c as pd,d as gd,e as yd}from"./extract-connection-data-DEqLAJD7.js";import{u as bd}from"./use-registry-connections-CavLyRKv.js";import{f as xd}from"./use-organization-settings-CC051OzF.js";import{s as vd}from"./Plus-B8hjGrBz.js";import{e as sl,S as Sd,a as wd,b as jd,c as Od,d as Ed}from"./select-DK6Dw3bS.js";import{R as oo}from"./index-BuwJdais.js";import{R as Ad,I as Cd,a as _d}from"./use-mcp-auth-status-5_OurmGs.js";import{_ as Lt}from"./index-TiJpoyWt.js";import{I as Id}from"./input-DknqPTX-.js";import{a as Td,b as Nd,P as Pd}from"./popover-Cg84_tj4.js";import{a as Fd,T as $d,b as Dd,c as Rd}from"./tooltip-CJG6XIUi.js";import{a as kd}from"./use-virtual-mcp-8lemaCfB.js";import{i as Md}from"./Check-BLoaEJHx.js";import{i as Ud}from"./SearchMd-qllwuMSr.js";import{a as Ld}from"./Users03-F8u7i7b_.js";import{u as Bd}from"./use-mobile-VS13WCcG.js";import{u as Vd}from"./use-create-virtual-mcp-BrTTPwgs.js";var qd=class{apply(t,e){if(!e.type)return;const n=Array.isArray(e.type)?e.type:[e.type],r=new Set(n);if(r.has("string")||(t.string=!1),!r.has("number")&&!r.has("integer")&&(t.number=!1),r.has("boolean")||(t.boolean=!1),r.has("null")||(t.null=!1),r.has("array")||(t.array=!1),r.has("object")||(t.object=!1),r.has("integer")&&t.number!==!1){const i=t.number||_e();i instanceof pn&&(t.number=i.int())}}},zd=class{apply(t,e){if(e.const===void 0)return;const n=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof n=="string"?t.string=qe(n):typeof n=="number"?t.number=qe(n):typeof n=="boolean"?t.boolean=qe(n):n===null?t.null=as():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},Wd=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const n={string:e.enum.filter(r=>typeof r=="string"),number:e.enum.filter(r=>typeof r=="number"),boolean:e.enum.filter(r=>typeof r=="boolean"),null:e.enum.filter(r=>r===null),array:e.enum.filter(r=>Array.isArray(r)),object:e.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};t.string=this.createTypeSchema(n.string,"string"),t.number=this.createTypeSchema(n.number,"number"),t.boolean=this.createTypeSchema(n.boolean,"boolean"),t.null=n.null.length>0?as():!1,t.array=n.array.length>0?void 0:!1,t.object=n.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return qe(t[0]);if(e==="string")return Iu(t);if(e==="number"){const[n,r,...i]=t;return Tr([qe(n),qe(r),...i.map(s=>qe(s))])}return e==="boolean"?Tr([qe(!0),qe(!1)]):!1}},Hd=class{apply(t,e){const n=e;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=$u();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),t.file=r,t.string=!1}}},Kd=class{apply(t,e){const n=e;e.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&t.string===void 0&&(t.string=R())}},Gd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||R();r instanceof ls&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Yd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||R();r instanceof ls&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Jd=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||R();if(r instanceof ls){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},Zd=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.min(n.minimum))}}},Xd=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.max(n.maximum))}}},Qd=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},ef=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},tf=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},nf=class{apply(t,e){const n=e;e.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&t.array===void 0&&(t.array=Se(ke()))}},rf=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||Se(ke())).min(n.minItems))}},sf=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||Se(ke())).max(n.maxItems))}},of=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||Se(ke());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=Se(r);if(t.array&&t.array instanceof Tu){const s=t.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}t.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?t.array=t.array||Se(ke()):t.array=Se(ke()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||Se(ke()):n.prefixItems&&(t.array=t.array||Se(ke()))}},af=class{apply(t,e){if(e.type!=="array")return;const n=e;if(!Array.isArray(n.items)||t.array===!1)return;const r=n.items.map(s=>Ie(s));let i;r.length===0?i=io([]):i=io(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),t.tuple=i,t.array=!1}},lf=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||Q({}).passthrough())}},cf=class{apply(t,e){const n=e;e.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&t.object===void 0&&(t.object=Q({}).passthrough())}},uf=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||Q({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},df=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||Q({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Gn(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,r)=>Gn(n,e[r]));if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Gn(t[i],e[i]))}return!1}function ff(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>Gn(n,i))?!1:(e.push(n),!0))}}function Nr(t,e){return t.safeParse(e).success}var mf=class{apply(t,e){if(!e.not)return t;const n=Ie(e.not);return t.refine(r=>!Nr(n,r),{message:"Value must not match the 'not' schema"})}},hf=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(ff(),{message:"Array items must be unique"})}},pf=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Ie(r)).reduce((r,i)=>Ja(r,i),t)}},gf=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Ie(e.anyOf[0]):Tr([Ie(e.anyOf[0]),Ie(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Ie(r))]);return Ja(t,n)}},yf=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const n=e.oneOf.map(r=>Ie(r));return t.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},bf=class{apply(t,e){const n=e;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ie(s));return t.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Nr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ie(n.items);for(let a=i.length;a<s.length;a++)if(!Nr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},xf=class{apply(t,e){const n=e;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return t;if(t instanceof Pu||t instanceof Fu){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ie(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?Q(r):Q(r).passthrough()}return t.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ie(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},vf=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const n=e.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?t:t.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Gn(r,i)),{message:"Value must match one of the enum values"})}},Sf=class{apply(t,e){if(e.const===void 0)return t;const n=e.const;return typeof n!="object"||n===null?t:t.refine(r=>Gn(r,n),{message:"Value must equal the const value"})}},wf=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},jf=class{apply(t,e){var n;const r=e;return!((n=r.required)!=null&&n.includes("__proto__"))||e.type!==void 0?t:ke().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(n=>Object.prototype.hasOwnProperty.call(t,n))}},Of=class{apply(t,e){var n;const r=e;if(r.contains===void 0)return t;const i=Ie(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return t.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const u of a)Nr(i,u)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Ef=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},Af=[new zd,new Wd,new qd,new Hd,new Kd,new nf,new cf,new Gd,new Yd,new Jd,new Zd,new Xd,new Qd,new ef,new tf,new af,new rf,new sf,new of,new uf,new df,new lf],Cf=[new jf,new vf,new Sf,new pf,new gf,new yf,new bf,new xf,new Of,new mf,new hf,new Ef,new wf];function Ie(t){if(typeof t=="boolean")return t?ke():ro();const e={};for(const i of Af)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||R()),e.number!==!1&&n.push(e.number||_e()),e.boolean!==!1&&n.push(e.boolean||Ut()),e.null!==!1&&n.push(e.null||as()),e.array!==!1&&n.push(e.array||Se(ke())),e.tuple!==!1&&e.tuple!==void 0&&n.push(e.tuple),e.object!==!1)if(e.object)n.push(e.object);else{const i=Nu(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}e.file!==!1&&e.file!==void 0&&n.push(e.file);let r;n.length===0?r=ro():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=Tr(n):r=ke();for(const i of Cf)r=i.apply(r,t);return r}class ao extends Event{constructor(e,n){var r,i;super(e),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,n,r){return r(lo(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(lo(this),n)}}function _f(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function $i(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map($i).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${$i(t.cause)}`:t.message:`${t}`}function lo(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var ol=t=>{throw TypeError(t)},ms=(t,e,n)=>e.has(t)||ol("Cannot "+n),Z=(t,e,n)=>(ms(t,e,"read from private field"),n?n.call(t):e.get(t)),ve=(t,e,n)=>e.has(t)?ol("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),pe=(t,e,n,r)=>(ms(t,e,"write to private field"),e.set(t,n),n),st=(t,e,n)=>(ms(t,e,"access private method"),n),Pe,Pt,Yt,Sr,Pr,Un,en,Ln,bt,Jt,sn,Zt,Fn,Ve,Di,Ri,ki,co,Mi,Ui,$n,Li,Bi;class wr extends EventTarget{constructor(e,n){var r,i;super(),ve(this,Ve),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ve(this,Pe),ve(this,Pt),ve(this,Yt),ve(this,Sr),ve(this,Pr),ve(this,Un),ve(this,en),ve(this,Ln,null),ve(this,bt),ve(this,Jt),ve(this,sn,null),ve(this,Zt,null),ve(this,Fn,null),ve(this,Ri,async s=>{var o;Z(this,Jt).reset();const{body:a,redirected:l,status:u,headers:c}=s;if(u===204){st(this,Ve,$n).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?pe(this,Yt,new URL(s.url)):pe(this,Yt,void 0),u!==200){st(this,Ve,$n).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){st(this,Ve,$n).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.OPEN);const d=new Event("open");if((o=Z(this,Fn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){st(this,Ve,$n).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const h=new TextDecoder,g=a.getReader();let f=!0;do{const{done:p,value:y}=await g.read();y&&Z(this,Jt).feed(h.decode(y,{stream:!p})),p&&(f=!1,Z(this,Jt).reset(),st(this,Ve,Li).call(this))}while(f)}),ve(this,ki,s=>{pe(this,bt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&st(this,Ve,Li).call(this,$i(s))}),ve(this,Mi,s=>{typeof s.id=="string"&&pe(this,Ln,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:Z(this,Yt)?Z(this,Yt).origin:Z(this,Pt).origin,lastEventId:s.id||""});Z(this,Zt)&&(!s.event||s.event==="message")&&Z(this,Zt).call(this,o),this.dispatchEvent(o)}),ve(this,Ui,s=>{pe(this,Un,s)}),ve(this,Bi,()=>{pe(this,en,void 0),Z(this,Pe)===this.CONNECTING&&st(this,Ve,Di).call(this)});try{if(e instanceof URL)pe(this,Pt,e);else if(typeof e=="string")pe(this,Pt,new URL(e,If()));else throw new Error("Invalid URL")}catch{throw _f("An invalid or illegal string was specified")}pe(this,Jt,td({onEvent:Z(this,Mi),onRetry:Z(this,Ui)})),pe(this,Pe,this.CONNECTING),pe(this,Un,3e3),pe(this,Pr,(r=n?.fetch)!=null?r:globalThis.fetch),pe(this,Sr,(i=n?.withCredentials)!=null?i:!1),st(this,Ve,Di).call(this)}get readyState(){return Z(this,Pe)}get url(){return Z(this,Pt).href}get withCredentials(){return Z(this,Sr)}get onerror(){return Z(this,sn)}set onerror(e){pe(this,sn,e)}get onmessage(){return Z(this,Zt)}set onmessage(e){pe(this,Zt,e)}get onopen(){return Z(this,Fn)}set onopen(e){pe(this,Fn,e)}addEventListener(e,n,r){const i=n;super.addEventListener(e,i,r)}removeEventListener(e,n,r){const i=n;super.removeEventListener(e,i,r)}close(){Z(this,en)&&clearTimeout(Z(this,en)),Z(this,Pe)!==this.CLOSED&&(Z(this,bt)&&Z(this,bt).abort(),pe(this,Pe,this.CLOSED),pe(this,bt,void 0))}}Pe=new WeakMap,Pt=new WeakMap,Yt=new WeakMap,Sr=new WeakMap,Pr=new WeakMap,Un=new WeakMap,en=new WeakMap,Ln=new WeakMap,bt=new WeakMap,Jt=new WeakMap,sn=new WeakMap,Zt=new WeakMap,Fn=new WeakMap,Ve=new WeakSet,Di=function(){pe(this,Pe,this.CONNECTING),pe(this,bt,new AbortController),Z(this,Pr)(Z(this,Pt),st(this,Ve,co).call(this)).then(Z(this,Ri)).catch(Z(this,ki))},Ri=new WeakMap,ki=new WeakMap,co=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Z(this,Ln)?{"Last-Event-ID":Z(this,Ln)}:void 0},cache:"no-store",signal:(t=Z(this,bt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},Mi=new WeakMap,Ui=new WeakMap,$n=function(t,e){var n;Z(this,Pe)!==this.CLOSED&&pe(this,Pe,this.CLOSED);const r=new ao("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r)},Li=function(t,e){var n;if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.CONNECTING);const r=new ao("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r),pe(this,en,setTimeout(Z(this,Bi),Z(this,Un)))},Bi=new WeakMap,wr.CONNECTING=0,wr.OPEN=1,wr.CLOSED=2;function If(){const t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}class Tf extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class Nf{constructor(e,n){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=nd(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Cn("No auth provider");let e;try{e=await ii(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(e!=="AUTHORIZED")throw new Cn;return await this._startOrAuth()}async _commonHeaders(){const e={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(e.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const n=rd(this._requestInit?.headers);return new Headers({...e,...n})}_startOrAuth(){const e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new wr(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await e(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:u}=so(a);this._resourceMetadataUrl=l,this._scope=u}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new Tf(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=Za.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(e){if(!this._authProvider)throw new Cn("No auth provider");if(await ii(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(e),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=so(i);if(this._resourceMetadataUrl=o,this._scope=a,await ii(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(e){this._protocolVersion=e}}const Pf="mcp";class Ff{constructor(e){this._url=e}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,n)=>{this._socket=new WebSocket(this._url,Pf),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{e()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=Za.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(e){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(e)),n()})}}function $f(){const t=new rl({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return Du(t),t}class Df{#e=$f();#t=new Map;#n=new WeakMap;getValidator(e){const n=this.#n.get(e);if(n)return n;let r;const i=s=>{if(!r){const o=Rf(e);let a=this.#t.get(o);a||(a=this.#e.compile(e),this.#t.set(o,a)),r=a}return r(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this.#e.errorsText(r.errors)}};return this.#n.set(e,i),i}}function Rf(t){return JSON.stringify(t,(e,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const kf=new Df;var uo;(function(t){t.Completable="McpCompletable"})(uo||(uo={}));class Mf extends id{constructor(e,n){super(e,n)}send(e,n){const r=Uf(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function Uf(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const n=e?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Lf extends sd{constructor(e,n){super(e,{jsonSchemaValidator:kf,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},Ru,n)}}const Bf=async(t,e,n)=>{const r=Vf(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new Lf({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Vf=(t,e,n)=>{if(t.type==="Websocket")return new Ff(new URL(t.url));if(t.type!=="SSE"&&t.type!=="HTTP")return null;const i={...t.token?{authorization:`Bearer ${t.token}`}:{},...n??{},..."headers"in t?t.headers||{}:{}};if(t.type==="SSE"){const s={requestInit:{headers:i,signal:e}};return t.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:e})}),new Nf(new URL(t.url),s)}return new Mf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},fo=t=>{try{return JSON.parse(t)}catch{return t}},hr=new Map,mo=(t,e)=>({...t,id:t.name,inputSchema:t.inputSchema?Ie(t.inputSchema):void 0,outputSchema:t.outputSchema?Ie(t.outputSchema):void 0,execute:n=>e(n.context,t.name)});function qf(t){const e=n=>"connection"in t?Bf({connection:t.connection},void 0,n):t.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,u=r){const c=t?.debugId?.(),d=c?{"x-trace-debug-id":c}:void 0,{client:h}=await e(d),{structuredContent:g,isError:f,content:p}=await h.callTool({name:String(u),arguments:l});if(f){const x=p?.[0]?.text,S=typeof x=="string"?fo(x):null,E=S?.code&&typeof t?.getErrorByStatusCode=="function"?t.getErrorByStatusCode(S.code,S.message,S.traceId):null;throw E||new Error(`Tool ${String(u)} returned an error: ${JSON.stringify(g??p)}`)}if(g!==void 0)return g;const y=p?.[0]?.text;return typeof y=="string"?fo(y):void 0}async function s(){const{client:l}=await e(),{tools:u}=await l.listTools();return u}async function o(){if(!("connection"in t))return s();const l=t.connection,u=JSON.stringify(l);try{return hr.has(u)||hr.set(u,s()),await hr.get(u)}catch(c){console.error("Failed to list tools",c),hr.delete(u);return}}async function a(){return(await o()??[]).map(u=>mo(u,i))}return i.asTool=async()=>{const u=(await o()??[]).find(c=>c.name===r);if(!u)throw new Error(`Tool ${r} not found`);return mo(u,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>ho({connection:n}):e==="forClient"?n=>ho({client:n}):globalThis[e]}});function ho(t){return qf(t)}function zf(t){return{isImplementedBy:e=>{for(const n of t){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=e.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const Wf=Q({specversion:qe("1.0").describe("CloudEvents specification version"),id:R().describe("Unique identifier for this event (UUID recommended)"),source:R().describe("Connection ID of the event publisher"),type:R().describe("Event type (e.g., 'order.created', 'user.signup')"),time:R().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:R().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:R().optional().default("application/json").describe("Content type of the data attribute"),dataschema:R().url().optional().describe("URI to the schema for the data attribute"),data:Xa().optional().describe("Event payload (any JSON value)")});Q({events:Se(Wf).min(1).describe("Batch of CloudEvents to process")});const Hf=Q({success:Ut().optional().describe("Whether this event was processed successfully"),error:R().optional().describe("Error message for this event"),retryAfter:_e().int().positive().optional().describe("Re-deliver this event after this many ms")});Q({success:Ut().optional().describe("Batch success - applies to events not in results"),error:R().optional().describe("Batch error message - applies to events not in results"),processedCount:_e().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:_e().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:nr(R(),Hf).optional().describe("Per-event results keyed by event ID")});const Kf=Q({type:qe("string"),enum:Se(R()).optional(),description:R().optional()}),Gf=Q({type:R(),description:R(),paramsSchema:nr(R(),Kf)});Q({});Q({triggers:Se(Gf)});Q({type:R(),params:nr(R(),R()),enabled:Ut(),callbackUrl:ku().optional(),callbackToken:R().min(1).optional()});Q({success:Ut()});Q({prefix:R().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:_e().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:R().optional().describe("Token for pagination from previous response"),delimiter:R().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});Q({objects:Se(Q({key:R().describe("Object key/path"),size:_e().describe("Object size in bytes"),lastModified:R().describe("Last modified timestamp"),etag:R().describe("Entity tag for the object")})),nextContinuationToken:R().optional().describe("Token for fetching next page of results"),isTruncated:Ut().describe("Whether there are more results available"),commonPrefixes:Se(R()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});Q({key:R().describe("Object key/path to get metadata for")});Q({contentType:R().optional().describe("MIME type of the object"),contentLength:_e().describe("Size of the object in bytes"),lastModified:R().describe("Last modified timestamp"),etag:R().describe("Entity tag for the object"),metadata:nr(R(),R()).optional().describe("Custom metadata key-value pairs")});Q({key:R().describe("Object key/path to generate URL for"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});Q({url:R().describe("Presigned URL for downloading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});Q({key:R().describe("Object key/path for the upload"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:R().optional().describe("MIME type for the object being uploaded")});Q({url:R().describe("Presigned URL for uploading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});Q({key:R().describe("Object key/path to delete")});Q({success:Ut().describe("Whether the deletion was successful"),key:R().describe("The key that was deleted")});Q({keys:Se(R()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});Q({deleted:Se(R()).describe("Array of successfully deleted keys"),errors:Se(Q({key:R(),message:R()})).describe("Array of errors for failed deletions")});const Yf=Q({primary:R().optional().describe("Primary brand color (hex)"),secondary:R().optional().describe("Secondary brand color (hex)"),accent:R().optional().describe("Accent / highlight color (hex)"),background:R().optional().describe("Background color (hex)"),foreground:R().optional().describe("Foreground / text color (hex)")}),Jf=Q({heading:R().optional().describe("Font family for headings"),body:R().optional().describe("Font family for body text"),code:R().optional().describe("Font family for code / monospace")}),Zf=Q({logo:R().optional().describe("Logo URL"),favicon:R().optional().describe("Favicon URL"),ogImage:R().optional().describe("Open Graph image URL")}),Xf=Q({id:R(),name:R().describe("Brand / company name"),domain:R().optional().describe("Company domain (e.g. example.com)"),colors:Yf.optional().describe("Semantic color palette"),fonts:Jf.optional().describe("Font families by role"),assets:Zf.optional().describe("Visual identity assets"),overview:R().optional().describe("Company overview / description"),tagline:R().optional().describe("Brand tagline"),tone:R().optional().describe("Tone of voice description"),metadata:nr(R(),Xa()).optional().describe("Extra design tokens and metadata")});Q({id:R().optional().describe("Brand ID. Omit to get the default brand.")});Q({});Q({items:Se(Xf)});const Qf={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function em(t){if(t)return Qf[t]}function LO(t,e){const n=t.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=e.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return zf(i).isImplementedBy(r)}const hs=N.createContext(null);function BO(t){const e=je.c(3),{children:n}=t,r=N.useContext(hs);if(!r?.tabsEl)return null;let i;return e[0]!==n||e[1]!==r.tabsEl?(i=Qa.createPortal(n,r.tabsEl),e[0]=n,e[1]=r.tabsEl,e[2]=i):i=e[2],i}function tm(t){const e=je.c(3),{children:n}=t,r=N.useContext(hs);if(!r?.actionsEl)return null;let i;return e[0]!==n||e[1]!==r.actionsEl?(i=Qa.createPortal(n,r.actionsEl),e[0]=n,e[1]=r.actionsEl,e[2]=i):i=e[2],i}const VO=tm;function qO(t){const e=je.c(21),{children:n,breadcrumb:r,hideHeader:i}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftEl:null,tabsEl:null,actionsEl:null},e[0]=s):s=e[0];const[o,a]=N.useState(s),l=N.useRef(null),u=N.useRef(null),c=N.useRef(null);let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=A=>{l.current=A,A&&a(_=>_.leftEl===A?_:{..._,leftEl:A})},e[1]=d):d=e[1];const h=d;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=A=>{u.current=A,A&&a(_=>_.tabsEl===A?_:{..._,tabsEl:A})},e[2]=g):g=e[2];const f=g;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=A=>{c.current=A,A&&a(_=>_.actionsEl===A?_:{..._,actionsEl:A})},e[3]=p):p=e[3];const y=p,x=i&&"hidden";let S;e[4]!==x?(S=Ur(x),e[4]=x,e[5]=S):S=e[5];let E;e[6]===Symbol.for("react.memo_cache_sentinel")?(E=m.jsx("div",{ref:h,className:"flex items-center gap-2 min-w-0"}),e[6]=E):E=e[6];let j;e[7]!==r?(j=m.jsxs(An.Header.Left,{children:[r,E]}),e[7]=r,e[8]=j):j=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=m.jsxs(An.Header.Right,{children:[m.jsx("div",{ref:f,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),m.jsx("div",{ref:y,className:"flex items-center gap-2 shrink-0"})]}),e[9]=b):b=e[9];let v;e[10]!==S||e[11]!==j?(v=m.jsxs(An.Header,{className:S,children:[j,b]}),e[10]=S,e[11]=j,e[12]=v):v=e[12];let w;e[13]!==n?(w=m.jsx(An.Content,{children:n}),e[13]=n,e[14]=w):w=e[14];let O;e[15]!==v||e[16]!==w?(O=m.jsxs(An,{children:[v,w]}),e[15]=v,e[16]=w,e[17]=O):O=e[17];let C;return e[18]!==o||e[19]!==O?(C=m.jsx(hs,{value:o,children:O}),e[18]=o,e[19]=O,e[20]=C):C=e[20],C}function nm(t){return t.startsWith("@")?t:`@${t}`}function rm(){const{org:t}=cs(),{data:e}=Mu.useSession(),n=dd(),r=bd(),i=xd(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!t||!e?.user?.id){vr.error("Not authenticated");return}const l=nm(a),c=(await Promise.all(s.map(async p=>{const y=hd(p.id,t.id);try{const x=await pd(p.id,t.id,t.slug,y,{where:{appName:l}});return gd(x??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!c){vr.error(`MCP Server not found in registry: ${a}`);return}const d=yd(c,t.id,e.user.id),h=d.connection_type==="STDIO",g=!!d.connection_url,f=h&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!g&&!f){vr.error("This MCP Server cannot be connected: no connection method available");return}return await n.create.mutateAsync(d),{id:d.id,connection:d}},isInstalling:n.create.isPending}}function q(t){return typeof t!="object"||t===null||typeof t.lastModified=="number"&&typeof File<"u"&&t instanceof File||typeof t.getMonth=="function"&&typeof Date<"u"&&t instanceof Date?!1:!Array.isArray(t)}function im(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),q(t.additionalItems)}function po(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const ot="__additional_property",tn="additionalProperties",Ot="allOf",ee="anyOf",Ne="const",$t="default",ps="dependencies",sm="enum",Ae="__errors",de="$id",gs="if",an="items",om="_$junk_option_schema_id$_",jr="$name",W="oneOf",Vi="patternProperties",se="properties",si="readonly",al="required",Fr="submitButtonOptions",ue="$ref",Bn="__rjsf_ref",Dn="$schema",ll="root",cl="_",am=["discriminator","propertyName"],go="formContext",lm="layoutGridLookupMap",ys="__rjsf_additionalProperties",ul="__rjsf_rootSchema",cm="ui:field",bs="ui:widget",vt="ui:options",qi="ui:globalOptions",um="ui:definitions",dm="https://json-schema.org/draft/2019-09/schema",Or="https://json-schema.org/draft/2020-12/schema";function B(t={},e={}){return t?Object.keys(t).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=t[r];return r===bs&&q(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===vt&&q(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function dl(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=B(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var fl=typeof global=="object"&&global&&global.Object===Object&&global,fm=typeof self=="object"&&self&&self.Object===Object&&self,nt=fl||fm||Function("return this")(),Me=nt.Symbol,ml=Object.prototype,mm=ml.hasOwnProperty,hm=ml.toString,_n=Me?Me.toStringTag:void 0;function pm(t){var e=mm.call(t,_n),n=t[_n];try{t[_n]=void 0;var r=!0}catch{}var i=hm.call(t);return r&&(e?t[_n]=n:delete t[_n]),i}var gm=Object.prototype,ym=gm.toString;function bm(t){return ym.call(t)}var xm="[object Null]",vm="[object Undefined]",yo=Me?Me.toStringTag:void 0;function ct(t){return t==null?t===void 0?vm:xm:yo&&yo in Object(t)?pm(t):bm(t)}function hl(t,e){return function(n){return t(e(n))}}var Br=hl(Object.getPrototypeOf,Object);function Ue(t){return t!=null&&typeof t=="object"}var Sm="[object Object]",wm=Function.prototype,jm=Object.prototype,pl=wm.toString,Om=jm.hasOwnProperty,Em=pl.call(Object);function Et(t){if(!Ue(t)||ct(t)!=Sm)return!1;var e=Br(t);if(e===null)return!0;var n=Om.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&pl.call(n)==Em}function zi(t){const e={[Ae]:[],addError(n){this[Ae].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:zi(r)}),e);if(Et(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:zi(n[i])}),e)}return e}var we=Array.isArray,Am="[object Symbol]";function ir(t){return typeof t=="symbol"||Ue(t)&&ct(t)==Am}var Cm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_m=/^\w*$/;function xs(t,e){if(we(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||ir(t)?!0:_m.test(t)||!Cm.test(t)||e!=null&&t in Object(e)}function ne(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Im="[object AsyncFunction]",Tm="[object Function]",Nm="[object GeneratorFunction]",Pm="[object Proxy]";function sr(t){if(!ne(t))return!1;var e=ct(t);return e==Tm||e==Nm||e==Im||e==Pm}var oi=nt["__core-js_shared__"],bo=(function(){var t=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Fm(t){return!!bo&&bo in t}var $m=Function.prototype,Dm=$m.toString;function Bt(t){if(t!=null){try{return Dm.call(t)}catch{}try{return t+""}catch{}}return""}var Rm=/[\\^$.*+?()[\]{}|]/g,km=/^\[object .+?Constructor\]$/,Mm=Function.prototype,Um=Object.prototype,Lm=Mm.toString,Bm=Um.hasOwnProperty,Vm=RegExp("^"+Lm.call(Bm).replace(Rm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qm(t){if(!ne(t)||Fm(t))return!1;var e=sr(t)?Vm:km;return e.test(Bt(t))}function zm(t,e){return t?.[e]}function Vt(t,e){var n=zm(t,e);return qm(n)?n:void 0}var Yn=Vt(Object,"create");function Wm(){this.__data__=Yn?Yn(null):{},this.size=0}function Hm(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Km="__lodash_hash_undefined__",Gm=Object.prototype,Ym=Gm.hasOwnProperty;function Jm(t){var e=this.__data__;if(Yn){var n=e[t];return n===Km?void 0:n}return Ym.call(e,t)?e[t]:void 0}var Zm=Object.prototype,Xm=Zm.hasOwnProperty;function Qm(t){var e=this.__data__;return Yn?e[t]!==void 0:Xm.call(e,t)}var eh="__lodash_hash_undefined__";function th(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Yn&&e===void 0?eh:e,this}function Dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Dt.prototype.clear=Wm;Dt.prototype.delete=Hm;Dt.prototype.get=Jm;Dt.prototype.has=Qm;Dt.prototype.set=th;function nh(){this.__data__=[],this.size=0}function or(t,e){return t===e||t!==t&&e!==e}function Vr(t,e){for(var n=t.length;n--;)if(or(t[n][0],e))return n;return-1}var rh=Array.prototype,ih=rh.splice;function sh(t){var e=this.__data__,n=Vr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ih.call(e,n,1),--this.size,!0}function oh(t){var e=this.__data__,n=Vr(e,t);return n<0?void 0:e[n][1]}function ah(t){return Vr(this.__data__,t)>-1}function lh(t,e){var n=this.__data__,r=Vr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ut(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ut.prototype.clear=nh;ut.prototype.delete=sh;ut.prototype.get=oh;ut.prototype.has=ah;ut.prototype.set=lh;var Jn=Vt(nt,"Map");function ch(){this.size=0,this.__data__={hash:new Dt,map:new(Jn||ut),string:new Dt}}function uh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qr(t,e){var n=t.__data__;return uh(e)?n[typeof e=="string"?"string":"hash"]:n.map}function dh(t){var e=qr(this,t).delete(t);return this.size-=e?1:0,e}function fh(t){return qr(this,t).get(t)}function mh(t){return qr(this,t).has(t)}function hh(t,e){var n=qr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dt.prototype.clear=ch;dt.prototype.delete=dh;dt.prototype.get=fh;dt.prototype.has=mh;dt.prototype.set=hh;var ph="Expected a function";function vs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ph);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(vs.Cache||dt),n}vs.Cache=dt;var gh=500;function yh(t){var e=vs(t,function(r){return n.size===gh&&n.clear(),r}),n=e.cache;return e}var bh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xh=/\\(\\)?/g,gl=yh(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(bh,function(n,r,i,s){e.push(i?s.replace(xh,"$1"):r||n)}),e});function yn(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var xo=Me?Me.prototype:void 0,vo=xo?xo.toString:void 0;function yl(t){if(typeof t=="string")return t;if(we(t))return yn(t,yl)+"";if(ir(t))return vo?vo.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Ss(t){return t==null?"":yl(t)}function bn(t,e){return we(t)?t:xs(t,e)?[t]:gl(Ss(t))}function At(t){if(typeof t=="string"||ir(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function zr(t,e){e=bn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[At(e[n++])];return n&&n==r?t:void 0}function D(t,e,n){var r=t==null?void 0:zr(t,e);return r===void 0?n:r}const{getOwnPropertyNames:vh,getOwnPropertySymbols:Sh}=Object,{hasOwnProperty:wh}=Object.prototype;function ai(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function pr(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:s}=i,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);const l=t(n,r,i);return s.delete(n),s.delete(r),l}}function So(t){return vh(t).concat(Sh(t))}const jh=Object.hasOwn||((t,e)=>wh.call(t,e)),Oh="__v",Eh="__o",Ah="_owner",{getOwnPropertyDescriptor:wo,keys:jo}=Object,qt=Object.is||function(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n};function Ch(t,e){return t===e}function _h(t,e){return t.byteLength===e.byteLength&&$r(new Uint8Array(t),new Uint8Array(e))}function Ih(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function Th(t,e){return t.byteLength===e.byteLength&&$r(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Nh(t,e){return qt(t.getTime(),e.getTime())}function Ph(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Oo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const u=e.entries();let c=!1,d=0;for(;(a=u.next())&&!a.done;){if(i[d]){d++;continue}const h=o.value,g=a.value;if(n.equals(h[0],g[0],l,d,t,e,n)&&n.equals(h[1],g[1],h[0],g[0],t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}function Fh(t,e,n){const r=jo(t);let i=r.length;if(jo(e).length!==i)return!1;for(;i-- >0;)if(!bl(t,e,n,r[i]))return!1;return!0}function In(t,e,n){const r=So(t);let i=r.length;if(So(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!bl(t,e,n,s)||(o=wo(t,s),a=wo(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function $h(t,e){return qt(t.valueOf(),e.valueOf())}function Dh(t,e){return t.source===e.source&&t.flags===e.flags}function Eo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let o,a;for(;(o=s.next())&&!o.done;){const l=e.values();let u=!1,c=0;for(;(a=l.next())&&!a.done;){if(!i[c]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function $r(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Rh(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function bl(t,e,n,r){return(r===Ah||r===Eh||r===Oh)&&(t.$$typeof||e.$$typeof)?!0:jh(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const kh=Object.prototype.toString;function Mh(t){const e=Vh(t),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:u,getUnsupportedCustomComparator:c}=t;return function(h,g,f){if(h===g)return!0;if(h==null||g==null)return!1;const p=typeof h;if(p!==typeof g)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(h,g,f):p==="function"?i(h,g,f):!1;const y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return a(h,g,f);if(y===Array)return n(h,g,f);if(y===Date)return r(h,g,f);if(y===RegExp)return l(h,g,f);if(y===Map)return s(h,g,f);if(y===Set)return u(h,g,f);if(y===Promise)return!1;if(Array.isArray(h))return n(h,g,f);const x=kh.call(h),S=e[x];if(S)return S(h,g,f);const E=c&&c(h,g,f,x);return E?E(h,g,f):!1}}function Uh({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:_h,areArraysEqual:n?In:Ih,areDataViewsEqual:Th,areDatesEqual:Nh,areErrorsEqual:Ph,areFunctionsEqual:Ch,areMapsEqual:n?ai(Oo,In):Oo,areNumbersEqual:qt,areObjectsEqual:n?In:Fh,arePrimitiveWrappersEqual:$h,areRegExpsEqual:Dh,areSetsEqual:n?ai(Eo,In):Eo,areTypedArraysEqual:n?ai($r,In):$r,areUrlsEqual:Rh,getUnsupportedCustomComparator:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=pr(r.areArraysEqual),s=pr(r.areMapsEqual),o=pr(r.areObjectsEqual),a=pr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Lh(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Bh({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:u=t?new WeakMap:void 0,meta:c}=n();return e(a,l,{cache:u,equals:r,meta:c,strict:i})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return e(a,l,s)}}function Vh({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:g}){return{"[object Arguments]":l,"[object Array]":e,"[object ArrayBuffer]":t,"[object AsyncGeneratorFunction]":s,"[object BigInt]":a,"[object BigInt64Array]":h,"[object BigUint64Array]":h,"[object Boolean]":u,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":h,"[object Float32Array]":h,"[object Float64Array]":h,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":h,"[object Int16Array]":h,"[object Int32Array]":h,"[object Map]":o,"[object Number]":u,"[object Object]":(f,p,y)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,y),"[object RegExp]":c,"[object Set]":d,"[object String]":u,"[object URL]":g,"[object Uint8Array]":h,"[object Uint8ClampedArray]":h,"[object Uint16Array]":h,"[object Uint32Array]":h}}ft();ft({strict:!0});ft({circular:!0});ft({circular:!0,strict:!0});ft({createInternalComparator:()=>qt});ft({strict:!0,createInternalComparator:()=>qt});ft({circular:!0,createInternalComparator:()=>qt});ft({circular:!0,createInternalComparator:()=>qt,strict:!0});function ft(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=Uh(t),o=Mh(s),a=n?n(o):Lh(o);return Bh({circular:e,comparator:o,createState:r,equals:a,strict:i})}const ie=ft({circular:!0,createCustomConfig:()=>({areFunctionsEqual(t,e){return typeof e=="function"}})});var Tn={exports:{}},li,Ao;function xl(){if(Ao)return li;Ao=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),r=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(b){let v="",w=0,O=0;for(O=0;O<b.length;O++)if(w=b[O].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=b[O];break}for(O+=1;O<b.length;O++){if(w=b[O].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=b[O]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(b){return b.length=0,!0}function l(b,v,w){if(b.length){const O=s(b);if(O!=="")v.push(O);else return w.error=!0,!1;b.length=0}return!0}function u(b){let v=0;const w={error:!1,address:"",zone:""},O=[],C=[];let A=!1,_=!1,I=l;for(let T=0;T<b.length;T++){const P=b[T];if(!(P==="["||P==="]"))if(P===":"){if(A===!0&&(_=!0),!I(C,O,w))break;if(++v>7){w.error=!0;break}T>0&&b[T-1]===":"&&(A=!0),O.push(":");continue}else if(P==="%"){if(!I(C,O,w))break;I=a}else{C.push(P);continue}}return C.length&&(I===a?w.zone=C.join(""):_?O.push(C.join("")):O.push(s(C))),w.address=O.join(""),w}function c(b){if(d(b,":")<2)return{host:b,isIPV6:!1};const v=u(b);if(v.error)return{host:b,isIPV6:!1};{let w=v.address,O=v.address;return v.zone&&(w+="%"+v.zone,O+="%25"+v.zone),{host:w,isIPV6:!0,escapedHost:O}}}function d(b,v){let w=0;for(let O=0;O<b.length;O++)b[O]===v&&w++;return w}function h(b){let v=b;const w=[];let O=-1,C=0;for(;C=v.length;){if(C===1){if(v===".")break;if(v==="/"){w.push("/");break}else{w.push(v);break}}else if(C===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){w.push("/");break}}else if(C===3&&v==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),w.length!==0&&w.pop();continue}}if((O=v.indexOf("/",1))===-1){w.push(v);break}else w.push(v.slice(0,O)),v=v.slice(O)}return w.join("")}const g={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function y(b,v){const w=v?p:f;return w.lastIndex=0,b.replace(w,O=>g[O])}function x(b,v=!1){if(b.indexOf("%")===-1)return b;let w="";for(let O=0;O<b.length;O++){if(b[O]==="%"&&O+2<b.length){const C=b.slice(O+1,O+3);if(n(C)){const A=C.toUpperCase(),_=String.fromCharCode(parseInt(A,16));v&&r(_)?w+=_:w+="%"+A,O+=2;continue}}w+=b[O]}return w}function S(b){let v="";for(let w=0;w<b.length;w++){if(b[w]==="%"&&w+2<b.length){const O=b.slice(w+1,w+3);if(n(O)){const C=O.toUpperCase(),A=String.fromCharCode(parseInt(C,16));A!=="."&&r(A)?v+=A:v+="%"+C,w+=2;continue}}i(b[w])?v+=b[w]:v+=escape(b[w])}return v}function E(b){let v="";for(let w=0;w<b.length;w++){if(b[w]==="%"&&w+2<b.length){const O=b.slice(w+1,w+3);if(n(O)){v+="%"+O.toUpperCase(),w+=2;continue}}v+=escape(b[w])}return v}function j(b){const v=[];if(b.userinfo!==void 0&&(v.push(b.userinfo),v.push("@")),b.host!==void 0){let w=unescape(b.host);if(!e(w)){const O=c(w);O.isIPV6===!0?w=`[${O.escapedHost}]`:w=y(w,!1)}v.push(w)}return(typeof b.port=="number"||typeof b.port=="string")&&(v.push(":"),v.push(String(b.port))),v.length?v.join(""):void 0}return li={nonSimpleDomain:o,recomposeAuthority:j,reescapeHostDelimiters:y,normalizePercentEncoding:x,normalizePathEncoding:S,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:e,isUUID:t,normalizeIPv6:c,stringArrayToHexStripped:s},li}var ci,Co;function qh(){if(Co)return ci;Co=1;const{isUUID:t}=xl(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(b){return n.indexOf(b)!==-1}function i(b){return b.secure===!0?!0:b.secure===!1?!1:b.scheme?b.scheme.length===3&&(b.scheme[0]==="w"||b.scheme[0]==="W")&&(b.scheme[1]==="s"||b.scheme[1]==="S")&&(b.scheme[2]==="s"||b.scheme[2]==="S"):!1}function s(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function o(b){const v=String(b.scheme).toLowerCase()==="https";return(b.port===(v?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function a(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function l(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){const[v,w]=b.resourceName.split("?");b.path=v&&v!=="/"?v:void 0,b.query=w,b.resourceName=void 0}return b.fragment=void 0,b}function u(b,v){if(!b.path)return b.error="URN can not be parsed",b;const w=b.path.match(e);if(w){const O=v.scheme||b.scheme||"urn";b.nid=w[1].toLowerCase(),b.nss=w[2];const C=`${O}:${v.nid||b.nid}`,A=j(C);b.path=void 0,A&&(b=A.parse(b,v))}else b.error=b.error||"URN can not be parsed.";return b}function c(b,v){if(b.nid===void 0)throw new Error("URN without nid cannot be serialized");const w=v.scheme||b.scheme||"urn",O=b.nid.toLowerCase(),C=`${w}:${v.nid||O}`,A=j(C);A&&(b=A.serialize(b,v));const _=b,I=b.nss;return _.path=`${O||v.nid}:${I}`,v.skipEscape=!0,_}function d(b,v){const w=b;return w.uuid=w.nss,w.nss=void 0,!v.tolerant&&(!w.uuid||!t(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function h(b){const v=b;return v.nss=(b.uuid||"").toLowerCase(),v}const g={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:g.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},y={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},E={http:g,https:f,ws:p,wss:y,urn:{scheme:"urn",parse:u,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(E,null);function j(b){return b&&(E[b]||E[b.toLowerCase()])||void 0}return ci={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:j},ci}var _o;function zh(){if(_o)return Tn.exports;_o=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=xl(),{SCHEMES:u,getSchemeHandler:c}=qh();function d(O,C){return typeof O=="string"?O=j(O,C):typeof O=="object"&&(O=E(p(O,C),C)),O}function h(O,C,A){const _=A?Object.assign({scheme:"null"},A):{scheme:"null"},I=g(E(O,_),E(C,_),_,!0);return _.skipEscape=!0,p(I,_)}function g(O,C,A,_){const I={};return _||(O=E(p(O,A),A),C=E(p(C,A),A)),A=A||{},!A.tolerant&&C.scheme?(I.scheme=C.scheme,I.userinfo=C.userinfo,I.host=C.host,I.port=C.port,I.path=e(C.path||""),I.query=C.query):(C.userinfo!==void 0||C.host!==void 0||C.port!==void 0?(I.userinfo=C.userinfo,I.host=C.host,I.port=C.port,I.path=e(C.path||""),I.query=C.query):(C.path?(C.path[0]==="/"?I.path=e(C.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?I.path="/"+C.path:O.path?I.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+C.path:I.path=C.path,I.path=e(I.path)),I.query=C.query):(I.path=O.path,C.query!==void 0?I.query=C.query:I.query=O.query),I.userinfo=O.userinfo,I.host=O.host,I.port=O.port),I.scheme=O.scheme),I.fragment=C.fragment,I}function f(O,C,A){const _=v(O,A),I=v(C,A);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(O,C){const A={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},_=Object.assign({},C),I=[],T=c(_.scheme||A.scheme);T&&T.serialize&&T.serialize(A,_),A.path!==void 0&&(_.skipEscape?A.path=r(A.path):(A.path=s(A.path),A.scheme!==void 0&&(A.path=A.path.split("%3A").join(":")))),_.reference!=="suffix"&&A.scheme&&I.push(A.scheme,":");const P=n(A);if(P!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(P),A.path&&A.path[0]!=="/"&&I.push("/")),A.path!==void 0){let F=A.path;!_.absolutePath&&(!T||!T.absolutePath)&&(F=e(F)),P===void 0&&F[0]==="/"&&F[1]==="/"&&(F="/%2F"+F.slice(2)),I.push(F)}return A.query!==void 0&&I.push("?",A.query),A.fragment!==void 0&&I.push("#",A.fragment),I.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function x(O,C){if(C[2]!==void 0&&O.path&&O.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof O.port=="number"&&(O.port<0||O.port>65535))return"URI port is malformed."}function S(O,C){const A=Object.assign({},C),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;A.reference==="suffix"&&(A.scheme?O=A.scheme+":"+O:O="//"+O);const P=O.match(y);if(P){_.scheme=P[1],_.userinfo=P[3],_.host=P[4],_.port=parseInt(P[5],10),_.path=P[6]||"",_.query=P[7],_.fragment=P[8],isNaN(_.port)&&(_.port=P[5]);const F=x(_,P);if(F!==void 0&&(_.error=_.error||F,I=!0),_.host)if(a(_.host)===!1){const M=t(_.host);_.host=M.host.toLowerCase(),T=M.isIPV6}else T=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",A.reference&&A.reference!=="suffix"&&A.reference!==_.reference&&(_.error=_.error||"URI is not a "+A.reference+" reference.");const $=c(A.scheme||_.scheme);if(!A.unicodeSupport&&(!$||!$.unicodeSupport)&&_.host&&(A.domainHost||$&&$.domainHost)&&T===!1&&l(_.host))try{_.host=new URL("http://"+_.host).hostname}catch(k){_.error=_.error||"Host's domain name can not be converted to ASCII: "+k}if((!$||$&&!$.skipNormalize)&&(O.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=o(unescape(_.host),T))),_.path&&(_.path=i(_.path)),_.fragment))try{_.fragment=encodeURI(decodeURIComponent(_.fragment))}catch{_.error=_.error||"URI malformed"}$&&$.parse&&$.parse(_,A)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function E(O,C){return S(O,C).parsed}function j(O,C){return b(O,C).normalized}function b(O,C){const{parsed:A,malformedAuthorityOrPort:_}=S(O,C);return{normalized:_?O:p(A,C),malformedAuthorityOrPort:_}}function v(O,C){if(typeof O=="string"){const{normalized:A,malformedAuthorityOrPort:_}=b(O,C);return _?void 0:A}if(typeof O=="object")return p(O,C)}const w={SCHEMES:u,normalize:d,resolve:h,resolveComponent:g,equal:f,serialize:p,parse:E};return Tn.exports=w,Tn.exports.default=w,Tn.exports.fastUri=w,Tn.exports}var Wh=zh();const ws=us(Wh);var Nn={},Io;function Hh(){if(Io)return Nn;Io=1;var t=/~/,e=/~[01]/g;function n(u){switch(u){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+u)}function r(u){return t.test(u)?u.replace(e,n):u}function i(u,c,d){for(var h,g,f=1,p=c.length;f<p;){if(c[f]==="constructor"||c[f]==="prototype"||c[f]==="__proto__")return u;if(h=r(c[f++]),g=p>f,typeof u[h]>"u"&&(Array.isArray(u)&&h==="-"&&(h=u.length),g&&(c[f]!==""&&c[f]<1/0||c[f]==="-"?u[h]=[]:u[h]={})),!g)break;u=u[h]}var y=u[h];return d===void 0?delete u[h]:u[h]=d,y}function s(u){if(typeof u=="string"){if(u=u.split("/"),u[0]==="")return u;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(u)){for(const c of u)if(typeof c!="string"&&typeof c!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return u}throw new Error("Invalid JSON pointer.")}function o(u,c){if(typeof u!="object")throw new Error("Invalid input object.");c=s(c);var d=c.length;if(d===1)return u;for(var h=1;h<d;){if(u=u[r(c[h++])],d===h)return u;if(typeof u!="object"||u===null)return}}function a(u,c,d){if(typeof u!="object")throw new Error("Invalid input object.");if(c=s(c),c.length===0)throw new Error("Invalid JSON pointer for set.");return i(u,c,d)}function l(u){var c=s(u);return{get:function(d){return o(d,c)},set:function(d,h){return a(d,c,h)}}}return Nn.get=o,Nn.set=a,Nn.compile=l,Nn}var Kh=Hh();const ui=us(Kh);var Gh=Object.prototype;function Wr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Gh;return t===n}var Yh=hl(Object.keys,Object),Jh=Object.prototype,Zh=Jh.hasOwnProperty;function vl(t){if(!Wr(t))return Yh(t);var e=[];for(var n in Object(t))Zh.call(t,n)&&n!="constructor"&&e.push(n);return e}var Wi=Vt(nt,"DataView"),Hi=Vt(nt,"Promise"),on=Vt(nt,"Set"),Ki=Vt(nt,"WeakMap"),To="[object Map]",Xh="[object Object]",No="[object Promise]",Po="[object Set]",Fo="[object WeakMap]",$o="[object DataView]",Qh=Bt(Wi),ep=Bt(Jn),tp=Bt(Hi),np=Bt(on),rp=Bt(Ki),Re=ct;(Wi&&Re(new Wi(new ArrayBuffer(1)))!=$o||Jn&&Re(new Jn)!=To||Hi&&Re(Hi.resolve())!=No||on&&Re(new on)!=Po||Ki&&Re(new Ki)!=Fo)&&(Re=function(t){var e=ct(t),n=e==Xh?t.constructor:void 0,r=n?Bt(n):"";if(r)switch(r){case Qh:return $o;case ep:return To;case tp:return No;case np:return Po;case rp:return Fo}return e});var ip="[object Arguments]";function Do(t){return Ue(t)&&ct(t)==ip}var Sl=Object.prototype,sp=Sl.hasOwnProperty,op=Sl.propertyIsEnumerable,ln=Do((function(){return arguments})())?Do:function(t){return Ue(t)&&sp.call(t,"callee")&&!op.call(t,"callee")},ap=9007199254740991;function js(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ap}function zt(t){return t!=null&&js(t.length)&&!sr(t)}function lp(){return!1}var wl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ro=wl&&typeof module=="object"&&module&&!module.nodeType&&module,cp=Ro&&Ro.exports===wl,ko=cp?nt.Buffer:void 0,up=ko?ko.isBuffer:void 0,Rt=up||lp,dp="[object Arguments]",fp="[object Array]",mp="[object Boolean]",hp="[object Date]",pp="[object Error]",gp="[object Function]",yp="[object Map]",bp="[object Number]",xp="[object Object]",vp="[object RegExp]",Sp="[object Set]",wp="[object String]",jp="[object WeakMap]",Op="[object ArrayBuffer]",Ep="[object DataView]",Ap="[object Float32Array]",Cp="[object Float64Array]",_p="[object Int8Array]",Ip="[object Int16Array]",Tp="[object Int32Array]",Np="[object Uint8Array]",Pp="[object Uint8ClampedArray]",Fp="[object Uint16Array]",$p="[object Uint32Array]",he={};he[Ap]=he[Cp]=he[_p]=he[Ip]=he[Tp]=he[Np]=he[Pp]=he[Fp]=he[$p]=!0;he[dp]=he[fp]=he[Op]=he[mp]=he[Ep]=he[hp]=he[pp]=he[gp]=he[yp]=he[bp]=he[xp]=he[vp]=he[Sp]=he[wp]=he[jp]=!1;function Dp(t){return Ue(t)&&js(t.length)&&!!he[ct(t)]}function Os(t){return function(e){return t(e)}}var jl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=jl&&typeof module=="object"&&module&&!module.nodeType&&module,Rp=Vn&&Vn.exports===jl,di=Rp&&fl.process,cn=(function(){try{var t=Vn&&Vn.require&&Vn.require("util").types;return t||di&&di.binding&&di.binding("util")}catch{}})(),Mo=cn&&cn.isTypedArray,ar=Mo?Os(Mo):Dp,kp="[object Map]",Mp="[object Set]",Up=Object.prototype,Lp=Up.hasOwnProperty;function ge(t){if(t==null)return!0;if(zt(t)&&(we(t)||typeof t=="string"||typeof t.splice=="function"||Rt(t)||ar(t)||ln(t)))return!t.length;var e=Re(t);if(e==kp||e==Mp)return!t.size;if(Wr(t))return!vl(t).length;for(var n in t)if(Lp.call(t,n))return!1;return!0}function Bp(){this.__data__=new ut,this.size=0}function Vp(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function qp(t){return this.__data__.get(t)}function zp(t){return this.__data__.has(t)}var Wp=200;function Hp(t,e){var n=this.__data__;if(n instanceof ut){var r=n.__data__;if(!Jn||r.length<Wp-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new dt(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new ut(t);this.size=e.size}We.prototype.clear=Bp;We.prototype.delete=Vp;We.prototype.get=qp;We.prototype.has=zp;We.prototype.set=Hp;function Es(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Dr=(function(){try{var t=Vt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function As(t,e,n){e=="__proto__"&&Dr?Dr(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Kp=Object.prototype,Gp=Kp.hasOwnProperty;function Cs(t,e,n){var r=t[e];(!(Gp.call(t,e)&&or(r,n))||n===void 0&&!(e in t))&&As(t,e,n)}function xn(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?As(n,a,l):Cs(n,a,l)}return n}function Ol(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Yp=9007199254740991,Jp=/^(?:0|[1-9]\d*)$/;function Hr(t,e){var n=typeof t;return e=e??Yp,!!e&&(n=="number"||n!="symbol"&&Jp.test(t))&&t>-1&&t%1==0&&t<e}var Zp=Object.prototype,Xp=Zp.hasOwnProperty;function El(t,e){var n=we(t),r=!n&&ln(t),i=!n&&!r&&Rt(t),s=!n&&!r&&!i&&ar(t),o=n||r||i||s,a=o?Ol(t.length,String):[],l=a.length;for(var u in t)(e||Xp.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Hr(u,l)))&&a.push(u);return a}function ze(t){return zt(t)?El(t):vl(t)}function Qp(t,e){return t&&xn(e,ze(e),t)}function eg(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var tg=Object.prototype,ng=tg.hasOwnProperty;function rg(t){if(!ne(t))return eg(t);var e=Wr(t),n=[];for(var r in t)r=="constructor"&&(e||!ng.call(t,r))||n.push(r);return n}function lr(t){return zt(t)?El(t,!0):rg(t)}function ig(t,e){return t&&xn(e,lr(e),t)}var Al=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Uo=Al&&typeof module=="object"&&module&&!module.nodeType&&module,sg=Uo&&Uo.exports===Al,Lo=sg?nt.Buffer:void 0,Bo=Lo?Lo.allocUnsafe:void 0;function Cl(t,e){if(e)return t.slice();var n=t.length,r=Bo?Bo(n):new t.constructor(n);return t.copy(r),r}function _s(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function og(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function _l(){return[]}var ag=Object.prototype,lg=ag.propertyIsEnumerable,Vo=Object.getOwnPropertySymbols,Is=Vo?function(t){return t==null?[]:(t=Object(t),og(Vo(t),function(e){return lg.call(t,e)}))}:_l;function cg(t,e){return xn(t,Is(t),e)}function Ts(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var ug=Object.getOwnPropertySymbols,Il=ug?function(t){for(var e=[];t;)Ts(e,Is(t)),t=Br(t);return e}:_l;function dg(t,e){return xn(t,Il(t),e)}function Tl(t,e,n){var r=e(t);return we(t)?r:Ts(r,n(t))}function Gi(t){return Tl(t,ze,Is)}function Ns(t){return Tl(t,lr,Il)}var fg=Object.prototype,mg=fg.hasOwnProperty;function hg(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&mg.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Rr=nt.Uint8Array;function Ps(t){var e=new t.constructor(t.byteLength);return new Rr(e).set(new Rr(t)),e}function pg(t,e){var n=e?Ps(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var gg=/\w*$/;function yg(t){var e=new t.constructor(t.source,gg.exec(t));return e.lastIndex=t.lastIndex,e}var qo=Me?Me.prototype:void 0,zo=qo?qo.valueOf:void 0;function bg(t){return zo?Object(zo.call(t)):{}}function Nl(t,e){var n=e?Ps(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var xg="[object Boolean]",vg="[object Date]",Sg="[object Map]",wg="[object Number]",jg="[object RegExp]",Og="[object Set]",Eg="[object String]",Ag="[object Symbol]",Cg="[object ArrayBuffer]",_g="[object DataView]",Ig="[object Float32Array]",Tg="[object Float64Array]",Ng="[object Int8Array]",Pg="[object Int16Array]",Fg="[object Int32Array]",$g="[object Uint8Array]",Dg="[object Uint8ClampedArray]",Rg="[object Uint16Array]",kg="[object Uint32Array]";function Mg(t,e,n){var r=t.constructor;switch(e){case Cg:return Ps(t);case xg:case vg:return new r(+t);case _g:return pg(t,n);case Ig:case Tg:case Ng:case Pg:case Fg:case $g:case Dg:case Rg:case kg:return Nl(t,n);case Sg:return new r;case wg:case Eg:return new r(t);case jg:return yg(t);case Og:return new r;case Ag:return bg(t)}}var Wo=Object.create,Pl=(function(){function t(){}return function(e){if(!ne(e))return{};if(Wo)return Wo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Fl(t){return typeof t.constructor=="function"&&!Wr(t)?Pl(Br(t)):{}}var Ug="[object Map]";function Lg(t){return Ue(t)&&Re(t)==Ug}var Ho=cn&&cn.isMap,Bg=Ho?Os(Ho):Lg,Vg="[object Set]";function qg(t){return Ue(t)&&Re(t)==Vg}var Ko=cn&&cn.isSet,zg=Ko?Os(Ko):qg,Wg=1,Hg=2,Kg=4,$l="[object Arguments]",Gg="[object Array]",Yg="[object Boolean]",Jg="[object Date]",Zg="[object Error]",Dl="[object Function]",Xg="[object GeneratorFunction]",Qg="[object Map]",ey="[object Number]",Rl="[object Object]",ty="[object RegExp]",ny="[object Set]",ry="[object String]",iy="[object Symbol]",sy="[object WeakMap]",oy="[object ArrayBuffer]",ay="[object DataView]",ly="[object Float32Array]",cy="[object Float64Array]",uy="[object Int8Array]",dy="[object Int16Array]",fy="[object Int32Array]",my="[object Uint8Array]",hy="[object Uint8ClampedArray]",py="[object Uint16Array]",gy="[object Uint32Array]",me={};me[$l]=me[Gg]=me[oy]=me[ay]=me[Yg]=me[Jg]=me[ly]=me[cy]=me[uy]=me[dy]=me[fy]=me[Qg]=me[ey]=me[Rl]=me[ty]=me[ny]=me[ry]=me[iy]=me[my]=me[hy]=me[py]=me[gy]=!0;me[Zg]=me[Dl]=me[sy]=!1;function qn(t,e,n,r,i,s){var o,a=e&Wg,l=e&Hg,u=e&Kg;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!ne(t))return t;var c=we(t);if(c){if(o=hg(t),!a)return _s(t,o)}else{var d=Re(t),h=d==Dl||d==Xg;if(Rt(t))return Cl(t,a);if(d==Rl||d==$l||h&&!i){if(o=l||h?{}:Fl(t),!a)return l?dg(t,ig(o,t)):cg(t,Qp(o,t))}else{if(!me[d])return i?t:{};o=Mg(t,d,a)}}s||(s=new We);var g=s.get(t);if(g)return g;s.set(t,o),zg(t)?t.forEach(function(y){o.add(qn(y,e,n,y,t,s))}):Bg(t)&&t.forEach(function(y,x){o.set(x,qn(y,e,n,x,t,s))});var f=u?l?Ns:Gi:l?lr:ze,p=c?void 0:f(t);return Es(p||t,function(y,x){p&&(x=y,y=t[x]),Cs(o,x,qn(y,e,n,x,t,s))}),o}function kl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function yy(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function by(t,e){return e.length<2?t:zr(t,yy(e,0,-1))}var xy=Object.prototype,vy=xy.hasOwnProperty;function Ml(t,e){e=bn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=At(e[n]);if(i==="__proto__"&&!vy.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=by(t,e);return s==null||delete s[At(kl(e))]}function Sy(t){return Et(t)?void 0:t}var Go=Me?Me.isConcatSpreadable:void 0;function wy(t){return we(t)||ln(t)||!!(Go&&t&&t[Go])}function cr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=wy),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?cr(a,e-1,n,r,i):Ts(i,a):r||(i[i.length]=a)}return i}function Yi(t){var e=t==null?0:t.length;return e?cr(t,1):[]}function jy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var Yo=Math.max;function Ul(t,e,n){return e=Yo(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Yo(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),jy(t,this,a)}}function Oy(t){return function(){return t}}function Kr(t){return t}var Ey=Dr?function(t,e){return Dr(t,"toString",{configurable:!0,enumerable:!1,value:Oy(e),writable:!0})}:Kr,Ay=800,Cy=16,_y=Date.now;function Iy(t){var e=0,n=0;return function(){var r=_y(),i=Cy-(r-n);if(n=r,i>0){if(++e>=Ay)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Ll=Iy(Ey);function Bl(t){return Ll(Ul(t,void 0,Yi),t+"")}var Ty=1,Ny=2,Py=4,un=Bl(function(t,e){var n={};if(t==null)return n;var r=!1;e=yn(e,function(s){return s=bn(s,t),r||(r=s.length>1),s}),xn(t,Ns(t),n),r&&(n=qn(n,Ty|Ny|Py,Sy));for(var i=e.length;i--;)Ml(n,e[i]);return n});function kr(t,e){if(de in t&&ws.equal(t[de],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(ne(r)){const i=kr(r,e);if(i!==void 0)return i}}else if(ne(n)){const r=kr(n,e);if(r!==void 0)return r}}function Ji(t,e){const n=D(t,de,e);let r=t;ue in r&&(r={...r,[ue]:ws.resolve(n,r[ue])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>ne(o)?Ji(o,n):o)}:ne(s)&&(r={...r,[i]:Ji(s,n)});return r}function Fs(t,e){const n=e[t];return[un(e,[t]),n]}function Vl(t,e={},n=[],r=D(e,[de])){const i=t||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||de in e&&e[de]===o?s=ui.get(e,l):e[Dn]===Or&&(s=kr(e,o.replace(/\/$/,"")),s!==void 0&&(s=ui.get(s,l)))}else if(e[Dn]===Or){const l=o?ws.resolve(o,i):i,[u,...c]=l.replace(/#\/?$/,"").split("#");s=kr(e,u.replace(/\/$/,"")),s!==void 0&&(o=s[de],ge(c)||(s=ui.get(s,decodeURIComponent(c.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const a=s[ue];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...h]=n,g=[...h,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${g}`)}const[l,u]=Fs(ue,s),c=Vl(u,e,[...n,i],o);return Object.keys(l).length>0?e[Dn]===dm||e[Dn]===Or?{[Ot]:[l,c]}:{...l,...c}:c}return s}function Zn(t,e={},n=D(e,[de])){return Vl(t,e,[],n)}var Fy=Object.prototype,$y=Fy.hasOwnProperty;function Dy(t,e){return t!=null&&$y.call(t,e)}function ql(t,e,n){e=bn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=At(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&js(i)&&Hr(o,i)&&(we(t)||ln(t)))}function X(t,e){return t!=null&&ql(t,e,Dy)}var Ry="[object String]";function Ct(t){return typeof t=="string"||!we(t)&&Ue(t)&&ct(t)==Ry}function He(t){let e;const n=D(t,am);return Ct(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}var ky=1/0;function My(t){var e=t==null?0:t.length;return e?cr(t,ky):[]}function Zi(t,e,n){(n!==void 0&&!or(t[e],n)||n===void 0&&!(e in t))&&As(t,e,n)}function Uy(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var zl=Uy();function Xn(t){return Ue(t)&&zt(t)}function Xi(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Ly(t){return xn(t,lr(t))}function By(t,e,n,r,i,s,o){var a=Xi(t,n),l=Xi(e,n),u=o.get(l);if(u){Zi(t,n,u);return}var c=s?s(a,l,n+"",t,e,o):void 0,d=c===void 0;if(d){var h=we(l),g=!h&&Rt(l),f=!h&&!g&&ar(l);c=l,h||g||f?we(a)?c=a:Xn(a)?c=_s(a):g?(d=!1,c=Cl(l,!0)):f?(d=!1,c=Nl(l,!0)):c=[]:Et(l)||ln(l)?(c=a,ln(a)?c=Ly(a):(!ne(a)||sr(a))&&(c=Fl(l))):d=!1}d&&(o.set(l,c),i(c,l,r,s,o),o.delete(l)),Zi(t,n,c)}function Wl(t,e,n,r,i){t!==e&&zl(e,function(s,o){if(i||(i=new We),ne(s))By(t,e,o,n,Wl,r,i);else{var a=r?r(Xi(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Zi(t,o,a)}},lr)}function Gr(t,e){return Ll(Ul(t,e,Kr),t+"")}function Vy(t,e,n){if(!ne(n))return!1;var r=typeof e;return(r=="number"?zt(n)&&Hr(e,n.length):r=="string"&&e in n)?or(n[e],t):!1}function qy(t){return Gr(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&Vy(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var zy=qy(function(t,e,n){Wl(t,e,n)});function $s(t,e,n,r){if(!ne(t))return t;e=bn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=At(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var c=a[l];u=r?r(c,l,a):void 0,u===void 0&&(u=ne(c)?c:Hr(e[i+1])?[]:{})}Cs(a,l,u),a=a[l]}return t}function ce(t,e,n){return t==null?t:$s(t,e,n)}function Hl(t){return typeof t=="function"?t:Kr}var Wy=/\s/;function Hy(t){for(var e=t.length;e--&&Wy.test(t.charAt(e)););return e}var Ky=/^\s+/;function Gy(t){return t&&t.slice(0,Hy(t)+1).replace(Ky,"")}var Jo=NaN,Yy=/^[-+]0x[0-9a-f]+$/i,Jy=/^0b[01]+$/i,Zy=/^0o[0-7]+$/i,Xy=parseInt;function Qy(t){if(typeof t=="number")return t;if(ir(t))return Jo;if(ne(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ne(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Gy(t);var n=Jy.test(t);return n||Zy.test(t)?Xy(t.slice(2),n?2:8):Yy.test(t)?Jo:+t}var Zo=1/0,eb=17976931348623157e292;function tb(t){if(!t)return t===0?t:0;if(t=Qy(t),t===Zo||t===-Zo){var e=t<0?-1:1;return e*eb}return t===t?t:0}function Kl(t){var e=tb(t),n=e%1;return e===e?n?e-n:e:0}var nb=9007199254740991,fi=4294967295,rb=Math.min;function Gl(t,e){if(t=Kl(t),t<1||t>nb)return[];var n=fi,r=rb(t,fi);e=Hl(e),t-=fi;for(var i=Ol(r,e);++n<t;)e(n);return i}function Yl(t,e){return t&&zl(t,e,ze)}var ib="__lodash_hash_undefined__";function sb(t){return this.__data__.set(t,ib),this}function ob(t){return this.__data__.has(t)}function kt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new dt;++e<n;)this.add(t[e])}kt.prototype.add=kt.prototype.push=sb;kt.prototype.has=ob;function ab(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Qn(t,e){return t.has(e)}var lb=1,cb=2;function Jl(t,e,n,r,i,s){var o=n&lb,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var d=-1,h=!0,g=n&cb?new kt:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var f=t[d],p=e[d];if(r)var y=o?r(p,f,d,e,t,s):r(f,p,d,t,e,s);if(y!==void 0){if(y)continue;h=!1;break}if(g){if(!ab(e,function(x,S){if(!Qn(g,S)&&(f===x||i(f,x,n,r,s)))return g.push(S)})){h=!1;break}}else if(!(f===p||i(f,p,n,r,s))){h=!1;break}}return s.delete(t),s.delete(e),h}function ub(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Ds(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var db=1,fb=2,mb="[object Boolean]",hb="[object Date]",pb="[object Error]",gb="[object Map]",yb="[object Number]",bb="[object RegExp]",xb="[object Set]",vb="[object String]",Sb="[object Symbol]",wb="[object ArrayBuffer]",jb="[object DataView]",Xo=Me?Me.prototype:void 0,mi=Xo?Xo.valueOf:void 0;function Ob(t,e,n,r,i,s,o){switch(n){case jb:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case wb:return!(t.byteLength!=e.byteLength||!s(new Rr(t),new Rr(e)));case mb:case hb:case yb:return or(+t,+e);case pb:return t.name==e.name&&t.message==e.message;case bb:case vb:return t==e+"";case gb:var a=ub;case xb:var l=r&db;if(a||(a=Ds),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=fb,o.set(t,e);var c=Jl(a(t),a(e),r,i,s,o);return o.delete(t),c;case Sb:if(mi)return mi.call(t)==mi.call(e)}return!1}var Eb=1,Ab=Object.prototype,Cb=Ab.hasOwnProperty;function _b(t,e,n,r,i,s){var o=n&Eb,a=Gi(t),l=a.length,u=Gi(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:Cb.call(e,h)))return!1}var g=s.get(t),f=s.get(e);if(g&&f)return g==e&&f==t;var p=!0;s.set(t,e),s.set(e,t);for(var y=o;++d<l;){h=a[d];var x=t[h],S=e[h];if(r)var E=o?r(S,x,h,e,t,s):r(x,S,h,t,e,s);if(!(E===void 0?x===S||i(x,S,n,r,s):E)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var j=t.constructor,b=e.constructor;j!=b&&"constructor"in t&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof b=="function"&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(e),p}var Ib=1,Qo="[object Arguments]",ea="[object Array]",gr="[object Object]",Tb=Object.prototype,ta=Tb.hasOwnProperty;function Nb(t,e,n,r,i,s){var o=we(t),a=we(e),l=o?ea:Re(t),u=a?ea:Re(e);l=l==Qo?gr:l,u=u==Qo?gr:u;var c=l==gr,d=u==gr,h=l==u;if(h&&Rt(t)){if(!Rt(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new We),o||ar(t)?Jl(t,e,n,r,i,s):Ob(t,e,l,n,r,i,s);if(!(n&Ib)){var g=c&&ta.call(t,"__wrapped__"),f=d&&ta.call(e,"__wrapped__");if(g||f){var p=g?t.value():t,y=f?e.value():e;return s||(s=new We),i(p,y,n,r,s)}}return h?(s||(s=new We),_b(t,e,n,r,i,s)):!1}function Yr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ue(t)&&!Ue(e)?t!==t&&e!==e:Nb(t,e,n,r,Yr,i)}var Pb=1,Fb=2;function $b(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],u=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var c=new We,d;if(!(d===void 0?Yr(u,l,Pb|Fb,r,c):d))return!1}}return!0}function Zl(t){return t===t&&!ne(t)}function Db(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Zl(i)]}return e}function Xl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Rb(t){var e=Db(t);return e.length==1&&e[0][2]?Xl(e[0][0],e[0][1]):function(n){return n===t||$b(n,t,e)}}function kb(t,e){return t!=null&&e in Object(t)}function Ql(t,e){return t!=null&&ql(t,e,kb)}var Mb=1,Ub=2;function Lb(t,e){return xs(t)&&Zl(e)?Xl(At(t),e):function(n){var r=D(n,t);return r===void 0&&r===e?Ql(n,t):Yr(e,r,Mb|Ub)}}function Bb(t){return function(e){return e?.[t]}}function Vb(t){return function(e){return zr(e,t)}}function qb(t){return xs(t)?Bb(At(t)):Vb(t)}function Rs(t){return typeof t=="function"?t:t==null?Kr:typeof t=="object"?we(t)?Lb(t[0],t[1]):Rb(t):qb(t)}function zb(t,e,n){var r=we(t),i=r||Rt(t)||ar(t);if(e=Rs(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:ne(t)?n=sr(s)?Pl(Br(t)):{}:n={}}return(i?Es:Yl)(t,function(o,a,l){return e(n,o,a,l)}),n}function Wb(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Hb(t){return t!==t}function Kb(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function ec(t,e,n){return e===e?Kb(t,e,n):Wb(t,Hb,n)}function ks(t,e){var n=t==null?0:t.length;return!!n&&ec(t,e,0)>-1}function Er(){}var Gb=1/0,Yb=on&&1/Ds(new on([,-0]))[1]==Gb?function(t){return new on(t)}:Er,Jb=200;function tc(t,e,n){var r=-1,i=ks,s=t.length,o=!0,a=[],l=a;if(s>=Jb){var u=Yb(t);if(u)return Ds(u);o=!1,i=Qn,l=new kt}else l=a;e:for(;++r<s;){var c=t[r],d=c;if(c=c!==0?c:0,o&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function nc(t){return t&&t.length?tc(t):[]}function er(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":typeof t=="number"&&!Number.isNaN(t)?"number":typeof t=="object"?"object":"string"}var Zb=Gr(function(t){return tc(cr(t,1,Xn,!0))});function Le(t){let{type:e}=t;return!e&&t.const?er(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties||t.patternProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(n=>n!=="null"):e=e[0]),e)}function at(t,e){const n={...t};return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];return t&&i in t&&q(o)?r[i]=at(s,o):t&&e&&(Le(t)==="object"||Le(e)==="object")&&i===al&&Array.isArray(s)&&Array.isArray(o)?r[i]=Zb(s,o):r[i]=o,r},n)}var Xb="[object Number]";function rc(t){return typeof t=="number"||Ue(t)&&ct(t)==Xb}function ic(t,e,n){var r;if(t&&n){const i=D(t,n);if(i===void 0)return;for(let s=0;s<e.length;s+=1){const o=e[s],a=D(o,[se,n],{});if(a.type!=="object"&&a.type!=="array"&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Mr(t,e,n,r,i){if(e===void 0)return 0;const s=ic(e,n,i);if(rc(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&X(a,[se,i])){const l=D(e,i),u=D(a,[se,i],{});if(t.isValid(u,l,r))return o}else if(a[se]){const l={anyOf:Object.keys(a[se]).map(c=>({required:[c]}))};let u;if(a.anyOf){const{...c}=a;c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u={...a,...l};if(delete u.required,t.isValid(u,e,r))return o}else if(t.isValid(a,e,r))return o}return 0}const Qb=Object.prototype;function Rn(t){for(const e in t)if(Qb.hasOwnProperty.call(t,e))return!1;return!0}const e0=["array","boolean","integer","null","number","object","string"];new Set(e0);const t0=["$defs","definitions","properties","patternProperties","dependencies"];new Set(t0);const n0=["items","allOf","oneOf","anyOf"];new Set(n0);const r0=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(r0);function Ar(t){return typeof t=="object"}function Ye(t){return Ar(t)?Rn(t):t===!0}function nn(t,e){return t<e?-1:t>e?1:0}function hi(t,e){const n=t.length;if(n===0)return e;let r=e.length;if(r===0)return t;if(n<r){const s=t;t=e,e=s,r=n}const i=new Set(t);for(let s=0;s<r;s++)i.add(e[s]);return Array.from(i)}function i0(t,e){const n=[];if(t.length===0||e.length===0)return n;if(t.length>e.length){const i=t;t=e,e=i}const r=new Set(e);for(let i=0;i<t.length&&r.size>0;i++){const s=t[i];r.delete(s)&&n.push(s)}return n}function na(t){return t.length===0}function pi(t){return(e,n)=>{const r=e.length-n.length;if(r!==0)return r;for(let i=0;i<e.length;i++)if(e[i]!==n[i]){const s=t(e[i],n[i]);if(s!==0)return s}return 0}}function sc(t,{threshold:e=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=e){const o=[];let a=0;e:for(let l=0;l<r;l++){const u=n[l];for(let c=0;c<a;c++)if(t(u,o[c])===0)continue e;a=o.push(u)}return o}const i=n.slice().sort(t);let s=0;for(let o=1;o<r;o++)t(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function s0(t){return(e,n)=>{const r=[];let i=e.length,s=n.length;if(i===0||s===0)return r;if(i>s){const c=e;e=n,n=c;const d=i;i=s,s=d}const o=[...e].sort(t),a=[...n].sort(t);let l=0,u=0;for(;l<i&&u<s;){const c=t(o[l],a[u]);c===0?((r.length===0||t(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,u++):c<0?l++:u++}return r}}function o0(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const ra=o0,oc=()=>0,a0=t=>t===void 0,l0=t=>typeof t!="object",ia={boolean:0,number:1,string:2};function c0(t,e){const n=typeof t,r=typeof e;return n===r?nn(t,e):ia[n]-ia[r]}function u0(t,e){const n=t.length;if(n===0)return e;const r=e.length;if(r===0)return t;if(r>n){const o=t;t=e,e=o}const i=new Set(t),s=e.length;for(let o=0;o<s;o++){const a=e[o];i.has(a)||t.push(a)}return t}function Jr(t,e,n=oc){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function Xt(t){return Jr(a0,t)}function pt(t,e){return Jr(n=>n===void 0||t(n),e)}function gi(t,e){return Jr(Array.isArray,t,e)}const be=Xt(nn),yi=pt(t=>t===0,(t,e)=>t-e);function d0({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=ra(e,p=>Object.keys(p).sort());function r(p){return(y,x)=>{const S=n(y),E=n(x),j=Math.min(S.length,E.length);for(let b=0;b<j;b++){const v=nn(S[b],E[b]);if(v!==0)return v}if(S.length!==E.length)return S.length-E.length;for(let b=0;b<j;b++){const v=S[b],w=p(y[v],x[v]);if(w!==0)return w}return 0}}function i(p){const y=pi(p),x=ra(t,sc(p,{threshold:0}));return(S,E)=>y(x(S),x(E))}const s=i(nn);function o(p,y){if(Ar(p)){if(Ar(y)){const x=Object.keys(p),S=Object.keys(y),E=u0(x,S),j=E.length;for(let b=0;b<j;b++){const v=E[b];if(p[v]===y[v])continue;const O=(f[v]??a)(p[v],y[v]);if(O!==0)return O}return 0}return y===!0&&Rn(p)?0:1}return Ar(y)?p===!0&&Rn(y)?0:-1:nn(p,y)}const a=Xt(u),l=Jr(l0,gi(r(a),pi(u)),c0);function u(p,y){return p===null?-1:y===null?1:l(p,y)}const c=Xt(o),d=pt(Rn,r(c)),h=Xt(i(o)),g=pt(Ye,o),f={$id:be,$comment:be,$defs:d,$ref:be,$schema:be,const:a,contains:c,contentEncoding:be,contentMediaType:be,default:a,definitions:d,description:be,else:c,examples:a,exclusiveMaximum:be,exclusiveMinimum:be,format:be,if:c,maximum:be,maxItems:be,maxLength:be,maxProperties:be,minimum:be,multipleOf:be,not:c,pattern:be,propertyNames:c,readOnly:be,then:c,title:be,writeOnly:be,uniqueItems:pt(p=>p===!1,oc),minLength:yi,minItems:yi,minProperties:yi,required:pt(na,s),enum:pt(na,i(u)),type:Xt((p,y)=>{const x=Array.isArray(p),S=Array.isArray(y);return!x&&!S?nn(p,y):s(x?p:[p],S?y:[y])}),items:pt(p=>!Array.isArray(p)&&Ye(p),gi(o,pi(o))),anyOf:h,allOf:h,oneOf:h,properties:d,patternProperties:d,additionalProperties:g,additionalItems:g,dependencies:pt(Rn,r(Xt(gi(o,s))))};return{compareSchemaValues:u,compareSchemaDefinitions:o}}function sa(t){return t}const ac=(t,e)=>t?ac(e%t,t):e,f0=(t,e)=>Math.abs(t*e)/ac(t,e);function m0(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function bi(t,e,n){const r=t.length,i=e.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=t[s];for(let a=0;a<i;a++)n(o,e[a])}}function xi(t,e){return t||e}function oa(t){return(e,n)=>{const r={...e},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=e[a]===void 0?n[a]:t(e[a],n[a])}return r}}function h0(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function Tt(t,e,n){n===void 0||Ye(n)?delete t[e]:t[e]=n}const p0=["properties","patternProperties","additionalProperties"];function aa(t){const e=Object.keys(t),n=e.length,r=[];for(let i=0;i<n;i++){const s=e[i];r.push({regExp:new RegExp(s),schema:t[s]})}return[r,e]}const la=[[],[]];function ca(t,e,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(e))continue;const o=s.schema;if(o===!1)return!0;t.push(o)}return!1}const g0=["items","additionalItems"],y0=["if","then","else"];function ua(t,e){return e.if!==void 0&&(t.if=e.if),e.then!==void 0&&(t.then=e.then),e.else!==void 0&&(t.else=e.else),t}function vi(t,e){if(t===e)return t;switch(t){case"number":if(e==="integer")return"integer";case"integer":if(e==="number")return"integer";default:return}}function Nt(t,e,n){return[t,e,n]}function b0(t){const e=new Map;for(const[n,r,i]of t){const s=o=>{if(!i(o))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(o[n])}, ${r}: ${JSON.stringify(o[r])})`)};for(const o of[[n,r],[r,n]]){let a=e.get(o[0]);a===void 0&&(a=[],e.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return e}const x0=[Nt("minimum","maximum",t=>t.maximum>=t.minimum),Nt("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Nt("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Nt("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Nt("minLength","maxLength",t=>t.maxLength>=t.minLength),Nt("minItems","maxItems",t=>t.maxItems>=t.minItems),Nt("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function v0({mergePatterns:t=m0,isSubRegExp:e=Object.is,intersectJson:n=i0,deduplicateJsonSchemaDef:r=sa,defaultMerger:i=sa,assigners:s=[],checks:o=x0,mergers:a}={}){function l(j){const b=j.length;let v=j[0];for(let w=1;w<b;w++){const O=x(v,j[w]);if(O===!1)return!1;Ye(O)||(v=O)}return v}function u(j,b,v,w,O,C,A){if(j.length=0,v===!1)return!1;if(j.push(v),O!==void 0){if(O===!1)return!1;j.push(O)}if(ca(j,b,C))return!1;const I=j.length<2;if(A===!1){if(I)return;if(ca(j,b,w))return!1}else I&&A!==void 0&&j.push(A);return j.length===1?j[0]:l(j)}function c(j,b,v,w,O,C){const A=v.length;if(A>0&&O!==!1)if(C)Object.assign(j,b);else for(let _=0;_<A;_++){const I=v[_];w.has(I)||(j[I]=x(b[I],O))}return j}const d=(j,{properties:b={},patternProperties:v,additionalProperties:w=!0},{properties:O={},patternProperties:C,additionalProperties:A=!0})=>{const _=Ye(w),I=Ye(A);if(_&&I)return Tt(j,"properties",S(b,O)),Tt(j,"patternProperties",v&&C?S(v,C):v??C),delete j.additionalProperties,j;const T=x(w,A);Tt(j,"additionalProperties",T);const P={},F=Object.keys(b),$=F.length,[k,M]=v?aa(v):la,[U,J]=C?aa(C):la,ae=[],fe=new Set,ye=I?void 0:A;for(let z=0;z<$;z++){const re=F[z];fe.add(re);const oe=u(ae,re,b[re],k,O[re],U,ye);oe!==void 0&&(P[re]=oe)}const L=Object.keys(O),le=L.length,te=_?void 0:w;for(let z=0;z<le;z++){const re=L[z];if(fe.has(re))continue;const oe=u(ae,re,O[re],U,void 0,k,te);oe!==void 0&&(P[re]=oe)}Tt(j,"properties",P);let H={};const K=new Set;return M.length>0&&J.length>0&&bi(M,J,(z,re)=>{e(z,re)&&K.add(z),e(re,z)&&K.add(re),H[t(z,re)]=x(v[z],C[re])}),H=c(H,v,M,K,A,I),H=c(H,C,J,K,w,_),Tt(j,"patternProperties",H),j},h=(j,{items:b=[],additionalItems:v},{items:w=[],additionalItems:O})=>{const C=Array.isArray(b),A=Array.isArray(w),_=[];if(j.items=_,C&&A){const[I,T,P]=b.length<w.length?[b.length,v,w]:[w.length,O,b];let F=0;for(;F<I;F++)_.push(x(b[F],w[F]));if(T===!1)j.additionalItems=!1;else{const $=T===void 0||Ye(T);for(;F<P.length;F++)_.push($?P[F]:x(P[F],T));Tt(j,"additionalItems",v!==void 0&&O!==void 0?x(v,O):v??O)}}else if(C||A){const[I,T,P]=C?[b,w,v]:[w,b,O];Tt(j,"additionalItems",P&&x(P,T));for(let F=0;F<I.length;F++)_.push(x(I[F],T))}else delete j.additionalItems,j.items=x(b,w);return j},g=(j,b,v)=>{ua(j,b);const w=ua({},v);return j.allOf===void 0?j.allOf=[w]:j.allOf=j.allOf.concat(w),j};function f(j,b){const v=[];if(bi(j,b,(w,O)=>{try{v.push(x(w,O))}catch{}}),v.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(j)}" and "${JSON.stringify(b)}"; the merged result is empty`);return r(v)}const p=h0([[p0,d],[g0,h],[y0,g],...s]),y=b0(o);function x(j,b){if(j===!1||b===!1)return!1;if(Ye(j))return Ye(b)?!0:b;if(Ye(b))return j;let v={...j};const w=new Set,O=new Set,C=Object.keys(b),A=C.length;for(let _=0;_<A;_++){const I=C[_],T=b[I];if(T===void 0)continue;const P=y.get(I);if(P!==void 0){const M=P.length;for(let U=0;U<M;U++){const J=P[U];j[J.oppositeKey]!==void 0&&O.add(J.check)}}const F=j[I];if(F===void 0){v[I]=T;continue}const $=p.get(I);if($){w.add($);continue}const k=E[I]??i;v[I]=k(F,T)}for(const _ of w)v=_(v,j,b);for(const _ of O)_(v);return v}const S=oa(x),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(j,b)=>{if(j===b)return j;const v=Array.isArray(j),w=Array.isArray(b);if(!v&&!w){const O=vi(j,b);if(O!==void 0)return O}else if(v||w){const O=new Set;if(v&&w)bi(j,b,(A,_)=>{const I=vi(A,_);I!==void 0&&O.add(I)});else{const A=v?j:b,_=v?b:j,I=A.length;for(let T=0;T<I;T++){const P=vi(_,A[T]);P!==void 0&&O.add(P)}}const C=O.size;if(C===1)return O.values().next().value;if(C>1)return Array.from(O)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${j.toString()}, ${b.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(j,b)=>{const v=r([j,b]);return v.length===1?v[0]:{anyOf:v}},pattern:t,readOnly:xi,writeOnly:xi,enum:(j,b)=>{const v=n(j,b);if(v.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(j)}", "${JSON.stringify(b)}"`);return v},anyOf:f,oneOf:f,allOf:(j,b)=>r(j.concat(b)),propertyNames:x,contains:x,dependencies:oa((j,b)=>Array.isArray(j)?Array.isArray(b)?hi(j,b):x(b,{required:j}):Array.isArray(b)?x(j,{required:b}):x(j,b)),examples:(j,b)=>{if(!Array.isArray(j)||!Array.isArray(b))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(j)}" and "${JSON.stringify(b)}"`);return hi(j,b)},multipleOf:(j,b)=>{let v=1;for(;!Number.isInteger(j)||!Number.isInteger(b);)v*=10,j*=10,b*=10;return f0(j,b)/v},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:xi,required:hi,...a};return{mergeSchemaDefinitions:x,mergeArrayOfSchemaDefinitions:l}}function S0(t){const e=[],n=[t];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){e.push(r);continue}const{allOf:i,...s}=r;e.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return e}function w0(t){return e=>t(S0(e))}const{compareSchemaDefinitions:j0,compareSchemaValues:O0}=d0(),{mergeArrayOfSchemaDefinitions:E0}=v0({intersectJson:s0(O0),deduplicateJsonSchemaDef:sc(j0)}),lc=w0(E0);function Ce(t,e,n={},r,i,s=!1){return Ze(t,e,n,r,void 0,void 0,i,s)[0]}function A0(t,e,n,r,i,s,o){const{if:a,then:l,else:u,...c}=e,d=t.isValid(a,s||{},n);let h=[c],g=[];if(r)l&&typeof l!="boolean"&&(g=g.concat(Ze(t,l,n,s,r,i,o))),u&&typeof u!="boolean"&&(g=g.concat(Ze(t,u,n,s,r,i,o)));else{const f=d?l:u;f&&typeof f!="boolean"&&(g=g.concat(Ze(t,f,n,s,r,i,o)))}return g.length&&(h=g.map(f=>at(c,f))),h.flatMap(f=>Ze(t,f,n,s,r,i,o))}function cc(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>Gl(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function uc(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ce(n,[r],t.patternProperties[r]),n),{})}function C0(t,e,n,r,i,s,o,a){const l=dc(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(ps in e)return mc(t,e,n,r,i,s,o).flatMap(c=>Ze(t,c,n,s,r,i,o));if(Ot in e&&Array.isArray(e[Ot])){const u=e.allOf.map(d=>Ze(t,d,n,s,r,i,o));return cc(u).map(d=>({...e,allOf:d}))}return[e]}function dc(t,e,n,r,i,s,o,a){const l=St(e,n,i,void 0,a);return l!==e?Ze(t,l,n,s,r,i,o,a):[e]}function St(t,e,n,r,i){if(!q(t))return t;let s=t,o=r;if(ue in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...Zn(a,e,o),...l,[Bn]:a},de in s&&(o=s[de])}if(se in s){const a=[],l=zb(s[se],(u,c,d)=>{const h=[...n];u[d]=St(c,e,h,o,i),a.push(h)},{});zy(n,nc(My(a))),s={...s,[se]:l}}if(an in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:St(s.items,e,n,o,i)}),i){let a,l;ee in t&&Array.isArray(t[ee])?(a=ee,l=s[ee]):W in t&&Array.isArray(t[W])&&(a=W,l=s[W]),a&&l&&(s={...s,[a]:l.map(u=>St(u,e,n,o,i))})}return ie(t,s)?t:s}function _0(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&q(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(Vi in s){const l=uc(s,a);if(!ge(l)){s.properties[a]=Ce(t,{[Ot]:Object.values(l)},n,D(o,[a]),i),ce(s.properties,[a,ot],!0);return}}if(tn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ue in s.additionalProperties?l=Ce(t,{[ue]:D(s.additionalProperties,[ue])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ee in s.additionalProperties||W in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:er(D(o,[a]))}:l={type:er(D(o,[a]))},s.properties[a]=l,ce(s.properties,[a,ot],!0)}else s.properties[a]={type:"null"},ce(s.properties,[a,ot],!0)}}),s}function I0(t){return lc(t)}function Ze(t,e,n,r,i=!1,s=[],o,a){return q(e)?C0(t,e,n,i,s,r,o,a).flatMap(u=>{var c;let d=u;if(gs in d)return A0(t,d,n,i,s,r,o);if(Ot in d){if(i){const{allOf:g,...f}=d;return[...g,f]}try{const g=[],f=[];(c=d.allOf)===null||c===void 0||c.forEach(p=>{typeof p=="object"&&p.contains?g.push(p):f.push(p)}),g.length&&(d={...d,allOf:f}),d=o?o(d):I0(d),g.length&&(d.allOf=g)}catch(g){console.warn(`could not merge subschemas in allOf:
2
+ `,g);const{allOf:f,...p}=d;return p}}return se in d&&Vi in d&&(d=Object.keys(d.properties).reduce((g,f)=>{const p=uc(g,f);return ge(p)||(g.properties[f]=Ce(t,{allOf:[g.properties[f],...Object.values(p)]},n,D(r,[f]),o)),g},{...d,properties:{...d.properties}})),Vi in d||tn in d&&d.additionalProperties!==!1?_0(t,d,n,r,o):d}):[{}]}function T0(t,e,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=e;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const u=i===void 0&&r?{}:i,c=He(e);s=s.map(h=>St(h,n,[]));const d=Mr(t,u,s,n,c);if(r){const h=fc(s,!1,n);return Mr(t,u,h,n,c),s.map(g=>at(l,g))}return[at(l,s[d])]}return[e]}function fc(t,e=!1,n){return t.map(r=>{if(!q(r))return r?{}:{not:{}};const i=e&&n?St(r,n,[]):r;return i.additionalProperties===!1?{...i,additionalProperties:!0}:i})}function mc(t,e,n,r,i,s,o){const{dependencies:a,...l}=e;return T0(t,l,n,r,s).flatMap(c=>hc(t,a,c,n,r,i,s,o))}function hc(t,e,n,r,i,s,o,a){let l=[n];for(const u in e)if((i||D(o,[u])!==void 0)&&(!n.properties||u in n.properties)){const[c,d]=Fs(u,e);return Array.isArray(d)?l[0]=N0(n,d):q(d)&&(l=P0(t,n,r,u,d,i,s,o,a)),l.flatMap(h=>hc(t,c,h,r,i,s,o,a))}return l}function N0(t,e){if(!e)return t;const n=Array.isArray(t.required)?Array.from(new Set([...t.required,...e])):e;return{...t,required:n}}function P0(t,e,n,r,i,s,o,a,l){return Ze(t,i,n,a,s,o,l).flatMap(c=>{const{oneOf:d,...h}=c,g=at(e,h);if(d===void 0)return g;const f=d.map(y=>typeof y=="boolean"||!(ue in y)?[y]:dc(t,y,n,s,o,a));return cc(f).flatMap(y=>F0(t,g,n,r,y,s,o,a,l))})}function F0(t,e,n,r,i,s,o,a,l){const u=i.filter(c=>{if(typeof c=="boolean"||!c||!c.properties)return!1;const{[r]:d}=c.properties;if(d){const h={type:"object",properties:{[r]:d}};return t.isValid(h,a,n)||s}return!1});return!s&&u.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[e]):u.flatMap(c=>{const d=c,[h]=Fs(r,d.properties),g={...d,properties:h};return Ze(t,g,n,a,s,o,l).map(p=>at(e,p))})}function kn(t,e,n,r,i,s={},o){if(Array.isArray(n[i])){const l=He(n)||r,u=n[i].map(d=>Ce(t,d,e,s,o)),c=D(s,l);if(c!==void 0)return u.find(d=>ie(D(d,[se,l,$t],D(d,[se,l,Ne])),c))}}function pc(t,e,n,r,i){let s=n;if(X(n,ue)&&(s=Ce(t,n,e,void 0,i)),ge(r))return s;const o=Array.isArray(r)?[...r]:r.split("."),[a,...l]=o;if(a!==void 0&&a!==""&&X(s,a))return s=D(s,a),pc(t,e,s,l,i)}function Cr(t,e,n,r,i,s){const o=pc(t,e,n,r,s);return o===void 0?i:o}const da={title:"!@#$_UNKNOWN_$#@!"};function $0(t,e,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop(),u=String(l);o.length&&o.forEach(g=>{a=Cr(t,e,a,[se,g],{},s),X(a,W)?a=kn(t,e,a,u,W,D(i,g),s):X(a,ee)&&(a=kn(t,e,a,u,ee,D(i,g),s))}),X(a,W)?a=kn(t,e,a,u,W,i,s):X(a,ee)&&(a=kn(t,e,a,u,ee,i,s));let c=Cr(t,e,a,[se,l],da,s);c===da&&(c=void 0);const d=Cr(t,e,a,al,[],s);let h;return c&&Array.isArray(d)&&(h=d.includes(u)),{field:c,isRequired:h}}function D0(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function R0(t,e){return function(n,r){if(n==null)return n;if(!zt(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var gc=R0(Yl);function k0(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function M0(t,e,n){var r=we(t)?D0:k0,i=arguments.length<3;return r(t,Rs(e),n,i,gc)}const U0={type:"object",$id:om,properties:{__not_really_there__:{type:"number"}}};function Qi(t,e,n,r,i){let s=0;return n&&(ne(n.properties)?s+=M0(n.properties,(o,a,l)=>{const u=D(r,l);if(typeof a=="boolean")return o;if(X(a,ue)){const c=Ce(t,a,e,u,i);return o+Qi(t,e,c,u||{},i)}if((X(a,W)||X(a,ee))&&u){const c=X(a,W)?W:ee,d=He(a);return o+dn(t,e,u,D(a,c),-1,d,i)}if(a.type==="object"){const c=ne(u)?1:0;return o+c+Qi(t,e,a,u,i)}if(a.type===er(u)){let c=o+1;return a.default?c+=u===a.default?1:-1:a.const&&(c+=u===a.const?1:-1),c}return o},0):Ct(n.type)&&n.type===er(r)&&(s+=1)),s}function dn(t,e,n,r,i=-1,s,o){const a=r.map(h=>St(h,e,[])),l=ic(n,r,s);if(rc(l))return l;const u=a.reduce((h,g,f)=>(Mr(t,n,[U0,g],e,s)===1&&h.push(f),h),[]);if(u.length===1)return u[0];u.length||Gl(a.length,h=>u.push(h));const c=new Set,{bestIndex:d}=u.reduce((h,g)=>{const{bestScore:f}=h,p=a[g],y=Qi(t,e,p,n,o);return c.add(y),y>f?{bestIndex:g,bestScore:y}:h},{bestIndex:i,bestScore:0});return c.size===1&&i>=0?i:d}function yc(t){const e=t[Ne],n=Le(t);return q(e)&&Ct(e?.$data)&&n!=="object"&&n!=="array"}function bc(t){return Array.isArray(t.enum)&&t.enum.length===1||Ne in t}function Ms(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>q(e))}function fn(t){return t==null}function tr(t,e,n=!1,r=!1,i=!1){if(Array.isArray(e)){const s=Array.isArray(t)?t:[],o=i?s:e,a=i?e:s,l=o.map((u,c)=>a[c]!==void 0?tr(s[c],e[c],n,r,i):u);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(q(e)){const s=Object.assign({},t);return Object.keys(e).reduce((o,a)=>{var l;const u=D(e,a),c=q(t)&&a in t,d=a in e,h=(l=D(t,a))!==null&&l!==void 0?l:{},g=c&&q(h)&&Object.values(h).some(y=>q(y)),f=c&&q(D(t,a)),p=d&&q(u);return f&&p&&!g?(o[a]={...D(t,a),...u},o):(o[a]=tr(D(t,a),u,n,r,i&&(c||!d)),s)},s)}return r&&(t!==void 0&&fn(e)||typeof e=="number"&&Number.isNaN(e))||i&&!fn(e)?t:e}function Mt(t,e,n=!1){return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];if(t&&i in t&&q(o))r[i]=Mt(s,o,n);else if(n&&Array.isArray(s)&&Array.isArray(o)){let a=o;n==="preventDuplicates"&&(a=o.reduce((l,u)=>(s.includes(u)||l.push(u),l),[])),r[i]=s.concat(a)}else r[i]=o;return r},{...t})}function L0(t){if(sm in t&&Array.isArray(t.enum)&&t.enum.length===1)return t.enum[0];if(Ne in t)return t.const;throw new Error("schema cannot be inferred as a constant")}function B0(t,e){const n=new Map(t.map(s=>[String(s.value),s])),r=new Set(e.filter(s=>s!=="*").map(String)),i=t.filter(s=>!r.has(String(s.value)));return e.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function mn(t,e){if(t.enum){let s,o;if(e){const{enumNames:l,enumOrder:u}=B(e);s=l,o=u}let a=t.enum.map((l,u)=>({label:Array.isArray(s)?s[u]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=B0(a,o)),a}let n,r;t.anyOf?(n=t.anyOf,r=e?.anyOf):t.oneOf&&(n=t.oneOf,r=e?.oneOf);let i=He(t);if(e){const{optionsSchemaSelector:s=i}=B(e);i=s}return n&&n.map((s,o)=>{const{title:a}=B(r?.[o]),l=s;let u,c=a;if(i){const d=D(l,[se,i],{});u=D(d,$t,D(d,Ne)),c=c||d?.title||l.title||String(u)}else u=L0(l),c=c||l.title||String(u);return{schema:l,label:c,value:u}})}function Zr(t,e,n={},r){const i=Ce(t,e,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&bc(o)):!1}function Us(t,e,n,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:Zr(t,e.items,n,r)}const V0=["string","number","integer","boolean","null"];var hn;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(hn||(hn={}));function Si(t,e=hn.Ignore,n=-1){if(n>=0){if(Array.isArray(t.items)&&n<t.items.length){const r=t.items[n];if(typeof r!="boolean")return r}}else if(t.items&&!Array.isArray(t.items)&&typeof t.items!="boolean")return t.items;return e!==hn.Ignore&&q(t.additionalItems)?t.additionalItems:{}}function xc(t,e){const{default:n,type:r}=t;return Array.isArray(r)&&r.includes("null")&&ge(e)&&n===null?null:e}function fa(t,e,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:u="populateAllDefaults"}=o;if(r===!0||a)t[e]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!q(n)||!ge(n))&&(t[e]=n);else if(u!=="skipDefaults"){const c=i===void 0?s.includes(e):i;q(n)?u==="skipEmptyDefaults"?ge(n)||(t[e]=n):(!ge(n)||s.includes(e))&&(c||u!=="populateRequiredDefaults")&&(t[e]=n):n!==void 0&&(u==="populateAllDefaults"||u==="skipEmptyDefaults"||c&&s.includes(e))&&(t[e]=n)}}function wt(t,e,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:o=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:u=void 0,required:c,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:h}=n;let g=q(i)?i:{};const f=q(e)?e:{};let p=r,y=null,x=l,S=a;if(f[Ne]!==void 0&&l?.constAsDefaults!=="never"&&!yc(f))p=f[Ne];else if(q(p)&&q(f.default)&&!f[ee]&&!f[W]&&!f[ue])p=Mt(p,f.default);else if($t in f&&!f[ee]&&!f[W]&&!f[ue])p=f.default;else if(ue in f){const b=f[ue];a.includes(b)||(S=a.concat(b),y=Zn(b,s));const v=i===void 0||q(i)&&ge(i);y&&!p&&v&&(p=f.default),d&&y&&!q(i)&&(g=i)}else if(ps in f){const b={...ma(t,f,n,p),...g};[y]=mc(t,f,s,!1,[],b,u)}else if(Ms(f))p=f.items.map((b,v)=>wt(t,b,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,parentDefaults:Array.isArray(r)?r[v]:void 0,rawFormData:g,required:c,shouldMergeDefaultsIntoFormData:d}));else if(W in f){const{oneOf:b,...v}=f;if(b.length===0)return;const w=He(f),{type:O="null"}=v;!Array.isArray(O)&&V0.includes(O)&&x?.constAsDefaults==="skipOneOf"&&(x={...x,constAsDefaults:"never"}),y=b[dn(t,s,i??f.default,b,0,w,u)],y=at(v,y)}else if(ee in f){const{anyOf:b,...v}=f;if(b.length===0)return;const w=He(f);y=b[dn(t,s,i??f.default,b,0,w,u)],y=at(v,y)}if(y)return wt(t,y,{rootSchema:s,includeUndefinedValues:o,_recurseList:S,experimental_defaultFormStateBehavior:x,experimental_customMergeAllOf:u,parentDefaults:p,rawFormData:i??g,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});p===void 0&&(p=f.default);const E=ma(t,f,n,p);let j=E??p;if(d){const{arrayMinItems:b={}}=l||{},{mergeExtraDefaults:v}=b,w=q0(t,f,s,i,l,u);(!q(i)||Ot in f)&&(j=tr(j,w,v,!0))}return j}function q0(t,e,n,r,i,s){const o=!bc(e)&&Zr(t,e,n,s);let a=r;if(o){const u=mn(e);a=u?.some(d=>ie(d.value,r))?r:void 0}return e[Ne]&&i?.constAsDefaults==="always"&&(a=e.const),a}function z0(t,e,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:a=void 0,required:l,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}={},d){{const h=q(n)?n:{},g=e,p=o?.allOf==="populateDefaults"&&Ot in g||o?.emptyObjectFields!=="skipEmptyDefaults"&&gs in g?Ce(t,g,r,h,a):g,y=p[Ne],x=Object.keys(p.properties||{}).reduce((S,E)=>{var j;const b=D(p,[se,E],{}),v=q(y)&&y[E]!==void 0,w=(q(b)&&Ne in b||v)&&o?.constAsDefaults!=="never"&&!yc(b),O=wt(t,b,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[E]),rawFormData:D(h,[E]),required:(j=p.required)===null||j===void 0?void 0:j.includes(E),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c});return fa(S,E,O,i,l,p.required,o,w,b?.type==="null"),S},{});if(p.additionalProperties&&!c){const S=q(p.additionalProperties)?p.additionalProperties:{},E=new Set,j=[];Object.keys(h).filter(b=>!p.properties||!p.properties[b]).forEach(b=>{E.add(b),j.push(b)}),q(d)&&j.length===0&&Object.keys(d).filter(b=>!p.properties||!p.properties[b]).forEach(b=>E.add(b)),E.forEach(b=>{var v;const w=wt(t,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[b]),rawFormData:D(h,[b]),required:(v=p.required)===null||v===void 0?void 0:v.includes(b),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c});fa(x,b,w,i,l,j)})}return xc(e,x)}}function W0(t,e,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:a,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}={},d){var h,g;let f=d;const p=e,y=(h=s?.arrayMinItems)!==null&&h!==void 0?h:{},{populate:x,mergeExtraDefaults:S}=y,E=x==="never",j=x==="requiredOnly",b=x==="all"||!E&&!j,v=(g=y?.computeSkipPopulate)!==null&&g!==void 0?g:(()=>!1),O=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((_,I)=>{const T=Si(p,hn.Fallback,I),P=Array.isArray(n)?n[I]:void 0;return wt(t,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:_,rawFormData:P,required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c})})),Array.isArray(n)){const _=Si(p);if(E)f=n;else{const I=n.map((P,F)=>wt(t,_,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:P,parentDefaults:D(f,[F]),required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}));f=tr(f,I,(j&&a||b)&&S)}}if(E)return f??O;if(j&&!a)return f||void 0;let C;const A=Array.isArray(f)?f.length:0;if(!p.minItems||Us(t,p,r,o)||v(t,p,r)||p.minItems<=A)C=f||!a&&!l?f:O;else{const _=f||[],I=Si(p,hn.Invert),T=I.default,P=Array.from({length:p.minItems-A},()=>wt(t,I,{parentDefaults:T,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:u}));C=_.concat(P)}return xc(e,C)}function ma(t,e,n={},r){switch(Le(e)){case"object":return z0(t,e,n,r);case"array":return W0(t,e,n,r);default:return}}function vc(t,e,n,r,i=!1,s,o,a){if(!q(e))throw new Error(`Invalid schema: ${e}`);const l=Ce(t,e,r,n,o),u=wt(t,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&q(l.default))return{...u,...n};if(q(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:c}=s||{};return tr(u,n,!0,c==="useDefaultIfFormDataUndefined",!0)}return u}function Sc(t={}){return"widget"in B(t)&&B(t).widget!=="hidden"}function wc(t,e,n={},r,i){if(n[bs]==="files")return!0;if(e.items){const s=Ce(t,e.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function H0(t,e,n={},r,i,s){const o=B(n,i),{label:a=!0}=o;let l=!!a;if(l){const u=Le(e),c=D(e,ot,!1);u==="array"&&(l=c||Us(t,e,r,s)||wc(t,e,n,r,s)||Sc(n)),u==="object"&&(l=c),u==="boolean"&&n&&!n[bs]&&(l=!1),n&&n[cm]&&(l=!1)}return l}function jc(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=zr(t,o);n(a,o)&&$s(s,bn(o,t),a)}return s}function K0(t,e){return jc(t,e,function(n,r){return Ql(t,r)})}var Ls=Bl(function(t,e){return t==null?{}:K0(t,e)});function G0(t,e){if(e.length===0&&typeof t!="object")return t;const n=Ls(t,e);return Array.isArray(t)?Object.keys(n).map(r=>n[r]):n}function Y0(t,e){const n=(i,s)=>typeof i!="object"||ge(i)||s&&!ge(i),r=(i,s=[],o=[[]])=>{const a=Object.keys(i);return a.forEach(l=>{const u=i[l];if(typeof u=="object"){const c=o.map(d=>[...d,l]);u[ys]&&u[jr]!==""?s.push(u[jr]):r(u,s,c)}else l===jr&&u!==""&&o.forEach(c=>{const d=D(e,c),h=a.length===1;(n(d,h)||Array.isArray(d)&&d.every(g=>n(g,h)))&&s.push(c)})}),s};return r(t)}function zn(t){return fn(t)||t===""?!0:Array.isArray(t)?t.length===0:q(t)?Object.values(t).every(zn):!1}function J0(t,e){return e?e(t):lc(t)}function Z0(t,e,n={},r,i){function s(f){return q(f)}function o(f){return q(f)}function a(f,p,y){var x;const{properties:S,additionalProperties:E,patternProperties:j,propertyNames:b}=f,v=new Set((x=f.required)!==null&&x!==void 0?x:[]);function w(C,A,_,I=!1){var T;const P=g(A,_,y[C]);if(!I&&q(P)){let F=o(A)?A:{};F.$ref!==void 0&&(F=Zn(F.$ref,n));const $=new Set((T=F.required)!==null&&T!==void 0?T:[]);if(Object.entries(P).every(([M,U])=>!$.has(M)&&zn(U)))return}P!==void 0&&(y[C]=P)}if(S!==void 0)for(const[C,A]of Object.entries(S))w(C,A,p[C],v.has(C));let O;if(j!==void 0){O=[];const C=Object.entries(j).map(([_,I])=>[new RegExp(_),I]),A=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))if(!A.has(_)){const T=C.find(([P])=>P.test(_));T===void 0?O.push(_):w(_,T[1],I)}}if(E!==void 0&&E!==!1){const C=E;if(O!==void 0)for(const A of O)w(A,C,p[A]);else{const A=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))A.has(_)||w(_,C,I)}}if(b!==void 0)for(const[C,A]of Object.entries(p))y[C]=A;return y}function l(f,p,y){const{items:x,additionalItems:S}=f;if(x!==void 0)if(Array.isArray(x))for(let E=0;E<x.length;E+=1)y.push(g(x[E],p[E]));else for(let E=0;E<p.length;E+=1)y.push(g(x,p[E]));if(S)for(let E=y.length;E<p.length;E+=1)y.push(g(S,p[E]));return y}function u(f,p,y){const{if:x,then:S,else:E}=f;if(x===void 0)return y;const b=(o(x)?t.isValid(x,p,n):x)?S:E;return b===void 0?y:g(b,p,y)}function c(f,p,y,x){if(!Array.isArray(f)||Zr(t,p,n,i))return x;const S=fc(f,!0,n),E=dn(t,n,y,S,0,He(p),i),j=f[E],b=q(j)?St(j,n,[]):S[E];return g(b,y,x)}function d(f,p,y){const{anyOf:x}=f;if(!Array.isArray(x))return y;if(p===void 0||Array.isArray(p)&&p.length===0||q(p)&&Object.keys(p).length===0){let S=y;for(const E of x)S=g(E,p,S);return S}return c(x,f,p,y)}function h(f,p,y){const{dependencies:x}=f;if(x===void 0||!s(p))return y;let S=y;for(const[E,j]of Object.entries(x))E in p&&!Array.isArray(j)&&(S=g(j,p,S));return S}function g(f,p,y){if(p===void 0||f===!1)return;if(f===!0||ge(f))return p;let x=f;const{$ref:S,allOf:E}=x;if(S!==void 0)return g(Zn(S,n),p,y);E&&(x=J0(x,i));let j=d(x,p,c(x.oneOf,x,p,y));const b=Le(x);if(b==="object"){if(!s(p))return;j=a(x,p,s(j)?j:{})}else if(b==="array"){if(!Array.isArray(p))return;j=l(x,p,Array.isArray(j)?j:[])}else j===void 0&&(j=p);return h(x,p,u(x,p,j))}return g(e,r)}const De=Symbol("no Value");function Oc(t){if(Array.isArray(t.enum))return t.enum;const e=t.oneOf||t.anyOf;if(!Array.isArray(e))return;const n=e.map(r=>Ne in r?r[Ne]:Array.isArray(r.enum)&&r.enum.length===1?r.enum[0]:De).filter(r=>r!==De);return n.length>0?n:void 0}function X0(t,e){const n=Oc(t);if(!n||n.some(i=>ie(i,e)))return De;const r=D(t,$t,De);return r!==De&&n.some(i=>ie(i,r))?r:n.length===1?n[0]:void 0}function es(t,e,n,r,i={},s){let o;if(X(n,se)){const a={};if(X(r,se)){const c=D(r,se,{});Object.keys(c).forEach(d=>{X(i,d)&&(a[d]=void 0)})}const l=Object.keys(D(n,se,{})),u={};l.forEach(c=>{const d=D(i,c);let h=D(r,[se,c],{}),g=D(n,[se,c],{});X(h,ue)&&(h=Ce(t,h,e,d,s)),X(g,ue)&&(g=Ce(t,g,e,d,s));const f=D(h,"type"),p=D(g,"type");if(!f||f===p)if(X(a,c)&&delete a[c],p==="object"||p==="array"&&Array.isArray(d)){const y=es(t,e,g,h,d,s);(y!==void 0||p==="array")&&(u[c]=y)}else{const y=D(g,$t,De),x=D(h,$t,De);y!==De&&y!==d&&(x===d?a[c]=y:D(g,"readOnly")===!0&&(a[c]=void 0));const S=D(g,Ne,De),E=D(h,Ne,De);if(S!==De&&S!==d&&(a[c]=E===d?S:void 0),X(i,c)){const j=X0(g,d);j!==De&&(a[c]=j)}}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...u}}else if(D(r,"type")==="array"&&D(n,"type")==="array"&&Array.isArray(i)){let a=D(r,"items"),l=D(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){X(a,ue)&&(a=Ce(t,a,e,i,s)),X(l,ue)&&(l=Ce(t,l,e,i,s));const u=D(a,"type"),c=D(l,"type");if(!u||u===c){const d=D(n,"maxItems",-1);if(c==="object")o=i.reduce((h,g)=>{const f=es(t,e,l,a,g,s);return f!==void 0&&(d<0||h.length<d)&&h.push(f),h},[]);else{const h=Oc(l),g=h?i.filter(f=>h.some(p=>ie(p,f))):i;o=d>0&&g.length>d?g.slice(0,d):g}}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}function gt(t,e,n,r,i,s=[],o){if(ue in e||ps in e||Ot in e||gs in e){const l=Ce(t,e,r,i,o);if(s.findIndex(c=>ie(c,l))===-1)return gt(t,l,n,r,i,s.concat(l),o)}let a={[jr]:n.replace(/^\./,"")};if(W in e||ee in e){const l=W in e?e.oneOf:e.anyOf,u=He(e),c=dn(t,r,i,l,0,u,o),d=l[c];a={...a,...gt(t,d,n,r,i,s,o)}}if(tn in e&&e[tn]!==!1){ce(a,ys,!0);const l=ne(e[tn])?e[tn]:{},u=D(e,se,{});for(const c of Object.keys(i??{}))c in u||(a[c]=gt(t,l,`${n}.${c}`,r,D(i,[c]),s,o))}if(an in e&&Array.isArray(i)){const{items:l,additionalItems:u}=e;Array.isArray(l)?i.forEach((c,d)=>{l[d]?a[d]=gt(t,l[d],`${n}.${d}`,r,c,s,o):u?a[d]=gt(t,u,`${n}.${d}`,r,c,s,o):console.warn(`Unable to generate path schema for "${n}.${d}". No schema defined for it`)}):i.forEach((c,d)=>{a[d]=gt(t,l,`${n}.${d}`,r,c,s,o)})}else if(se in e)for(const l in e.properties){const u=D(e,[se,l],{});a[l]=gt(t,u,`${n}.${l}`,r,D(i,[l]),s,o)}return a}function Q0(t,e,n="",r,i,s){return gt(t,e,n,r,i,void 0,s)}class ex{constructor(e,n,r,i){n&&n[Dn]===Or?this.rootSchema=Ji(n,D(n,de,"#")):this.rootSchema=n,this.validator=e,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,n,r={},i){return!e||!n?!1:this.validator!==e||!ie(this.rootSchema,n)||!ie(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(e,n,r){return $0(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,n,r,i){return kn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(e,n,r=!1,i){return vc(this.validator,e,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(e,n,r){return H0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,n,r,i){return dn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,n,r){return Mr(this.validator,e,n,this.rootSchema,r)}getFromSchema(e,n,r){return Cr(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}isFilesArray(e,n){return wc(this.validator,e,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return Us(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return Zr(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,n){return Z0(this.validator,e,this.rootSchema,n)}retrieveSchema(e,n,r){return Ce(this.validator,e,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(e,n,r){return es(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}toPathSchema(e,n,r){return Q0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function tx(t,e,n={},r){return new ex(t,e,n,r)}function nx(t){var e;if(!t.includes("data:"))throw new Error("File is invalid: URI must be a dataURI");const r=t.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,s]=r,[o,...a]=i.split(";"),l=o||"",u=decodeURI(((e=a.map(c=>c.split("=")).find(([c])=>c==="name"))===null||e===void 0?void 0:e[1])||"unknown");try{const c=atob(s),d=new Array(c.length);for(let g=0;g<c.length;g+=1)d[g]=c.charCodeAt(g);return{blob:new window.Blob([new Uint8Array(d)],{type:l}),name:u}}catch(c){throw new Error(`File is invalid: ${c.message}`)}}function yt(t,e){let n=String(t);for(;n.length<e;)n=`0${n}`;return n}function Ec(t,e){const n=t<=0&&e<=0,r=t<0||e<0;if(!n&&r)throw new Error(`Both start (${t}) and stop (${e}) must both be <= 0 or > 0, got one of each`);const i=new Date().getFullYear(),s=n?i+t:t,o=n?i+e:e;if(s>o)return Ec(e,t).reverse();const a=[];for(let l=s;l<=o;l+=1)a.push({value:l,label:yt(l,2)});return a}function rx(t,e){let n=t;if(Array.isArray(e)){const r=n.split(/(%\d)/);e.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function ix(t,e){return rx(t,e)}function Xr(t,e=[],n){if(Array.isArray(t))return t.map(s=>Xr(s,e)).filter(s=>s!==void 0);const r=t===""||t===null?-1:Number(t),i=e[r];return i?i.value:n}function Ac(t,e,n=[]){const r=Xr(t,n);return Array.isArray(e)?e.filter(i=>!ie(i,r)):ie(r,e)?void 0:e}function ur(t,e){return Array.isArray(e)?e.some(n=>ie(n,t)):ie(e,t)}function sx(t,e=[],n=!1){const r=e.map((i,s)=>ur(i.value,t)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Cc(t,e,n,r="indexed",i){if(typeof t>"u"||n&&Array.isArray(t)&&t.length<1||!n&&t===i)return i;if(r==="realValue")return n?t.map(String):String(t);const o=sx(t,e,n);return typeof o>"u"?i:o}function _c(t,e,n=[]){const r=Xr(t,n);if(!fn(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return e.slice(0,i).concat(r,e.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return e}function ha(t,e,n){if(t===""||!Array.isArray(e))return n;const r=e.find(s=>String(s.value)===t);if(r)return r.value;const i=Number(t);return!Number.isNaN(i)&&i>=0&&i<e.length?e[i].value:n}function Te(t,e,n="indexed",r){return n!=="realValue"?Xr(t,e,r):Array.isArray(t)?t.map(i=>ha(i,e,r)):ha(t,e,r)}function dr(t,e,n="indexed"){return n!=="realValue"?String(e):fn(t)?"":String(typeof t=="object"?e:t)}var ox=1,ax=4;function Bs(t){return qn(t,ox|ax)}function lx(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:$s(t,e,n,r)}class Ic{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let r=Array.isArray(e)&&e.length>0||typeof e=="string"?D(this.errorSchema,e):this.errorSchema;return!r&&e&&(r={},lx(this.errorSchema,e,r,Object)),r}resetAllErrors(e){return this.errorSchema=e?Bs(e):{},this}addErrors(e,n){const r=this.getOrCreateErrorBlock(n);let i=D(r,Ae);return Array.isArray(i)||(i=[],r[Ae]=i),Array.isArray(e)?ce(r,Ae,[...new Set([...i,...e])]):ce(r,Ae,[...new Set([...i,e])]),this}setErrors(e,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(e)?[...new Set([...e])]:[e];return ce(r,Ae,i),this}clearErrors(e){const n=this.getOrCreateErrorBlock(e);return ce(n,Ae,[]),this}}var cx=200;function ux(t,e,n,r){var i=-1,s=ks,o=!0,a=t.length,l=[],u=e.length;if(!a)return l;e.length>=cx&&(s=Qn,o=!1,e=new kt(e));e:for(;++i<a;){var c=t[i],d=c;if(c=c!==0?c:0,o&&d===d){for(var h=u;h--;)if(e[h]===d)continue e;l.push(c)}else s(e,d,r)||l.push(c)}return l}var dx=Gr(function(t,e){return Xn(t)?ux(t,cr(e,1,Xn,!0)):[]});function fx(t,e){if(t==null)return{};var n=yn(Ns(t),function(r){return[r]});return e=Rs(e),jc(t,n,function(r,i){return e(r,i[0])})}function pa(t,e){const n=Et(t),r=Et(e);if(t===e||!n&&!r)return[];if(n&&!r)return ze(t);if(!n&&r)return ze(e);const i=ze(fx(t,(o,a)=>!ie(o,D(e,a)))),s=dx(ze(e),ze(t));return[...i,...s]}function mx(t,e,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:u}=t,c={type:"day",range:[1,31],value:i},d={type:"month",range:[1,12],value:s},h={type:"year",range:n,value:o},g=[];switch(r){case"MDY":g.push(d,c,h);break;case"DMY":g.push(c,d,h);break;default:g.push(h,d,c)}return e&&g.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:u}),g}function Tc(t){const e={};return t.multipleOf&&(e.step=t.multipleOf),(t.minimum||t.minimum===0)&&(e.min=t.minimum),(t.maximum||t.maximum===0)&&(e.max=t.maximum),e}function Nc(t,e,n={},r=!0){const i={type:e||"text",...Tc(t)};return n.inputType?i.type=n.inputType:e||(t.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):t.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(t.formatMinimum!==void 0&&(i.min=t.formatMinimum),t.formatMaximum!==void 0&&(i.max=t.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function vn(t){var e;return(e=t?.optionValueFormat)!==null&&e!==void 0?e:"indexed"}const ga={props:{disabled:!1},submitText:"Submit",norender:!1};function Pc(t={}){const e=B(t);if(e&&e[Fr]){const n=e[Fr];return{...ga,...n}}return ga}function V(t,e,n={}){const{templates:r}=e;if(t==="ButtonTemplates")return r[t];if(Object.hasOwn(n,t)&&typeof n[t]=="string"&&Object.hasOwn(r,n[t])){const i=n[t];return r[i]}return n[t]||r[t]}var hx=0;function Fc(t){var e=++hx;return Ss(t)+e}function Vs(){if(D(globalThis,"process.env.NODE_ENV")!=="test")return{};const t=new Map;return new Proxy({},{get(e,n){return t.has(n)||t.set(n,Fc("test-id-")),t.get(n)}})}const wi={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function px(t){let e=D(t,"MergedWidget");if(!e){const n=t.defaultProps&&t.defaultProps.options||{};e=({options:r,...i})=>m.jsx(t,{options:{...n,...r},...i}),ce(t,"MergedWidget",e)}return e}function tt(t,e,n={}){const r=Le(t);if(typeof e=="function"||e&&oo.isForwardRef(N.createElement(e))||oo.isMemo(e))return px(e);if(typeof e!="string")throw new Error(`Unsupported widget definition: ${typeof e} in schema: ${JSON.stringify(t)}`);if(e in n){const i=n[e];return tt(t,i,n)}if(typeof r=="string"){if(!(r in wi))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(t)}`);if(e in wi[r]){const i=n[wi[r][e]];return tt(t,i,n)}}throw new Error(`No widget '${e}' for type '${r}' in schema: ${JSON.stringify(t)}`)}function gx(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e&=e}return e.toString(16)}function yx(t){const e=new Set;return JSON.stringify(t,(n,r)=>(e.add(n),r)),JSON.stringify(t,Array.from(e).sort())}function Xe(t){return gx(yx(t))}function bx(t){return Xe(t)}function xx(t,e,n={}){try{return tt(t,e,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function Wt(t,e){return`${Ct(t)?t:t[de]}__${e}`}function Ht(t){return Wt(t,"description")}function qs(t){return Wt(t,"error")}function Qr(t){return Wt(t,"examples")}function zs(t){return Wt(t,"help")}function ei(t){return Wt(t,"title")}function Fe(t,e=!1){const n=e?` ${Qr(t)}`:"";return`${qs(t)} ${Ht(t)} ${zs(t)}${n}`}function Ft(t,e){return`${t}-${e}`}function Qe(t,e){return Wt(t,e)}function ji(t,e){return Wt(t,`optional${e}`)}function Sn(t){return!fn(t)&&(!ne(t)||Array.isArray(t)||!ge(t))}function vx(t,e){const{rootSchema:n,schemaUtils:r}=t;if(ie(e,n))return!0;if(ue in n){const i=r.retrieveSchema(n);return ie(e,un(i,Bn))}return!1}function $c(t,e,n){return e?n:t}function Sx(t){return t?new Date(t).toJSON():void 0}function Ws(t,e,n){const r=[lm];return X(t,go)&&r.unshift(go),D(t,[...r,e],n)}function wx(t,e){if(!Array.isArray(e))return t;const n=c=>c.reduce((d,h)=>(d[h]=!0,d),{}),r=c=>c.length>1?`properties '${c.join("', '")}'`:`property '${c[0]}'`,i=n(t),s=e.filter(c=>c==="*"||i[c]),o=n(s),a=t.filter(c=>!o[c]),l=s.indexOf("*");if(l===-1){if(a.length)throw new Error(`uiSchema order list does not contain ${r(a)}`);return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const u=[...s];return u.splice(l,1,...a),u}function Oi(t,e=!0){if(!t)return{year:-1,month:-1,day:-1,hour:e?-1:0,minute:e?-1:0,second:e?-1:0};const n=new Date(t);if(Number.isNaN(n.getTime()))throw new Error(`Unable to parse date ${t}`);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:e?n.getUTCHours():0,minute:e?n.getUTCMinutes():0,second:e?n.getUTCSeconds():0}}function rn(t,e,n,r){if(!q(e))return r;const i=Ce(t,e,n,r);if(Array.isArray(r)){const c=i.items;if(!c)return r;let d=!1;const h=r.map((g,f)=>{let p=c;Array.isArray(c)&&(p=c[f]||i.additionalItems||{});const y=rn(t,p,n,g);return y!==g&&(d=!0),y===void 0?{}:y});return d?h:r}const{properties:s,required:o=[]}=i;if(!q(r)||!s)return r;const a={},l=r;let u=!1;for(const c of Object.keys(l)){const d=l[c],h=s[c]||{},g=o.includes(c),f=q(d),p=Array.isArray(d);if((f||p)&&s[c]){const y=rn(t,h,n,d);(g||!zn(y))&&(a[c]=y,u=!0)}else(g||!zn(d)||!s[c])&&(a[c]=d,zn(d)||(u=!0))}if(!(!u&&Object.keys(a).length===0))return a}function jx(t,e,n){var r,i;const s=(r=t[Bn])!==null&&r!==void 0?r:t[ue],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!e||ge(e)?l={...a}:l=Mt(a,e):l=e||{},o){let u=t;if(s&&t[ue]&&!t[Bn])try{u=Zn(s,n.rootSchema)}catch(c){return console.warn(`could not resolve $ref in resolveUiSchema:
3
+ `,c),l}for(const c of[W,ee]){const d=u[c];if(Array.isArray(d)&&d.length>0){const h=l[c],g=Array.isArray(h)?[...h]:[];let f=!1;for(let p=0;p<d.length;p++){const y=d[p],x=(i=y?.[Bn])!==null&&i!==void 0?i:y?.[ue];if(x&&x in o){const S=g[p]||{};g[p]=Mt(o[x],S),f=!0}}f&&(l[c]=g)}}}return l}function Wn(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return Wn(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return Wn(t.oneOf[0]);if(t.allOf){const e=n=>Wn(n);return t.allOf.some(e)}return!1}function ya(t,e){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){const s=n[i];if(!Object.hasOwn(e,s)||!Object.is(t[s],e[s]))return!1}return!0}function Dc(t,e,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=t;return!ya(o,e)||!ya(a,n)}const{props:i,state:s}=t;return!ie(i,e)||!ie(s,n)}function ba(t){const e=nc(t.map(n=>ne(n)?Le(n):void 0).flat().filter(n=>n!==void 0));return e.length===1?e[0]:e}function fr(t,e,n,r){const{enableOptionalDataFieldForType:i=[]}=B(r,t.globalUiOptions);let s;return ee in e&&Array.isArray(e[ee])?s=ba(e[ee]):W in e&&Array.isArray(e[W])?s=ba(e[W]):s=Le(e),!vx(t,e)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function xa(t,e=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=t,l=Date.UTC(n,r-1,i,s,o,a),u=new Date(l).toJSON();return e?u:u.slice(0,10)}function Hs(t,e=[]){if(!t)return[];let n=[];return Ae in t&&(n=n.concat(t[Ae].map(r=>{const i=`.${e.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(t).reduce((r,i)=>{if(i!==Ae){const s=t[i];if(Et(s))return r.concat(Hs(s,[...e,i]))}return r},n)}function Rc(t){return we(t)?yn(t,At):ir(t)?[t]:_s(gl(Ss(t)))}function Ox(t){const e=new Ic;return t.length&&t.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:Rc(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&e.addErrors(i,s)}),e.ErrorSchema}function Be(t,e,n,r){const i=Array.isArray(n)?n:n?.path,s=t===""?[]:[t],o=i?i.concat(...s):s,a=[e.idPrefix,...o].join(e.idSeparator);let l;return e.nameGenerator&&o.length>0&&(l=e.nameGenerator(o,e.idPrefix,r)),{path:o,[de]:a,...l!==void 0&&{name:l}}}function kc(t){return Object.keys(t).reduce((e,n)=>{if(n==="addError")return e;const r=t[n];return Et(r)?{...e,[n]:kc(r)}:{...e,[n]:r}},{})}function Ex(t){return Object.values(t).every(e=>e!==-1)}function Ax(t){const{className:e="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:u,autofocus:c,registry:d,onBlur:h,onFocus:g}=t,f=`${o}_${n}`,{SelectWidget:p}=d.widgets,y=N.useCallback(x=>s(n,x),[s,n]);return m.jsx(p,{schema:{type:"integer"},id:f,name:a,className:e,options:{enumOptions:Ec(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:u,autofocus:c,onChange:y,onBlur:h,onFocus:g,registry:d,label:"","aria-describedby":Fe(o)})}function Cx(t){const{time:e=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=t,[a,l]=N.useState(Oi(o,e));N.useEffect(()=>{l(Oi(o,e))},[e,o]);const u=N.useCallback((g,f)=>{const p={...a,[g]:typeof f>"u"?-1:f};Ex(p)?s(xa(p,e)):l(p)},[a,s,e]),c=N.useCallback(g=>{g.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),d=N.useCallback(g=>{if(g.preventDefault(),n||r)return;const f=Oi(new Date().toJSON(),e);s(xa(f,e))},[n,r,e,s]);return{elements:N.useMemo(()=>mx(a,e,i.yearsRange,i.format),[a,e,i.yearsRange,i.format]),handleChange:u,handleClear:c,handleSetNow:d}}function Kt(t){const e=N.useRef(t);return ie(t,e.current)||(e.current=t),e.current}function _x(t,e){return t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function Ix(t){const{name:e,size:n,type:r}=t;return new Promise((i,s)=>{const o=new window.FileReader;o.onerror=s,o.onload=a=>{var l;typeof((l=a.target)===null||l===void 0?void 0:l.result)=="string"?i({dataURL:_x(a.target.result,e),name:e,size:n,type:r}):i({dataURL:null,name:e,size:n,type:r})},o.readAsDataURL(t)})}function Tx(t){return Promise.all(Array.from(t).map(Ix))}function va(t){return t.reduce((e,n)=>{if(!n)return e;try{const{blob:r,name:i}=nx(n);return[...e,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return e}},[])}function Nx(t,e,n=!1){const r=N.useMemo(()=>n&&t?Array.isArray(t)?t:[t]:[],[t,n]),i=N.useMemo(()=>Array.isArray(t)?va(t):va([t||""]),[t]),s=N.useCallback(async a=>{const u=(await Tx(a)).map(c=>c.dataURL||null);e(n?r.concat(...u):u[0])},[r,n,e]),o=N.useCallback(a=>{if(n){const l=r.filter((u,c)=>c!==a);e(l)}else e(void 0)},[r,n,e]);return{filesInfo:i,handleChange:s,handleRemove:o}}function Px(t){if(!t)return"";const e=new Date(t),n=yt(e.getFullYear(),4),r=yt(e.getMonth()+1,2),i=yt(e.getDate(),2),s=yt(e.getHours(),2),o=yt(e.getMinutes(),2),a=yt(e.getSeconds(),2),l=yt(e.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Mn(t,e,n=!1){if(!e)return t;const{errors:r,errorSchema:i}=t;let s=Hs(e),o=e;return ge(i)||(o=Mt(i,e,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function Fx(t){const e=t;for(const n in e)if(Object.hasOwn(e,n)){const r=e[n];n===ue&&typeof r=="string"&&r.startsWith("#")?e[n]=ul+r:e[n]=Ks(r)}return t}function $x(t){return t.map(e=>Ks(e))}function Ks(t){return Array.isArray(t)?$x([...t]):ne(t)?Fx({...t}):t}var G;(function(t){t.ArrayItemTitle="Item",t.MissingItems="Missing items definition",t.EmptyArray="No items yet. Use the button below to add some.",t.YesLabel="Yes",t.NoLabel="No",t.CloseLabel="Close",t.ErrorsLabel="Errors",t.NewStringDefault="New Value",t.AddButton="Add",t.AddItemButton="Add Item",t.CopyButton="Copy",t.MoveDownButton="Move down",t.MoveUpButton="Move up",t.RemoveButton="Remove",t.NowLabel="Now",t.ClearLabel="Clear",t.AriaDateLabel="Select a date",t.PreviewLabel="Preview",t.DecrementAriaLabel="Decrease value by 1",t.IncrementAriaLabel="Increase value by 1",t.OptionalObjectAdd="Add data for optional field",t.OptionalObjectRemove="Remove data for optional field",t.OptionalObjectEmptyMsg="No data for optional field",t.Type="Type",t.Value="Value",t.ClearButton="clear input",t.UnknownFieldType="Unknown field type %1",t.OptionPrefix="Option %1",t.TitleOptionPrefix="%1 option %2",t.KeyLabel="%1 Key",t.DeprecatedLabel="%1 (deprecated)",t.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',t.UnsupportedField="Unsupported field schema.",t.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",t.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",t.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",t.FilesInfo="**%1** (%2, %3 bytes)"})(G||(G={}));function Dx(t,e){var n=we(t)?Es:gc;return n(t,Hl(e))}function Rx(t,e){return t==null?!0:Ml(t,e)}function ts(){return Fc("rjsf-array-item-")}function Sa(t){return Array.isArray(t)?t.map(e=>({key:ts(),item:e})):[]}function Mc(t){return Array.isArray(t)?t.map(e=>e.item):[]}function kx(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}function Uc(t,e,n,r){let{addable:i}=B(r,t.globalUiOptions);return i!==!1&&(e.maxItems!==void 0?i=n.length<e.maxItems:i=!0),i}function Lc(t,e,n,r){if(typeof t.items=="function")try{return t.items(e,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return t.items}function Mx(t,e){const{schemaUtils:n,globalFormOptions:r}=t;let i=e.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:Ms(e)&&im(e)&&(i=e.additionalItems),n.getDefaultFormState(i)}function Ux(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:u,onBlur:c,onFocus:d,registry:h,rawErrors:g,name:f,onSelectChange:p}=t,{widgets:y,schemaUtils:x,globalFormOptions:S,globalUiOptions:E}=h,j=x.retrieveSchema(e.items,i),b=r?.items??r,v=mn(j,b),{widget:w="select",title:O,...C}=B(r,E),A=tt(e,w,y),_=O??e.title??f,I=x.getDisplayLabel(e,r,E),T=Kt(Be("",S,n,!0));return m.jsx(A,{id:T[de],name:f,multiple:!0,onChange:p,onBlur:c,onFocus:d,options:{...C,enumOptions:v},schema:e,uiSchema:r,registry:h,value:i,disabled:s,readonly:o,required:l,label:_,hideLabel:!I,placeholder:u,autofocus:a,rawErrors:g,htmlName:T.name})}function Lx(t){const{schema:e,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:u,onBlur:c,onFocus:d,formData:h=[],registry:g,rawErrors:f,name:p,onSelectChange:y}=t,{widgets:x,schemaUtils:S,globalFormOptions:E,globalUiOptions:j}=g,{widget:b,title:v,...w}=B(r,j),O=tt(e,b,x),C=v??e.title??p,A=S.getDisplayLabel(e,r,j),_=Kt(Be("",E,n,!0));return m.jsx(O,{id:_[de],name:p,multiple:!0,onChange:y,onBlur:c,onFocus:d,options:w,schema:e,uiSchema:r,registry:g,value:h,disabled:i,readonly:s,hideError:l,required:a,label:C,hideLabel:!A,placeholder:u,autofocus:o,rawErrors:f,htmlName:_.name})}function Bx(t){const{schema:e,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:u,onFocus:c,registry:d,formData:h=[],rawErrors:g,onSelectChange:f}=t,{widgets:p,schemaUtils:y,globalFormOptions:x,globalUiOptions:S}=d,{widget:E="files",title:j,...b}=B(n,S),v=tt(e,E,p),w=j??e.title??i,O=y.getDisplayLabel(e,n,S),C=Kt(Be("",x,r,!0));return m.jsx(v,{options:b,id:C[de],name:i,multiple:!0,onChange:f,onBlur:u,onFocus:c,schema:e,uiSchema:n,value:h,disabled:s,readonly:o,required:l,registry:d,autofocus:a,rawErrors:g,label:w,hideLabel:!O,htmlName:C.name})}function Bc(t){const{itemKey:e,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:u,canAdd:c,canRemove:d=!0,canMoveUp:h,canMoveDown:g,itemSchema:f,itemData:p,itemUiSchema:y,itemFieldPathId:x,itemErrorSchema:S,autofocus:E,onBlur:j,onFocus:b,onChange:v,rawErrors:w,totalItems:O,title:C,handleAddItem:A,handleCopyItem:_,handleRemoveItem:I,handleReorderItems:T}=t,{schemaUtils:P,fields:{ArraySchemaField:F,SchemaField:$},globalUiOptions:k}=a,M=Kt(x),U=F||$,J=V("ArrayFieldItemTemplate",a,l),ae=P.getDisplayLabel(f,y,k),{description:fe}=B(y),ye=!!fe||!!f.description,{orderable:L=!0,removable:le=!0,copyable:te=!1}=l,H={moveUp:L&&h,moveDown:L&&g,copy:te&&c,remove:le&&d,toolbar:!1};H.toolbar=Object.keys(H).some(xe=>H[xe]);const K=N.useCallback(xe=>{A(xe,n+1)},[A,n]),z=N.useCallback(xe=>{_(xe,n)},[_,n]),re=N.useCallback(xe=>{I(xe,n)},[I,n]),oe=N.useCallback(xe=>{T(xe,n,n-1)},[T,n]),Oe=N.useCallback(xe=>{T(xe,n,n+1)},[T,n]),Ee={children:m.jsx(U,{name:r,title:C,index:n,schema:f,uiSchema:y,formData:p,errorSchema:S,fieldPathId:M,required:kx(f),onChange:v,onBlur:j,onFocus:b,registry:a,disabled:i,readonly:o,hideError:s,autofocus:E,rawErrors:w}),buttonsProps:{fieldPathId:M,disabled:i,readonly:o,canAdd:c,hasCopy:H.copy,hasMoveUp:H.moveUp,hasMoveDown:H.moveDown,hasRemove:H.remove,index:n,totalItems:O,onAddItem:K,onCopyItem:z,onRemoveItem:re,onMoveUpItem:oe,onMoveDownItem:Oe,registry:a,schema:f,uiSchema:y},itemKey:e,className:"rjsf-array-item",disabled:i,hasToolbar:H.toolbar,index:n,totalItems:O,readonly:o,registry:a,schema:f,uiSchema:y,parentUiSchema:u,displayLabel:ae,hasDescription:ye};return m.jsx(J,{...Ee})}function Vx(t){const{schema:e,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:u=!1,autofocus:c=!1,required:d=!1,hideError:h=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,onChange:x,keyedFormData:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v}=t,w=e.title||a||o,{schemaUtils:O,fields:C,formContext:A,globalFormOptions:_,globalUiOptions:I}=g,{OptionalDataControlsField:T}=C,P=B(n,I),F=ne(e.items)?e.items:{},$=O.retrieveSchema(F),k=Mc(S),M=fr(g,e,d,n),U=Sn(s),J=Uc(g,e,k,n)&&(!M||U),ae=U?S:[],fe=M?" rjsf-optional-array-field":"",ye=t.childFieldPathId??i,L=M?m.jsx(T,{...t,fieldPathId:ye}):void 0,le={canAdd:J,items:ae.map((H,K)=>{const{key:z,item:re}=H,oe=re,Oe=O.retrieveSchema(F,oe),Ee=r?r[K]:void 0,xe=Be(K,_,ye),$e=Lc(n,re,K,A),mt={itemKey:z,index:K,name:o&&`${o}-${K}`,registry:g,uiOptions:P,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:d,title:w?`${w}-${K+1}`:void 0,canAdd:J,canMoveUp:K>0,canMoveDown:K<k.length-1,itemSchema:Oe,itemFieldPathId:xe,itemErrorSchema:Ee,itemData:oe,itemUiSchema:$e,autofocus:c&&K===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:S.length,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v,onChange:x};return m.jsx(Bc,{...mt},z)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${$.type}${fe}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:u,required:d,schema:e,title:w,formData:k,rawErrors:y,registry:g,optionalDataControl:L},te=V("ArrayFieldTemplate",g,P);return m.jsx(te,{...le})}function qx(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:u=!1,autofocus:c=!1,required:d=!1,hideError:h=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,keyedFormData:x,onChange:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v}=t;let{formData:w=[]}=t;const O=e.title||a||o,{schemaUtils:C,fields:A,formContext:_,globalFormOptions:I,globalUiOptions:T}=g,P=B(n,T),{OptionalDataControlsField:F}=A,$=fr(g,e,d,n),k=Sn(r),U=(ne(e.items)?e.items:[]).map((K,z)=>C.retrieveSchema(K,w[z])),J=ne(e.additionalItems)?C.retrieveSchema(e.additionalItems,r):null,ae=t.childFieldPathId??s;w.length<U.length&&(w=w.concat(new Array(U.length-w.length)));const fe=k?x:[],ye=$?" rjsf-optional-array-field":"",L=$?m.jsx(F,{...t,fieldPathId:ae}):void 0,le=Uc(g,e,w,n)&&!!J&&(!$||k),te={canAdd:le,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${ye}`,disabled:l,fieldPathId:s,formData:r,items:fe.map((K,z)=>{const{key:re,item:oe}=K,Oe=oe,Ee=z>=U.length,xe=(Ee&&ne(e.additionalItems)?C.retrieveSchema(e.additionalItems,Oe):U[z])||{},$e=Be(z,I,ae);let mt;Ee?mt=n.additionalItems:Array.isArray(n.items)?mt=n.items[z]:mt=Lc(n,oe,z,_);const On=i?i[z]:void 0,En={index:z,itemKey:re,name:o&&`${o}-${z}`,registry:g,uiOptions:P,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:d,title:O?`${O}-${z+1}`:void 0,canAdd:le,canRemove:Ee,canMoveUp:z>=U.length+1,canMoveDown:Ee&&z<w.length-1,itemSchema:xe,itemData:Oe,itemUiSchema:mt,itemFieldPathId:$e,itemErrorSchema:On,autofocus:c&&z===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:x.length,onChange:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v};return m.jsx(Bc,{...En},re)}),onAddClick:E,readonly:u,required:d,registry:g,schema:e,uiSchema:n,title:O,errorSchema:i,rawErrors:y,optionalDataControl:L},H=V("ArrayFieldTemplate",g,P);return m.jsx(H,{...te})}function zx(t=[]){const e=N.useMemo(()=>Xe(t),[t]),[n,r]=N.useState(()=>({formDataHash:e,keyedFormData:Sa(t)}));let{keyedFormData:i,formDataHash:s}=n;if(e!==s){const a=Array.isArray(t)?t:[],l=i||[];i=a.length===l.length?l.map((u,c)=>({key:u.key,item:a[c]})):Sa(a),s=e,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=Mc(a),u=Xe(l);return r({formDataHash:u,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function Wx(t){const{schema:e,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=t,{globalFormOptions:l,schemaUtils:u,translateString:c}=s,{keyedFormData:d,updateKeyedFormData:h}=zx(o),g=t.childFieldPathId??i,f=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const _ in r){const I=parseInt(_);w===void 0||I<w?ce(O,[I],r[_]):I>=w&&ce(O,[I+1],r[_])}}const C={key:ts(),item:Mx(s,e)},A=[...d];w!==void 0?A.splice(w,0,C):A.push(C),a(h(A),g.path,O)},[d,s,e,a,h,r,g]),p=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const _ in r){const I=parseInt(_);I<=w?ce(O,[I],r[_]):I>w&&ce(O,[I+1],r[_])}}const C={key:ts(),item:Bs(d[w].item)},A=[...d];w!==void 0?A.splice(w+1,0,C):A.push(C),a(h(A),g.path,O)},[d,a,h,r,g]),y=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const A in r){const _=parseInt(A);_<w?ce(O,[_],r[A]):_>w&&ce(O,[_-1],r[A])}}const C=d.filter((A,_)=>_!==w);a(h(C),g.path,O)},[d,a,h,r,g]),x=N.useCallback((v,w,O)=>{v&&(v.preventDefault(),v.currentTarget.blur());let C;if(r){C={};for(const I in r){const T=parseInt(I);T==w?ce(C,[O],r[w]):T==O?ce(C,[w],r[O]):ce(C,[I],r[T])}}function A(){const I=d.slice();return I.splice(w,1),I.splice(O,0,d[w]),I}const _=A();a(h(_),g.path,C)},[d,a,h,r,g]),S=N.useCallback((v,w,O,C)=>{a(v===void 0?null:v,w,O,C)},[a]),E=N.useCallback(v=>{a(v,g.path,void 0,g?.[de])},[a,g]),j={...t,formData:o,fieldPathId:g,onSelectChange:E},b={...t,handleAddItem:f,handleCopyItem:p,handleRemoveItem:y,handleReorderItems:x,keyedFormData:d,onChange:S};if(!(an in e)){if(!l.useFallbackUiForUnsupportedType){const w=B(n),O=V("UnsupportedFieldTemplate",s,w);return m.jsx(O,{schema:e,fieldPathId:i,reason:c(G.MissingItems),registry:s})}const v={...e,[an]:{type:void 0}};j.schema=v,b.schema=v}return u.isMultiSelect(j.schema)?m.jsx(Ux,{...j}):Sc(n)?m.jsx(Lx,{...j}):Ms(j.schema)?m.jsx(qx,{...b}):u.isFilesArray(j.schema,n)?m.jsx(Bx,{...j}):m.jsx(Vx,{...b})}function Hx(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:u,hideError:c,autofocus:d,title:h,onChange:g,onFocus:f,onBlur:p,rawErrors:y}=t,{title:x}=e,{widgets:S,translateString:E,globalUiOptions:j}=o,{widget:b="checkbox",title:v,label:w=!0,enumNames:O,...C}=B(r,j),A=tt(e,b,S),_=E(G.YesLabel),I=E(G.NoLabel);let T;const P=v??x??h??n;if(Array.isArray(e.oneOf))T=mn({oneOf:e.oneOf.map($=>{if(ne($))return{...$,title:$.title||($.const===!0?_:I)}}).filter($=>$)},r);else{const $=e.enum??[!0,!1];!O&&$.length===2&&$.every(k=>typeof k=="boolean")?T=[{value:$[0],label:$[0]?_:I},{value:$[1],label:$[1]?_:I}]:T=mn({enum:$},r)}const F=N.useCallback(($,k,M)=>g($,i.path,k,M),[g,i]);return m.jsx(A,{options:{...C,enumOptions:T},schema:e,uiSchema:r,id:i.$id,name:n,onChange:F,onFocus:f,onBlur:p,label:P,hideLabel:!w,value:s,required:a,disabled:l,readonly:u,hideError:c,registry:o,autofocus:d,rawErrors:y,htmlName:i.name})}function Kx(t){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:t}}function Gx(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"?e:e==="object"?Array.isArray(t)?"array":"object":"string"}function Yx(t,e){switch(e){case"string":return String(t);case"number":{const n=Number(t);return isNaN(n)?0:n}case"boolean":return!!t;default:return t}}function Jx(t){const{id:e,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:u=!1,onBlur:c,onFocus:d,registry:h,fieldPathId:g,onChange:f,errorSchema:p}=t,{translateString:y,fields:x,globalFormOptions:S}=h,[E,j]=N.useState(Gx(n)),b=B(o),v=Kt(Be("__internal_type_selector",S,g)),w=y(G.Type),O=N.useMemo(()=>Kx(w),[w]),C=I=>{I!=null&&(j(I),f(Yx(n,I),g.path,p,e))};if(!S.useFallbackUiForUnsupportedType){const{reason:I=y(G.UnknownFieldType,[String(i.type)])}=t,T=V("UnsupportedFieldTemplate",h,b);return m.jsx(T,{schema:i,fieldPathId:g,reason:I,registry:h})}const A=V("FallbackFieldTemplate",h,b),{SchemaField:_}=x;return m.jsx(A,{schema:i,registry:h,typeSelector:m.jsx(_,{fieldPathId:v,name:`${s}__fallback_type`,schema:O,formData:E,onChange:C,onBlur:c,onFocus:d,registry:h,hideLabel:!r,disabled:l,readonly:u,required:a},n?Xe(n):"__empty__"),schemaField:m.jsx(_,{...t,schema:{type:E,title:y(G.Value),...E==="object"&&{additionalProperties:!0}}})})}function Zx(t,e){return yn(e,function(n){return t[n]})}function Xx(t){return t==null?[]:Zx(t,ze(t))}var Qx=Math.max;function ev(t,e,n,r){t=zt(t)?t:Xx(t),n=n?Kl(n):0;var i=t.length;return n<0&&(n=Qx(i+n,0)),Ct(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ec(t,e,n)>-1}var tv=Math.min;function nv(t,e,n){for(var r=ks,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,u=[];o--;){var c=t[o];l=tv(c.length,l),a[o]=i>=120&&c.length>=120?new kt(o&&c):void 0}c=t[0];var d=-1,h=a[0];e:for(;++d<i&&u.length<l;){var g=c[d],f=g;if(g=g!==0?g:0,!(h?Qn(h,f):r(u,f))){for(o=s;--o;){var p=a[o];if(!(p?Qn(p,f):r(t[o],f)))continue e}h&&h.push(f),u.push(g)}}return u}function rv(t){return Xn(t)?t:[]}var wa=Gr(function(t){var e=yn(t,rv);return e.length&&e[0]===t[0]?nv(e):[]});function _r(t,e){return Yr(t,e)}function Vc(t){return t===void 0}var et;(function(t){t.ROW="ui:row",t.COLUMN="ui:col",t.COLUMNS="ui:columns",t.CONDITION="ui:condition"})(et||(et={}));var Hn;(function(t){t.ALL="all",t.SOME="some",t.NONE="none"})(Hn||(Hn={}));const iv=/^\$lookup=(.+)/,Ei="layoutGrid";function ja(t,e){return t??e}function sv(t){return/^\d+?$/.test(t)}const jt=Vs();function ov(t,e,n,r,i){const s=D(n,[qi],{}),o=D(n,t),a={...D(o,[vt],{}),...e,...s},l={...o};ge(a)||ce(l,[vt],a),ge(s)||ce(l,[qi],s);let{readonly:u}=B(l);return(i===!0||Vc(u)&&r===!0)&&(u=!0,X(a,si)?ce(l,[vt,si],!0):ce(l,`ui:${si}`,!0)),{fieldUiSchema:l,uiReadonly:u}}function av(t,e,n="$0m3tH1nG Un3xP3cT3d"){const r=Yi([e]).sort(),i=Yi([n]).sort();switch(t){case Hn.ALL:return _r(r,i);case Hn.SOME:return wa(r,i).length>0;case Hn.NONE:return wa(r,i).length===0;default:return!1}}function ti(t,e,n){let r={},i=t[e];if(Et(i)){const{children:s,className:o,...a}=i;if(i=s,o){const u=o.split(" ").map(c=>Ws(n,c,c)).join(" ");r={...a,className:u}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${e}" in ${JSON.stringify(t)}`);return{children:i,gridProps:r}}function Oa(t,e,n){let r;if(sv(n)&&t&&t?.type==="array"&&X(t,an)){const i=Number(n),s=t[an];Array.isArray(s)?i>s.length?r=kl(s):r=s[i]:r=s,e={[de]:e[de],path:[...e.path.slice(0,e.path.length-1),i]}}return{rawSchema:r,fieldPathId:e}}function lv(t,e,n,r,i){const{schemaUtils:s,globalFormOptions:o}=t;let a=n,l=i;const u=e.split("."),c=u.pop();let d=s.retrieveSchema(a,r),h=r,g=d.readOnly;u.forEach(y=>{if(l=Be(y,o,l),X(d,se))a=D(d,[se,y],{});else if(d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee,S=s.findSelectedOptionInXxxOf(d,y,x,h);a=D(S,[se,y],{})}else{const x=Oa(d,l,y);a=x.rawSchema??{},l=x.fieldPathId}h=D(h,y,{}),d=s.retrieveSchema(a,h),g=ja(d.readOnly,g)});let f,p=!1;if(ge(d)&&(d=void 0),d&&c){if(d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee;d=s.findSelectedOptionInXxxOf(d,c,x,h)}l=Be(c,o,l),p=d!==void 0&&Array.isArray(d.required)&&ev(d.required,c);const y=Oa(d,l,c);if(y.rawSchema?(d=y.rawSchema,l=y.fieldPathId):(d=D(d,[se,c]),d=d&&s.retrieveSchema(d)),g=ja(d?.readOnly,g),d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee,S=He(d);f={options:d[x],hasDiscriminator:!!S}}}return{schema:d,isRequired:p,isReadonly:g,optionsInfo:f,fieldPathId:l}}function cv(t,e){let n=t;return Ct(n)&&(n=Ws(e,n)),sr(n)?n:null}function uv(t,e){let n,r=null,i={},s;if(Ct(e)||Vc(e))n=e??"";else{const{name:o="",render:a,...l}=e;n=o,i=l,ge(i)||Dx(i,(u,c)=>{if(Ct(u)){const d=iv.exec(u);if(Array.isArray(d)&&d.length>1){const h=d[1];i[c]=Ws(t,h,h)}}}),r=cv(a,t),!o&&r&&(s=m.jsx(r,{...l,"data-testid":jt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function ni(t){const{childrenLayoutGridSchemaId:e,...n}=t,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return e.map(l=>N.createElement(Gs,{...n,key:`layoutGrid-${Xe(l)}`,schema:a,layoutGridSchema:l}))}function dv(t){const{layoutGridSchema:e,...n}=t,{formData:r,registry:i}=n,{children:s,gridProps:o}=ti(e,et.CONDITION,i),{operator:a,field:l="",value:u}=o,c=D(r,l,null);return av(a,c,u)?m.jsx(ni,{...n,childrenLayoutGridSchemaId:s}):null}function fv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.COLUMN,r),a=B(i),l=V("GridTemplate",r,a);return m.jsx(l,{column:!0,"data-testid":jt.col,...o,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:s})})}function mv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.COLUMNS,r),a=B(i),l=V("GridTemplate",r,a);return s.map(u=>m.jsx(l,{column:!0,"data-testid":jt.col,...o,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:[u]})},`column-${Xe(u)}`))}function hv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.ROW,r),a=B(i),l=V("GridTemplate",r,a);return m.jsx(l,{...o,"data-testid":jt.row,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:s})})}function pv(t){const{gridSchema:e,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:u,registry:c,layoutGridSchema:d,...h}=t,{onChange:g}=h,{fields:f}=c,{SchemaField:p,LayoutMultiSchemaField:y}=f,x=uv(c,e),{name:S,UIComponent:E,uiProps:j}=x,{schema:b,isRequired:v,isReadonly:w,optionsInfo:O,fieldPathId:C}=lv(c,S,n,l,s),A=Kt(C);if(x.rendered)return x.rendered;if(b){const _=O?.hasDiscriminator?y:p,{fieldUiSchema:I,uiReadonly:T}=ov(S,j,r,w,u);return m.jsx(_,{"data-testid":O?.hasDiscriminator?jt.layoutMultiSchemaField:jt.field,...h,name:S,required:v,readonly:T,schema:b,uiSchema:I,errorSchema:D(i,S),fieldPathId:A,formData:D(l,S),onChange:g,onBlur:o,onFocus:a,options:O?.options,registry:c})}return E?m.jsx(E,{"data-testid":jt.uiComponent,...h,name:S,required:v,formData:l,readOnly:!!w||u,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:c,...j}):null}function Gs(t){const{uiSchema:e}=t;let{layoutGridSchema:n}=t;const r=B(e);if(!n&&Ei in r&&ne(r[Ei])&&(n=r[Ei]),ne(n)){if(et.ROW in n)return m.jsx(hv,{...t,layoutGridSchema:n});if(et.COLUMN in n)return m.jsx(fv,{...t,layoutGridSchema:n});if(et.COLUMNS in n)return m.jsx(mv,{...t,layoutGridSchema:n});if(et.CONDITION in n)return m.jsx(dv,{...t,layoutGridSchema:n})}return m.jsx(pv,{...t,gridSchema:n})}Gs.TEST_IDS=jt;function gv(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=t,l=B(i,o.globalUiOptions),{title:u}=l,{title:c}=r,d=u||n||c||a;if(!d)return null;const h=V("TitleFieldTemplate",o,l);return m.jsx(h,{id:ei(e),title:d,required:s,schema:r,uiSchema:i,registry:o})}function Ai(t,e,n){const r="!@#!@$@#$!@$#";return t.map(({schema:s})=>s).find(s=>{const o=D(s,[se,e]);return D(o,$t,D(o,Ne,r))===n})}function Ea(t,e,n,r,i){const s=e.map(l=>n.retrieveSchema(l,i));let o=t;X(t,W)?o={...t,[W]:s}:X(t,ee)&&(o={...t,[ee]:s});const a=mn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function yv(t){const{name:e,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:u,registry:c,uiSchema:d,schema:h,autofocus:g,readonly:f,required:p,errorSchema:y,hideError:x=!1}=t,{widgets:S,schemaUtils:E,globalUiOptions:j}=c,[b,v]=N.useState(Ea(h,l,E,d,i)),w=D(s,de),O=He(h),C=V("FieldErrorTemplate",c,l),A=V("FieldTemplate",c,l),_=Xe(h),I=Xe(l),T=d?Xe(d):"",P=i?Xe(i):"";N.useEffect(()=>{v(Ea(h,l,E,d,i))},[_,I,E,T,P]);const{widget:F=O?"radio":"select",title:$="",placeholder:k="",optionsSchemaSelector:M=O,hideError:U,...J}=B(d);if(!M)throw new Error("No selector field provided for the LayoutMultiSchemaField");const ae=D(i,M);let fe=D(b[0]?.schema,[se,M],{});const ye=Ai(b,M,ae);fe=fe?.type?fe:{...fe,type:ye?.type||n};const L=tt(fe,F,S),le=U===void 0?x:!!U,te=D(y,[Ae],[]),H=un(y,[Ae]),K=E.getDisplayLabel(h,d,j),z=Oe=>{const Ee=Ai(b,M,Oe),xe=Ai(b,M,ae);let $e=E.sanitizeDataForNewSchema(Ee,xe,i);$e&&Ee&&($e=E.getDefaultFormState(Ee,$e,"excludeObjectChildren")),$e&&ce($e,M,Oe),a($e,s.path,void 0,w)},re={enumOptions:b,...J},oe=!le&&te.length>0?m.jsx(C,{fieldPathId:s,schema:h,errors:te,registry:c}):void 0;return m.jsx(A,{fieldPathId:s,id:w,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,required:p,readonly:!!f,registry:c,displayLabel:K,errors:oe,onChange:a,onKeyRename:Er,onKeyRenameBlur:Er,onRemoveProperty:Er,children:m.jsx(L,{id:w,name:e,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,autofocus:g,readonly:f,required:p,registry:c,multiple:!1,rawErrors:te,hideError:le,hideLabel:!K,errorSchema:H,placeholder:k,onChange:z,onBlur:o,onFocus:u,value:ae,options:re,htmlName:s.name})})}class Aa extends N.Component{constructor(e){super(e);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,s=r.map(o=>i.retrieveSchema(o,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(e,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!ie(e.options,i)){const{registry:{schemaUtils:l}}=this.props,u=i.map(c=>l.retrieveSchema(c,r));a={selectedOption:o,retrievedOptions:u}}if(!ie(r,e.formData)&&s.$id===e.fieldPathId.$id){const{retrievedOptions:l}=a,u=this.getMatchingOption(o,r,l);n&&u!==o&&(a={selectedOption:u,retrievedOptions:l})}a!==this.state&&this.setState(a)}getMatchingOption(e,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=He(i);return s.getClosestMatchingOption(n,r,e,o)}onOptionChange=e=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,u=e!==void 0?parseInt(e,10):-1;if(u===n)return;const c=u>=0?r[u]:void 0,d=n>=0?r[n]:void 0;let h=l.sanitizeDataForNewSchema(c,d,i);c&&(h=l.getDefaultFormState(c,h,"excludeObjectChildren")),this.setState({selectedOption:u},()=>{s(h,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:e,schema:n}=this.props;return`${e.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:u,schema:c,uiSchema:d}=this.props,{widgets:h,fields:g,translateString:f,globalUiOptions:p,schemaUtils:y}=u,{SchemaField:x}=g,S=V("MultiSchemaFieldTemplate",u,p),E=fr(u,c,l,d),j=Sn(i),{selectedOption:b,retrievedOptions:v}=this.state,{widget:w="select",placeholder:O,autofocus:C,autocomplete:A,title:_=c.title,...I}=B(d,p),T=tt({type:"number"},w,h),P=D(r,Ae,[]),F=un(r,[Ae]),$=y.getDisplayLabel(c,d,p),k=b>=0&&v[b]||null;let M;if(k){const{required:te}=c;M=te?at({required:te},k):k}let U=[];W in c&&d&&W in d?Array.isArray(d[W])?U=d[W]:console.warn(`uiSchema.oneOf is not an array for "${_||e}"`):ee in c&&d&&ee in d&&(Array.isArray(d[ee])?U=d[ee]:console.warn(`uiSchema.anyOf is not an array for "${_||e}"`));let J=d;b>=0&&U.length>b&&(J=U[b]);const ae=_?G.TitleOptionPrefix:G.OptionPrefix,fe=_?[_]:[],ye=v.map((te,H)=>{const{title:K=te.title}=B(U[H]);return{label:K||f(ae,fe.concat(String(H+1))),value:H}}),L=!E||j?m.jsx(T,{id:this.getFieldId(),name:`${e}${c.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||ge(ye),multiple:!1,rawErrors:P,errorSchema:F,value:b>=0?b:void 0,options:{enumOptions:ye,...I},registry:u,placeholder:O,autocomplete:A,autofocus:C,label:_??e,hideLabel:!$,readonly:a}):void 0,le=M&&M.type!=="null"&&m.jsx(x,{...this.props,schema:M,uiSchema:J})||null;return m.jsx(S,{schema:c,registry:u,uiSchema:d,selector:L,optionSchemaField:le})}}const bv=/\.([0-9]*0)*$/,xv=/[0.]0*$/;function vv(t){const{registry:e,onChange:n,formData:r,value:i}=t,[s,o]=N.useState(i),{StringField:a}=e.fields;let l=r;const u=N.useCallback((c,d,h,g)=>{o(c),`${c}`.charAt(0)==="."&&(c=`0${c}`);const f=typeof c=="string"&&c.match(bv)?po(c.replace(xv,"")):po(c);n(f,d,h,g)},[n]);if(typeof s=="string"&&typeof l=="number"){const c=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(c)&&(l=s)}return m.jsx(a,{...t,formData:l,onChange:u})}function Je(){return Je=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Je.apply(null,arguments)}const yr=["strong","em","del","mark"],Ca=[["**",yr[0]],["__",yr[0]],["~~",yr[2]],["==",yr[3]],["*","em"],["_","em"]];function Sv(t,e){for(var n=1,r=e+1;r<t.length&&n>0;)t[r]!=="\\"?(t[r]==="["&&n++,t[r]==="]"&&n--,r++):r+=2;if(n===0&&r<t.length&&(t[r]==="("||t[r]==="[")){var i=t[r]==="("?")":"]",s=1;for(r++;r<t.length&&s>0;)t[r]!=="\\"?(t[r]==="("&&i===")"&&s++,t[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function wv(t,e){if(!e||!e.inline&&!e.simple)return null;var n=t[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=Ca[o][0];if(t.startsWith(a)&&t.length>=2*a.length){r=a,i=a.length,s=Ca[o][1];break}}if(!r)return null;for(var l=i,u=!1,c=!1,d="",h=0,g="",f=!1,p="";l<t.length;){var y=t[l];if(f)g+=y,f=!1,p=y,l++;else if(y!=="\\")if(y!=="`"||h!==0){if(y==="["&&!u&&h===0){var x=Sv(t,l);if(x!==-1){g+=t.slice(l,x),l=x,p=t[x-1];continue}}if(c)g+=y,d?y===d&&(d=""):y==='"'||y==="'"?d=y:y===">"&&(c=!1),p=y,l++;else if(y!=="<"||u){if(y===`
4
4
  `&&p===`
5
- `&&!u&&h===0)return null;if(!u&&h===0){for(var S=0;l+S<t.length&&t[l+S]===r[0];)S++;if(S>=i&&(i!==1||r!=="*"&&r!=="_"||t[l-1]!==r&&t[l+1]!==r)){var E=[t.slice(0,l+S),s,g+t.slice(l+i,l+S)];return E.index=0,E.input=t,E}}g+=y,p=y,l++}else{var j=t[l+1],b=t.indexOf(">",l);if(b!==-1){var v=t.slice(l,b+1).endsWith("/>");j==="/"?h=Math.max(0,h-1):v||h++}c=!0,g+=y,p=y,l++}}else u=!u,g+=y,p=y,l++;else g+=y,f=!0,p=y,l++}return null}const jv=["children","options"],Ca=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,e)=>(t[e.toLowerCase()]=e,t),{class:"className",for:"htmlFor"}),_a={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Ov=["style","script","pre"],Ev=["src","href","data","formAction","srcDoc","action"],Av=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Cv=/\n{2,}$/,Ia=/^(\s*>[\s\S]*?)(?=\n\n|$)/,_v=/^ *> ?/gm,Iv=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Tv=/^ {2,}\n/,Nv=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Ta=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Na=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Pv=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Fv=/^(?:\n *)*\n/,$v=/\r\n?/g,Dv=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Rv=/^\[\^([^\]]+)]/,kv=/\f/g,Mv=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Uv=/^\[(x|\s)\]/,Pa=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Fa=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,$a=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Ys=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Lv(t){const e=Ys.exec(t);if(!e)return null;const n=e[1],r=n.toLowerCase(),i=r.length+1;let s=e[0].length;t[s]===`
5
+ `&&!u&&h===0)return null;if(!u&&h===0){for(var S=0;l+S<t.length&&t[l+S]===r[0];)S++;if(S>=i&&(i!==1||r!=="*"&&r!=="_"||t[l-1]!==r&&t[l+1]!==r)){var E=[t.slice(0,l+S),s,g+t.slice(l+i,l+S)];return E.index=0,E.input=t,E}}g+=y,p=y,l++}else{var j=t[l+1],b=t.indexOf(">",l);if(b!==-1){var v=t.slice(l,b+1).endsWith("/>");j==="/"?h=Math.max(0,h-1):v||h++}c=!0,g+=y,p=y,l++}}else u=!u,g+=y,p=y,l++;else g+=y,f=!0,p=y,l++}return null}const jv=["children","options"],_a=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,e)=>(t[e.toLowerCase()]=e,t),{class:"className",for:"htmlFor"}),Ia={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Ov=["style","script","pre"],Ev=["src","href","data","formAction","srcDoc","action"],Av=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Cv=/\n{2,}$/,Ta=/^(\s*>[\s\S]*?)(?=\n\n|$)/,_v=/^ *> ?/gm,Iv=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Tv=/^ {2,}\n/,Nv=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Na=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Pa=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Pv=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Fv=/^(?:\n *)*\n/,$v=/\r\n?/g,Dv=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Rv=/^\[\^([^\]]+)]/,kv=/\f/g,Mv=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Uv=/^\[(x|\s)\]/,Fa=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,$a=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Da=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Ys=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Lv(t){const e=Ys.exec(t);if(!e)return null;const n=e[1],r=n.toLowerCase(),i=r.length+1;let s=e[0].length;t[s]===`
6
6
  `&&s++;const o=s;let a=s,l=1;const u=t.length;for(;l>0;){const d=t.indexOf("<",s);if(d===-1)return null;let h=-1,g=-1;if(t[d+1]==="/")g=d;else if(t[d+1]===r[0]||t[d+1]===n[0]){let f=!0;for(let p=0;p<r.length;p++){const y=t[d+1+p];if(y!==r[p]&&y!==n[p]){f=!1;break}}!f||t[d+i]!==" "&&t[d+i]!==">"||(h=d)}if(h!==-1||g!==-1)if(h!==-1&&(g===-1||h<g))s=h+i+1,l++;else{let f=g+2;for(;f<u;){const y=t[f];if(y!==" "&&y!==" "&&y!==`
7
7
  `&&y!=="\r")break;f++}if(f+r.length>u)return null;let p=!0;for(let y=0;y<r.length;y++){const x=t[f+y];if(x!==r[y]&&x!==n[y]){p=!1;break}}if(!p){s=f;continue}for(f+=r.length;f<u;){const y=t[f];if(y!==" "&&y!==" "&&y!==`
8
8
  `&&y!=="\r")break;f++}if(f>=u||t[f]!==">"){s=f;continue}a=g,s=f+1,l--}else s=d+1}let c=0;for(;s+c<u&&t[s+c]===`
9
- `;)c++;return[t.slice(0,s+c),n,e[2],t.slice(o,a)]}const Bv=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Da=/^<!--[\s\S]*?(?:-->)/,Vv=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,ns=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,qv=/^\{.*\}$/,zv=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Wv=/^<([^ >]+[:@\/][^ >]+)>/,Hv=/-([a-z])?/gi,Ra=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Kv=/^[^\n]+(?: \n|\n{2,})/,Gv=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Yv=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Jv=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Zv=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Xv=/\t/g,Qv=/(^ *\||\| *$)/g,e1=/^ *:-+: *$/,t1=/^ *:-+ *$/,n1=/^ *-+: *$/,r1=/^(:[a-zA-Z0-9-_]+:)/,i1=/^\\([^0-9A-Za-z\s])/,s1=/\\([^0-9A-Za-z\s])/g,o1=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,a1=/^\n+/,l1=/^([ \t]*)/,c1=/(?:^|\n)( *)$/,Js="(?:\\d+\\.)",Zs="(?:[*+-])";function Vc(t){return"( *)("+(t===1?Js:Zs)+") +"}const qc=Vc(1),zc=Vc(2);function Wc(t){return RegExp("^"+(t===1?qc:zc))}const u1=Wc(1),d1=Wc(2);function Hc(t){return RegExp("^"+(t===1?qc:zc)+"[^\\n]*(?:\\n(?!\\1"+(t===1?Js:Zs)+" )[^\\n]*)*(\\n|$)","gm")}const f1=Hc(1),m1=Hc(2);function Kc(t){const e=t===1?Js:Zs;return RegExp("^( *)("+e+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+e+" (?!"+e+" ))\\n*|\\s*\\n*$)")}const Gc=Kc(1),Yc=Kc(2);function ka(t,e){const n=e===1,r=n?Gc:Yc,i=n?f1:m1,s=n?u1:d1;return{t:o=>s.test(o),o:xt(function(o,a){const l=c1.exec(a.prevCapture);return l&&(a.list||!a.inline&&!a.simple)?r.exec(o=l[1]+o):null}),u:1,i(o,a,l){const u=n?+o[2]:void 0,c=o[0].replace(Cv,`
9
+ `;)c++;return[t.slice(0,s+c),n,e[2],t.slice(o,a)]}const Bv=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Ra=/^<!--[\s\S]*?(?:-->)/,Vv=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,ns=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,qv=/^\{.*\}$/,zv=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Wv=/^<([^ >]+[:@\/][^ >]+)>/,Hv=/-([a-z])?/gi,ka=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Kv=/^[^\n]+(?: \n|\n{2,})/,Gv=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Yv=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Jv=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Zv=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Xv=/\t/g,Qv=/(^ *\||\| *$)/g,e1=/^ *:-+: *$/,t1=/^ *:-+ *$/,n1=/^ *-+: *$/,r1=/^(:[a-zA-Z0-9-_]+:)/,i1=/^\\([^0-9A-Za-z\s])/,s1=/\\([^0-9A-Za-z\s])/g,o1=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,a1=/^\n+/,l1=/^([ \t]*)/,c1=/(?:^|\n)( *)$/,Js="(?:\\d+\\.)",Zs="(?:[*+-])";function qc(t){return"( *)("+(t===1?Js:Zs)+") +"}const zc=qc(1),Wc=qc(2);function Hc(t){return RegExp("^"+(t===1?zc:Wc))}const u1=Hc(1),d1=Hc(2);function Kc(t){return RegExp("^"+(t===1?zc:Wc)+"[^\\n]*(?:\\n(?!\\1"+(t===1?Js:Zs)+" )[^\\n]*)*(\\n|$)","gm")}const f1=Kc(1),m1=Kc(2);function Gc(t){const e=t===1?Js:Zs;return RegExp("^( *)("+e+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+e+" (?!"+e+" ))\\n*|\\s*\\n*$)")}const Yc=Gc(1),Jc=Gc(2);function Ma(t,e){const n=e===1,r=n?Yc:Jc,i=n?f1:m1,s=n?u1:d1;return{t:o=>s.test(o),o:xt(function(o,a){const l=c1.exec(a.prevCapture);return l&&(a.list||!a.inline&&!a.simple)?r.exec(o=l[1]+o):null}),u:1,i(o,a,l){const u=n?+o[2]:void 0,c=o[0].replace(Cv,`
10
10
  `).match(i),d=s.exec(c[0]),h=RegExp("^ {1,"+(d?d[0].length:0)+"}","gm");let g=!1;return{items:c.map(function(f,p){const y=f.replace(h,"").replace(s,""),x=p===c.length-1,S=Ke(y,`
11
11
 
12
12
  `)||x&&g;g=S;const E=l.inline,j=l.list;let b;l.list=!0,S?(l.inline=!1,b=Kn(y)+`
13
13
 
14
- `):(l.inline=!0,b=Kn(y));const v=a(b,l);return l.inline=E,l.list=j,v}),ordered:n,start:u}}}}const h1=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),p1=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Ma(t){return typeof t=="string"}function Kn(t){let e=t.length;for(;e>0&&t[e-1]<=" ";)e--;return t.slice(0,e)}function rs(t,e){return t.startsWith(e)}function Ke(t,e){return t.indexOf(e)!==-1}function g1(t,e,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(rs(t,n[r]))return!0;return!1}return n(t,e)}function Pn(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function y1(t){return n1.test(t)?"right":e1.test(t)?"center":t1.test(t)?"left":null}function Ua(t,e,n,r){const i=n.inTable;n.inTable=!0;let s=[[]],o="";function a(){if(!o)return;const l=s[s.length-1];l.push.apply(l,e(o,n)),o=""}return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((l,u,c)=>{l.trim()==="|"&&(a(),r)?u!==0&&u!==c.length-1&&s.push([]):o+=l}),a(),n.inTable=i,s}function b1(t,e,n){n.inline=!0;const r=t[2]?t[2].replace(Qv,"").split("|").map(y1):[],i=t[3]?(function(o,a,l){return o.trim().split(`
15
- `).map(function(u){return Ua(u,a,l,!0)})})(t[3],e,n):[],s=Ua(t[1],e,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function La(t,e){return t.align[e]==null?{}:{textAlign:t.align[e]}}function xt(t){return t.inline=1,t}function ht(t){return xt(function(e,n){return n.inline?t.exec(e):null})}function br(t){return xt(function(e,n){return n.inline||n.simple?t.exec(e):null})}function it(t){return function(e,n){return n.inline||n.simple?null:t.exec(e)}}function Ba(t){return xt(function(e){return t.exec(e)})}const x1=/(javascript|vbscript|data(?!:image)):/i;function v1(t){try{const e=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(x1.test(e))return null}catch{return null}return t}function Ge(t){return t&&t.replace(s1,"$1")}function Ir(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function S1(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function w1(t,e,n){const r=n.inline||!1;n.inline=!1;const i=t(e,n);return n.inline=r,i}const j1=(t,e,n)=>({children:Ir(e,t[2],n)});function Ci(){return{}}function O1(...t){return t.filter(Boolean).join(" ")}function _i(t,e,n){let r=t;const i=e.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function Ii(t,e,n,r){if(!e||!e.trim())return null;const i=e.match(Av);return i?i.reduce(function(s,o){const a=o.indexOf("=");if(a!==-1){const l=(function(d){return d.indexOf("-")!==-1&&d.match(Vv)===null&&(d=d.replace(Hv,function(h,g){return g.toUpperCase()})),d})(o.slice(0,a)).trim(),u=Ca[l]||l;if(u==="ref")return s;const c=s[u]=(function(d,h,g,f){return h==="style"?(function(p){const y=[];if(!p)return y;let x="",S=0,E="";for(let b=0;b<p.length;b++){const v=p[b];if(v==='"'||v==="'")E?v===E&&(E="",S--):(E=v,S++);else if(v==="("&&x.endsWith("url"))S++;else if(v===")"&&S>0)S--;else if(v===";"&&S===0){const w=x.indexOf(":");w>0&&y.push([x.slice(0,w).trim(),x.slice(w+1).trim()]),x="";continue}x+=v}const j=x.indexOf(":");return j>0&&y.push([x.slice(0,j).trim(),x.slice(j+1).trim()]),y})(g).reduce(function(p,[y,x]){return p[y.replace(/(-[a-z])/g,S=>S[1].toUpperCase())]=f(x,d,y),p},{}):Ev.indexOf(h)!==-1?f(Ge(g),d,h):(g.match(qv)&&(g=Ge(g.slice(1,g.length-1))),g==="true"||g!=="false"&&g)})(t,l,(function(d){const h=d[0];return(h==='"'||h==="'")&&d.length>=2&&d[d.length-1]===h?d.slice(1,-1):d})(o.slice(a+1).trim()),n);typeof c=="string"&&(Ys.test(c)||ns.test(c))&&(s[u]=r(c.trim()))}else o!=="style"&&(s[Ca[o]||o]=!0);return s},{}):null}function Va(t,e){for(let n=0;n<t.length;n++)if(t[n].test(e))return!0;return!1}function E1(t="",e={}){e.overrides=e.overrides||{},e.namedCodesToUnicode=e.namedCodesToUnicode?Je({},_a,e.namedCodesToUnicode):_a;const n=e.slugify||Pn,r=e.sanitizer||v1,i=e.createElement||N.createElement,s=[Ia,Ta,Na,e.enforceAtxHeadings?Fa:Pa,$a,Ra,Gc,Yc],o=[...s,Kv,Ys,Da,ns];function a(f,p,...y){const x=_i(e.overrides,f+".props",{});return i((function(S,E){const j=_i(E,S);return j?typeof j=="function"||typeof j=="object"&&"render"in j?j:_i(E,S+".component",S):S})(f,e.overrides),Je({},p,x,{className:O1(p?.className,x.className)||void 0}),...y)}function l(f){f=f.replace(Mv,"");let p=!1;e.forceInline?p=!0:e.forceBlock||(p=Zv.test(f)===!1);const y=h(p?f:Kn(f).replace(a1,"")+`
14
+ `):(l.inline=!0,b=Kn(y));const v=a(b,l);return l.inline=E,l.list=j,v}),ordered:n,start:u}}}}const h1=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),p1=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Ua(t){return typeof t=="string"}function Kn(t){let e=t.length;for(;e>0&&t[e-1]<=" ";)e--;return t.slice(0,e)}function rs(t,e){return t.startsWith(e)}function Ke(t,e){return t.indexOf(e)!==-1}function g1(t,e,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(rs(t,n[r]))return!0;return!1}return n(t,e)}function Pn(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function y1(t){return n1.test(t)?"right":e1.test(t)?"center":t1.test(t)?"left":null}function La(t,e,n,r){const i=n.inTable;n.inTable=!0;let s=[[]],o="";function a(){if(!o)return;const l=s[s.length-1];l.push.apply(l,e(o,n)),o=""}return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((l,u,c)=>{l.trim()==="|"&&(a(),r)?u!==0&&u!==c.length-1&&s.push([]):o+=l}),a(),n.inTable=i,s}function b1(t,e,n){n.inline=!0;const r=t[2]?t[2].replace(Qv,"").split("|").map(y1):[],i=t[3]?(function(o,a,l){return o.trim().split(`
15
+ `).map(function(u){return La(u,a,l,!0)})})(t[3],e,n):[],s=La(t[1],e,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function Ba(t,e){return t.align[e]==null?{}:{textAlign:t.align[e]}}function xt(t){return t.inline=1,t}function ht(t){return xt(function(e,n){return n.inline?t.exec(e):null})}function br(t){return xt(function(e,n){return n.inline||n.simple?t.exec(e):null})}function it(t){return function(e,n){return n.inline||n.simple?null:t.exec(e)}}function Va(t){return xt(function(e){return t.exec(e)})}const x1=/(javascript|vbscript|data(?!:image)):/i;function v1(t){try{const e=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(x1.test(e))return null}catch{return null}return t}function Ge(t){return t&&t.replace(s1,"$1")}function Ir(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function S1(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function w1(t,e,n){const r=n.inline||!1;n.inline=!1;const i=t(e,n);return n.inline=r,i}const j1=(t,e,n)=>({children:Ir(e,t[2],n)});function Ci(){return{}}function O1(...t){return t.filter(Boolean).join(" ")}function _i(t,e,n){let r=t;const i=e.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function Ii(t,e,n,r){if(!e||!e.trim())return null;const i=e.match(Av);return i?i.reduce(function(s,o){const a=o.indexOf("=");if(a!==-1){const l=(function(d){return d.indexOf("-")!==-1&&d.match(Vv)===null&&(d=d.replace(Hv,function(h,g){return g.toUpperCase()})),d})(o.slice(0,a)).trim(),u=_a[l]||l;if(u==="ref")return s;const c=s[u]=(function(d,h,g,f){return h==="style"?(function(p){const y=[];if(!p)return y;let x="",S=0,E="";for(let b=0;b<p.length;b++){const v=p[b];if(v==='"'||v==="'")E?v===E&&(E="",S--):(E=v,S++);else if(v==="("&&x.endsWith("url"))S++;else if(v===")"&&S>0)S--;else if(v===";"&&S===0){const w=x.indexOf(":");w>0&&y.push([x.slice(0,w).trim(),x.slice(w+1).trim()]),x="";continue}x+=v}const j=x.indexOf(":");return j>0&&y.push([x.slice(0,j).trim(),x.slice(j+1).trim()]),y})(g).reduce(function(p,[y,x]){return p[y.replace(/(-[a-z])/g,S=>S[1].toUpperCase())]=f(x,d,y),p},{}):Ev.indexOf(h)!==-1?f(Ge(g),d,h):(g.match(qv)&&(g=Ge(g.slice(1,g.length-1))),g==="true"||g!=="false"&&g)})(t,l,(function(d){const h=d[0];return(h==='"'||h==="'")&&d.length>=2&&d[d.length-1]===h?d.slice(1,-1):d})(o.slice(a+1).trim()),n);typeof c=="string"&&(Ys.test(c)||ns.test(c))&&(s[u]=r(c.trim()))}else o!=="style"&&(s[_a[o]||o]=!0);return s},{}):null}function qa(t,e){for(let n=0;n<t.length;n++)if(t[n].test(e))return!0;return!1}function E1(t="",e={}){e.overrides=e.overrides||{},e.namedCodesToUnicode=e.namedCodesToUnicode?Je({},Ia,e.namedCodesToUnicode):Ia;const n=e.slugify||Pn,r=e.sanitizer||v1,i=e.createElement||N.createElement,s=[Ta,Na,Pa,e.enforceAtxHeadings?$a:Fa,Da,ka,Yc,Jc],o=[...s,Kv,Ys,Ra,ns];function a(f,p,...y){const x=_i(e.overrides,f+".props",{});return i((function(S,E){const j=_i(E,S);return j?typeof j=="function"||typeof j=="object"&&"render"in j?j:_i(E,S+".component",S):S})(f,e.overrides),Je({},p,x,{className:O1(p?.className,x.className)||void 0}),...y)}function l(f){f=f.replace(Mv,"");let p=!1;e.forceInline?p=!0:e.forceBlock||(p=Zv.test(f)===!1);const y=h(p?f:Kn(f).replace(a1,"")+`
16
16
 
17
- `,{inline:p});if(e.ast)return y;const x=g(y);for(;Ma(x[x.length-1])&&!x[x.length-1].trim();)x.pop();if(u.length&&x.push(a("footer",{key:"footer"},u.map(function(j){return a("div",{id:n(j.identifier,Pn),key:j.identifier},j.identifier,g(h(j.footnote,{inline:!0})))}))),e.wrapper===null)return x;const S=e.wrapper||(p?"span":"div");let E;if(x.length>1||e.forceWrapper)E=x;else{if(x.length===1)return E=x[0],typeof E=="string"?a("span",{key:"outer"},E):E;E=null}return i(S,Je({key:"outer"},e.wrapperProps),E)}const u=[],c={},d={0:{t:[">"],o:it(Ia),u:1,i(f,p,y){const[,x,S]=f[0].replace(_v,"").match(Iv);return{alert:x,children:p(S,y)}}},1:{t:[" "],o:ht(Tv),u:1,i:Ci},2:{t:function(f,p){if(p.inline||p.simple)return!1;var y=f[0];return y==="-"||y==="*"||y==="_"},o:it(Nv),u:1,i:Ci},3:{t:[" "],o:it(Na),u:0,i:f=>({lang:void 0,text:Ge(Kn(f[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:it(Ta),u:0,i:f=>({attrs:Ii("code",f[3]||"",r,l),lang:f[2]||void 0,text:f[4],type:"3"})},5:{t:["`"],o:br(Pv),u:3,i:f=>({text:Ge(f[2])})},6:{t:["[^"],o:it(Dv),u:0,i:f=>(u.push({footnote:f[2],identifier:f[1]}),{})},7:{t:["[^"],o:ht(Rv),u:1,i:f=>({target:"#"+n(f[1],Pn),text:f[1]})},8:{t:["[ ]","[x]"],o:ht(Uv),u:1,i:f=>({completed:f[1].toLowerCase()==="x"})},9:{t:["#"],o:it(e.enforceAtxHeadings?Fa:Pa),u:1,i:(f,p,y)=>({children:Ir(p,f[2],y),id:n(f[2],Pn),level:f[1].length})},10:{t:f=>{const p=f.indexOf(`
18
- `);return p>0&&p<f.length-1&&(f[p+1]==="="||f[p+1]==="-")},o:it($a),u:1,i:(f,p,y)=>({children:Ir(p,f[1],y),level:f[2]==="="?1:2,type:"9"})},11:{t:["<"],o:xt(Lv),u:1,i(f,p,y){const[,x]=f[3].match(l1),S=RegExp("^"+x,"gm"),E=f[3].replace(S,""),j=Va(o,E)?w1:Ir,b=f[1].toLowerCase(),v=Ov.indexOf(b)!==-1,w=(v?b:f[1]).trim(),O={attrs:Ii(w,f[2],r,l),noInnerParse:v,tag:w};if(y.inAnchor=y.inAnchor||b==="a",v)O.text=f[3];else{const C=y.inHTML;y.inHTML=!0,O.children=j(p,E,y),y.inHTML=C}return y.inAnchor=!1,O}},13:{t:["<"],o:Ba(ns),u:1,i(f){const p=f[1].trim();return{attrs:Ii(p,f[2]||"",r,l),tag:p}}},12:{t:["<!--"],o:Ba(Da),u:1,i:()=>({})},14:{t:["!["],o:br(p1),u:1,i:f=>({alt:Ge(f[1]),target:Ge(f[2]),title:Ge(f[3])})},15:{t:["["],o:ht(h1),u:3,i:(f,p,y)=>({children:S1(p,f[1],y),target:Ge(f[2]),title:Ge(f[3])})},16:{t:function(f,p){return!(!p.inline||p.inAnchor)&&f[0]==="<"&&(Ke(f,":")||Ke(f,"@")||Ke(f,"/"))},o:ht(Wv),u:0,i(f){let p=f[1],y=!1;return Ke(p,"@")&&!Ke(p,"//")&&(y=!0,p=p.replace("mailto:","")),{children:[{text:p,type:"27"}],target:y?"mailto:"+p:p,type:"15"}}},17:{t:(f,p)=>!p.inAnchor&&!e.disableAutoLink&&rs(f,"http"),o:ht(zv),u:0,i:f=>({children:[{text:f[1],type:"27"}],target:f[1],title:void 0,type:"15"})},20:ka(0,1),30:ka(0,2),19:{t:[`
17
+ `,{inline:p});if(e.ast)return y;const x=g(y);for(;Ua(x[x.length-1])&&!x[x.length-1].trim();)x.pop();if(u.length&&x.push(a("footer",{key:"footer"},u.map(function(j){return a("div",{id:n(j.identifier,Pn),key:j.identifier},j.identifier,g(h(j.footnote,{inline:!0})))}))),e.wrapper===null)return x;const S=e.wrapper||(p?"span":"div");let E;if(x.length>1||e.forceWrapper)E=x;else{if(x.length===1)return E=x[0],typeof E=="string"?a("span",{key:"outer"},E):E;E=null}return i(S,Je({key:"outer"},e.wrapperProps),E)}const u=[],c={},d={0:{t:[">"],o:it(Ta),u:1,i(f,p,y){const[,x,S]=f[0].replace(_v,"").match(Iv);return{alert:x,children:p(S,y)}}},1:{t:[" "],o:ht(Tv),u:1,i:Ci},2:{t:function(f,p){if(p.inline||p.simple)return!1;var y=f[0];return y==="-"||y==="*"||y==="_"},o:it(Nv),u:1,i:Ci},3:{t:[" "],o:it(Pa),u:0,i:f=>({lang:void 0,text:Ge(Kn(f[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:it(Na),u:0,i:f=>({attrs:Ii("code",f[3]||"",r,l),lang:f[2]||void 0,text:f[4],type:"3"})},5:{t:["`"],o:br(Pv),u:3,i:f=>({text:Ge(f[2])})},6:{t:["[^"],o:it(Dv),u:0,i:f=>(u.push({footnote:f[2],identifier:f[1]}),{})},7:{t:["[^"],o:ht(Rv),u:1,i:f=>({target:"#"+n(f[1],Pn),text:f[1]})},8:{t:["[ ]","[x]"],o:ht(Uv),u:1,i:f=>({completed:f[1].toLowerCase()==="x"})},9:{t:["#"],o:it(e.enforceAtxHeadings?$a:Fa),u:1,i:(f,p,y)=>({children:Ir(p,f[2],y),id:n(f[2],Pn),level:f[1].length})},10:{t:f=>{const p=f.indexOf(`
18
+ `);return p>0&&p<f.length-1&&(f[p+1]==="="||f[p+1]==="-")},o:it(Da),u:1,i:(f,p,y)=>({children:Ir(p,f[1],y),level:f[2]==="="?1:2,type:"9"})},11:{t:["<"],o:xt(Lv),u:1,i(f,p,y){const[,x]=f[3].match(l1),S=RegExp("^"+x,"gm"),E=f[3].replace(S,""),j=qa(o,E)?w1:Ir,b=f[1].toLowerCase(),v=Ov.indexOf(b)!==-1,w=(v?b:f[1]).trim(),O={attrs:Ii(w,f[2],r,l),noInnerParse:v,tag:w};if(y.inAnchor=y.inAnchor||b==="a",v)O.text=f[3];else{const C=y.inHTML;y.inHTML=!0,O.children=j(p,E,y),y.inHTML=C}return y.inAnchor=!1,O}},13:{t:["<"],o:Va(ns),u:1,i(f){const p=f[1].trim();return{attrs:Ii(p,f[2]||"",r,l),tag:p}}},12:{t:["<!--"],o:Va(Ra),u:1,i:()=>({})},14:{t:["!["],o:br(p1),u:1,i:f=>({alt:Ge(f[1]),target:Ge(f[2]),title:Ge(f[3])})},15:{t:["["],o:ht(h1),u:3,i:(f,p,y)=>({children:S1(p,f[1],y),target:Ge(f[2]),title:Ge(f[3])})},16:{t:function(f,p){return!(!p.inline||p.inAnchor)&&f[0]==="<"&&(Ke(f,":")||Ke(f,"@")||Ke(f,"/"))},o:ht(Wv),u:0,i(f){let p=f[1],y=!1;return Ke(p,"@")&&!Ke(p,"//")&&(y=!0,p=p.replace("mailto:","")),{children:[{text:p,type:"27"}],target:y?"mailto:"+p:p,type:"15"}}},17:{t:(f,p)=>!p.inAnchor&&!e.disableAutoLink&&rs(f,"http"),o:ht(zv),u:0,i:f=>({children:[{text:f[1],type:"27"}],target:f[1],title:void 0,type:"15"})},20:Ma(0,1),30:Ma(0,2),19:{t:[`
19
19
  `],o:it(Fv),u:3,i:Ci},21:{t:function(f,p){return!p.inline&&!p.simple},o:xt(function(f,p){if(p.inline||p.simple||p.inHTML&&!Ke(f,`
20
20
 
21
21
  `)&&!Ke(p.prevCapture,`
22
22
 
23
23
  `))return null;let y="",x=0;for(;;){const E=f.indexOf(`
24
- `,x),j=f.slice(x,E===-1?void 0:E+1),b=f[x];if((b===">"||b==="#"||b==="|"||b==="`"||b==="~"||b==="*"||b==="-"||b==="_"||b===" ")&&Va(s,j)||(y+=j,E===-1||!j.trim()))break;x=E+1}const S=Kn(y);return S===""?null:[y,,S]}),u:3,i:j1},22:{t:["["],o:ht(Gv),u:0,i:f=>(c[f[1]]={target:f[2],title:f[4]},{})},23:{t:["!["],o:br(Yv),u:0,i:f=>({alt:f[1]?Ge(f[1]):void 0,ref:f[2]})},24:{t:f=>f[0]==="["&&!Ke(f,"]("),o:ht(Jv),u:0,i:(f,p,y)=>({children:p(f[1],y),fallbackChildren:f[0],ref:f[2]})},25:{t:["|"],o:it(Ra),u:1,i:b1},27:{o:xt(function(f,p){let y;return rs(f,":")&&(y=r1.exec(f)),y||o1.exec(f)}),u:4,i(f){const p=f[0];return{text:Ke(p,"&")?p.replace(Bv,(y,x)=>e.namedCodesToUnicode[x]||y):p}}},34:{t:["*","_","~","="],o:xt(wv),u:2,i:(f,p,y)=>({children:p(f[2],y),tag:f[1]})},28:{t:["\\"],o:br(i1),u:1,i:f=>({text:f[1],type:"27"})}};e.disableParsingRawHTML===!0&&(delete d[11],delete d[13]);const h=(function(f){var p=Object.keys(f);function y(x,S){var E=[];if(S.prevCapture=S.prevCapture||"",x.trim())for(;x;)for(var j=0;j<p.length;){var b=p[j],v=f[b];if(!v.t||g1(x,S,v.t)){var w=v.o(x,S);if(w&&w[0]){x=x.substring(w[0].length);var O=v.i(w,y,S);S.prevCapture+=w[0],O.type||(O.type=b),E.push(O);break}j++}else j++}return S.prevCapture="",E}return p.sort(function(x,S){return f[x].u-f[S].u||(x<S?-1:1)}),function(x,S){return y((function(E){return E.replace($v,`
25
- `).replace(kv,"").replace(Xv," ")})(x),S)}})(d),g=(function(f,p,y,x,S){function E(j){return Array.isArray(j)?j.map(b=>"text"in b?b.text:""):"text"in j?j.text:""}return function j(b,v={}){const w=(v.renderDepth||0)+1;if(w>2500)return E(b);v.renderDepth=w;try{if(Array.isArray(b)){const C=v.key,A=[];let _=!1;for(let I=0;I<b.length;I++){v.key=I;const T=j(b[I],v),P=Ma(T);P&&_?A[A.length-1]+=T:T!==null&&A.push(T),_=P}return v.key=C,v.renderDepth=w-1,A}const O=(function(C,A,_){const I=()=>(function(T,P,F,$,k,M,U){switch(T.type){case"0":{const J={key:F.key};return T.alert&&(J.className="markdown-alert-"+M(T.alert.toLowerCase(),Pn),T.children.unshift({attrs:{},children:[{type:"27",text:T.alert}],noInnerParse:!0,type:"11",tag:"header"})),$("blockquote",J,P(T.children,F))}case"1":return $("br",{key:F.key});case"2":return $("hr",{key:F.key});case"3":return $("pre",{key:F.key},$("code",Je({},T.attrs,{className:T.lang?"lang-"+T.lang:""}),T.text));case"5":return $("code",{key:F.key},T.text);case"7":return $("a",{key:F.key,href:k(T.target,"a","href")},$("sup",{key:F.key},T.text));case"8":return $("input",{checked:T.completed,key:F.key,readOnly:!0,type:"checkbox"});case"9":return $("h"+T.level,{id:T.id,key:F.key},P(T.children,F));case"11":return $(T.tag,Je({key:F.key},T.attrs),T.text||(T.children?P(T.children,F):""));case"13":return $(T.tag,Je({},T.attrs,{key:F.key}));case"14":return $("img",{key:F.key,alt:T.alt||void 0,title:T.title||void 0,src:k(T.target,"img","src")});case"15":return $("a",{key:F.key,href:k(T.target,"a","href"),title:T.title},P(T.children,F));case"23":return U[T.ref]?$("img",{key:F.key,alt:T.alt,src:k(U[T.ref].target,"img","src"),title:U[T.ref].title}):null;case"24":return U[T.ref]?$("a",{key:F.key,href:k(U[T.ref].target,"a","href"),title:U[T.ref].title},P(T.children,F)):$("span",{key:F.key},T.fallbackChildren);case"25":{const J=T;return $("table",{key:F.key},$("thead",null,$("tr",null,J.header.map(function(ae,fe){return $("th",{key:fe,style:La(J,fe)},P(ae,F))}))),$("tbody",null,J.cells.map(function(ae,fe){return $("tr",{key:fe},ae.map(function(ye,L){return $("td",{key:L,style:La(J,L)},P(ye,F))}))})))}case"27":return T.text;case"34":return $(T.tag,{key:F.key},P(T.children,F));case"20":case"30":return $(T.ordered?"ol":"ul",{key:F.key,start:T.type==="20"?T.start:void 0},T.items.map(function(J,ae){return $("li",{key:ae},P(J,F))}));case"19":return`
26
- `;case"21":return $("p",{key:F.key},P(T.children,F));default:return null}})(C,A,_,p,y,x,S);return f?f(I,C,A,_):I()})(b,j,v);return v.renderDepth=w-1,O}catch(O){if(O instanceof RangeError&&O.message.includes("Maximum call stack"))return E(b);throw O}}})(e.renderRule,a,r,n,c);return l(t)}const mr=t=>{let{children:e,options:n}=t,r=(function(i,s){if(i==null)return{};var o={};for(var a in i)if({}.hasOwnProperty.call(i,a)){if(s.indexOf(a)!==-1)continue;o[a]=i[a]}return o})(t,jv);return E1(e??"",Je({},n,{wrapperProps:Je({},n?.wrapperProps,r)}))},Jc=Symbol("remove-this-key"),qa=Symbol("reset");function A1(t,e){return Array.isArray(t.required)&&t.required.indexOf(e)!==-1}function C1(t,e){switch(e){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return t(G.NewStringDefault)}}function _1(t){const{fieldPathId:e,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:o,onChange:a,onBlur:l,onFocus:u,disabled:c,readonly:d,required:h,hideError:g,propertyName:f,handleKeyRename:p,handleRemoveProperty:y,addedByAdditionalProperties:x}=t,[S,E]=N.useState(!1),{globalFormOptions:j,fields:b}=r,{SchemaField:v}=b,w=Kt(Be(f,j,e.path)),O=N.useCallback((I,T,P,F)=>{I===void 0&&x&&(I=""),a(I,T,P,F)},[a,x]),C=N.useCallback(I=>{f!==I&&E(!0),p(f,I)},[f,p]),A=N.useCallback(I=>{const{target:{value:T}}=I;C(T)},[C]),_=N.useCallback(()=>{y(f)},[f,y]);return m.jsx(v,{name:f,required:h,schema:n,uiSchema:i,errorSchema:s,fieldPathId:w,formData:o,wasPropertyKeyModified:S,onKeyRename:C,onKeyRenameBlur:A,onRemoveProperty:_,onChange:O,onBlur:l,onFocus:u,registry:r,disabled:c,readonly:d,hideError:g})}function I1(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,required:a=!1,disabled:l,readonly:u,hideError:c,onBlur:d,onFocus:h,onChange:g,registry:f,title:p}=t,{fields:y,schemaUtils:x,translateString:S,globalUiOptions:E}=f,{OptionalDataControlsField:j}=y,b=N.useRef(r);b.current=r;const v=x.retrieveSchema(e,r,!0),w=B(n,E),{properties:O={}}=v,C=t.childFieldPathId??s,A=N.useRef({previousKey:"",currentKey:void 0}),_=w.title??v.title??p??o,I=w.description??v.description,T=fr(f,v,a,n),P=Sn(r);let F=[];const $=N.useCallback((L,le)=>{const{duplicateKeySuffixSeparator:te="-"}=B(n,E);let H=0,K=L;for(;X(le,K);)K=`${L}${te}${++H}`;return K},[n,E]),k=N.useCallback(()=>{if(!(v.additionalProperties||v.patternProperties))return;const{translateString:L}=f,le={...r},te=$("newKey",le);if(v.patternProperties)ce(le,te,null);else{let H,K,z;if(ne(v.additionalProperties)){H=v.additionalProperties.type,K=v.additionalProperties.const,z=v.additionalProperties.default;let oe=v.additionalProperties;if(ue in oe){const{schemaUtils:Oe}=f;oe=Oe.retrieveSchema({[ue]:oe[ue]},r),H=oe.type,K=oe.const,z=oe.default}!H&&(ee in oe||W in oe)&&(H="object")}const re=K??z??C1(L,H);ce(le,te,re)}A.current.previousKey===te&&(A.current.currentKey=te,A.current.previousKey=$(te,le)),g(le,C.path)},[r,g,f,C,$,v]),M=N.useCallback((L,le)=>{if(L!==le){const te=b.current,H=$(le,te),K={...te},z={[L]:H},re=Object.keys(K).map(Oe=>({[z[Oe]||Oe]:K[Oe]})),oe=Object.assign({},...re);b.current=oe,L!==A.current.currentKey&&(A.current.previousKey=L),A.current.currentKey=H,g(oe,C.path)}},[g,C,$]),U=N.useCallback(L=>{g(Jc,[...C.path,L])},[g,C]),J=N.useCallback(L=>A.current.currentKey===L?A.current.previousKey:L,[]);if(!T||P)try{const L=Object.keys(O);F=wx(L,w.order)}catch(L){return m.jsxs("div",{children:[m.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:m.jsx(mr,{options:{disableParsingRawHTML:!0},children:S(G.InvalidObjectField,[o||"root",L.message])})}),m.jsx("pre",{children:JSON.stringify(v)})]})}const ae=V("ObjectFieldTemplate",f,w),fe=T?m.jsx(j,{...t,fieldPathId:C,schema:v}):void 0,ye={title:w.label===!1?"":_,description:w.label===!1?void 0:I,properties:F.map(L=>{const le=X(v,[se,L,ot]),te=le?n.additionalProperties:n[L],H=B(te).widget==="hidden";return{content:m.jsx(_1,{propertyName:L,required:A1(v,L),schema:D(v,[se,L],{}),uiSchema:te,errorSchema:D(i,[L]),fieldPathId:C,formData:D(r,[L]),handleKeyRename:M,handleRemoveProperty:U,addedByAdditionalProperties:le,onChange:g,onBlur:d,onFocus:h,registry:f,disabled:l,readonly:u,hideError:c},J(L)),name:L,readonly:u,disabled:l,required:a,hidden:H}}),readonly:u,disabled:l,required:a,fieldPathId:s,uiSchema:n,errorSchema:i,schema:v,formData:r,registry:f,optionalDataControl:fe,className:T?"rjsf-optional-object-field":void 0};return m.jsx(ae,{...ye,onAddProperty:k})}function T1(t){const{schema:e,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:o,errorSchema:a,fieldPathId:l,registry:u}=t,{globalUiOptions:c={},schemaUtils:d,translateString:h}=u,g=B(n,c),f=V("OptionalDataControlsTemplate",u,g),p=Sn(r);let y,x,S,E;if(i||s)y=ji(l,"Msg"),x=p?void 0:h(G.OptionalObjectEmptyMsg);else{const j=p?G.OptionalObjectRemove:G.OptionalObjectAdd;x=h(j),p?(y=ji(l,"Remove"),E=()=>o(void 0,l.path,a)):(y=ji(l,"Add"),S=()=>{let b=d.getDefaultFormState(e,r,"excludeObjectChildren");b===void 0&&(b=Le(e)==="array"?[]:{}),o(b,l.path,a)})}return x&&m.jsx(f,{id:y,registry:u,schema:e,uiSchema:n,label:x,onAddClick:S,onRemoveClick:E})}const N1={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function P1(t,e,n){const r=e.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=Le(t),o=Array.isArray(s)?s[0]:s||"",a=t.$id;let l=N1[o];return a&&a in i&&(l=a),!l&&(t.anyOf||t.oneOf)?()=>null:l in i?i[l]:i.FallbackField}function F1(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:o,onChange:a,onKeyRename:l,onKeyRenameBlur:u,onRemoveProperty:c,required:d=!1,registry:h,wasPropertyKeyModified:g=!1}=t,{schemaUtils:f,globalFormOptions:p,globalUiOptions:y,fields:x}=h,{AnyOfField:S,OneOfField:E}=x,j=jx(e,r,h),b=B(j,y),v=V("FieldTemplate",h,b),w=V("DescriptionFieldTemplate",h,b),O=V("FieldHelpTemplate",h,b),C=V("FieldErrorTemplate",h,b),A=f.retrieveSchema(e,i),_=n[de],I=N.useCallback((On,En,It,Cu)=>a(On,En,It,Cu||_),[_,a]),T=P1(A,b,h),P=!!(b.disabled??t.disabled),F=!!(b.readonly??(t.readonly||t.schema.readOnly||A.readOnly)),$=b.hideError,k=$===void 0?t.hideError:!!$,M=!!(b.autofocus??t.autofocus);if(Object.keys(A).length===0)return null;let U=f.getDisplayLabel(A,j,y);const J=b.field&&b.fieldReplacesAnyOrOneOf===!0;let ae,fe,ye={fieldPathId:n};if((ee in A||W in A)&&!J&&!f.isSelect(A)){A[ee]?(ae=S,fe=A[ee].map(It=>f.retrieveSchema(ne(It)?It:{},i))):A[W]&&(ae=E,fe=A[W].map(It=>f.retrieveSchema(ne(It)?It:{},i)));const On=fr(h,A,d,j),En=Sn(i);U=U&&(!On||En),ye={childFieldPathId:n,fieldPathId:Be("XxxOf",p,n)}}const{__errors:L,...le}=s||{},te=un(j,["ui:classNames","classNames","ui:style"]);vt in te&&(te[vt]=un(te[vt],["classNames","style"]));const H=m.jsx(T,{...t,onChange:I,...ye,schema:A,uiSchema:te,disabled:P,readonly:F,hideError:k,autofocus:M,errorSchema:le,rawErrors:L}),K=n[de];let z;g?z=o:z=ot in A?o:b.title||t.schema.title||A.title||t.title||o;const re=b.description||t.schema.description||A.description||"",oe=b.help,Oe=b.widget==="hidden",Ee=["rjsf-field",`rjsf-field-${Le(A)}`];!k&&L&&L.length>0&&Ee.push("rjsf-field-error"),b.classNames&&Ee.push(b.classNames);const xe=m.jsx(O,{help:oe,fieldPathId:n,schema:A,uiSchema:j,hasErrors:!k&&L&&L.length>0,registry:h}),$e=k||ae&&!f.isSelect(A)?void 0:m.jsx(C,{errors:L,errorSchema:s,fieldPathId:n,schema:A,uiSchema:j,registry:h}),mt={description:m.jsx(w,{id:Ht(K),description:re,schema:A,uiSchema:j,registry:h}),rawDescription:re,help:xe,rawHelp:typeof oe=="string"?oe:void 0,errors:$e,rawErrors:k?void 0:L,fieldPathId:n,id:K,label:z,hidden:Oe,onChange:a,onKeyRename:l,onKeyRenameBlur:u,onRemoveProperty:c,required:d,disabled:P,readonly:F,hideError:k,displayLabel:U,classNames:Ee.join(" ").trim(),style:b.style,formData:i,schema:A,uiSchema:j,registry:h};return m.jsx(v,{...mt,children:m.jsxs(m.Fragment,{children:[H,ae&&m.jsx(ae,{name:o,disabled:P,readonly:F,hideError:k,errorSchema:s,formData:i,fieldPathId:n,onBlur:t.onBlur,onChange:t.onChange,onFocus:t.onFocus,options:fe,registry:h,required:d,schema:A,uiSchema:j})]})})}class $1 extends N.Component{shouldComponentUpdate(e){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return $c(this,e,this.state,r)}render(){return m.jsx(F1,{...this.props})}}function D1(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,required:o,disabled:a=!1,readonly:l=!1,autofocus:u=!1,onChange:c,onBlur:d,onFocus:h,registry:g,rawErrors:f,hideError:p,title:y}=t,{title:x,format:S}=e,{widgets:E,schemaUtils:j,globalUiOptions:b}=g,v=j.isSelect(e)?mn(e,r):void 0;let w=v?"select":"text";S&&xx(e,S,E)&&(w=S);const{widget:O=w,placeholder:C="",title:A,..._}=B(r),I=j.getDisplayLabel(e,r,b),T=A??y??x??n,P=tt(e,O,E),F=N.useCallback(($,k,M)=>c($,i.path,k,M),[c,i]);return m.jsx(P,{options:{..._,enumOptions:v},schema:e,uiSchema:r,id:i.$id,name:n,label:T,hideLabel:!I,hideError:p,value:s,onChange:F,onBlur:d,onFocus:h,required:o,disabled:a,readonly:l,autofocus:u,registry:g,placeholder:C,rawErrors:f,htmlName:i.name})}function R1(t){const{formData:e,onChange:n,fieldPathId:r}=t;return N.useEffect(()=>{e===void 0&&n(null,r.path)},[r,e,n]),null}function k1(){return{AnyOfField:Ea,ArrayField:Wx,BooleanField:Hx,FallbackField:Jx,LayoutGridField:Gs,LayoutHeaderField:gv,LayoutMultiSchemaField:yv,NumberField:vv,ObjectField:I1,OneOfField:Ea,OptionalDataControlsField:T1,SchemaField:$1,StringField:D1,NullField:R1}}function M1(t){const{fieldPathId:e,description:n,registry:r,schema:i,uiSchema:s}=t,o=B(s,r.globalUiOptions),{label:a=!0}=o;if(!n||!a)return null;const l=V("DescriptionFieldTemplate",r,o);return m.jsx(l,{id:Ht(e),description:n,schema:i,uiSchema:s,registry:r})}function U1(t){const{children:e,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:o,registry:a,uiSchema:l}=t,u=B(l),c=V("ArrayFieldItemButtonsTemplate",a,u),d={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},h=s?31:9,g={display:"flex",alignItems:i?"center":"baseline"},f={display:"flex",justifyContent:"flex-end",marginTop:i?`${h}px`:0};return m.jsxs("div",{className:n,style:g,children:[m.jsx("div",{className:o?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:e}),o&&m.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:m.jsx("div",{className:"btn-group",style:f,children:m.jsx(c,{...r,style:d})})})]})}function L1(t){const{disabled:e,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:o,onCopyItem:a,onRemoveItem:l,onMoveDownItem:u,onMoveUpItem:c,readonly:d,registry:h,uiSchema:g}=t,{CopyButton:f,MoveDownButton:p,MoveUpButton:y,RemoveButton:x}=h.templates.ButtonTemplates;return m.jsxs(m.Fragment,{children:[(i||r)&&m.jsx(y,{id:Qe(o,"moveUp"),className:"rjsf-array-item-move-up",disabled:e||d||!i,onClick:c,uiSchema:g,registry:h}),(i||r)&&m.jsx(p,{id:Qe(o,"moveDown"),className:"rjsf-array-item-move-down",disabled:e||d||!r,onClick:u,uiSchema:g,registry:h}),n&&m.jsx(f,{id:Qe(o,"copy"),className:"rjsf-array-item-copy",disabled:e||d,onClick:a,uiSchema:g,registry:h}),s&&m.jsx(x,{id:Qe(o,"remove"),className:"rjsf-array-item-remove",disabled:e||d,onClick:l,uiSchema:g,registry:h})]})}function B1(t){const{canAdd:e,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:o,optionalDataControl:a,onAddClick:l,readonly:u,registry:c,required:d,schema:h,title:g}=t,f=B(s),p=V("ArrayFieldDescriptionTemplate",c,f),y=V("ArrayFieldTitleTemplate",c,f),x=!u&&!r,{ButtonTemplates:{AddButton:S}}=c.templates;return m.jsxs("fieldset",{className:n,id:i.$id,children:[m.jsx(y,{fieldPathId:i,title:f.title||g,required:d,schema:h,uiSchema:s,registry:c,optionalDataControl:x?a:void 0}),m.jsx(p,{fieldPathId:i,description:f.description||h.description,schema:h,uiSchema:s,registry:c}),x?void 0:a,m.jsx("div",{className:"row array-item-list",children:o}),e&&m.jsx(S,{id:Qe(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:r||u,uiSchema:s,registry:c})]})}function V1(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,optionalDataControl:a}=t,l=B(i,o.globalUiOptions),{label:u=!0}=l;if(!n||!u)return null;const c=V("TitleFieldTemplate",o,l);return m.jsx(c,{id:ei(e),title:n,required:s,schema:r,uiSchema:i,registry:o,optionalDataControl:a})}function Zc(t){const{id:e,schema:n}=t,{examples:r,default:i}=n;return Array.isArray(r)?m.jsx("datalist",{id:Qr(e),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(s=>m.jsx("option",{value:s},String(s)))},`datalist_${e}`):null}function q1(t){const{id:e,name:n,htmlName:r,value:i,readonly:s,disabled:o,autofocus:a,onBlur:l,onFocus:u,onChange:c,onChangeOverride:d,options:h,schema:g,uiSchema:f,registry:p,rawErrors:y,type:x,hideLabel:S,hideError:E,...j}=t,{ClearButton:b}=p.templates.ButtonTemplates;if(!e)throw console.log("No id for",t),new Error(`no id for props ${JSON.stringify(t)}`);const v={...j,...Tc(g,x,h)};let w;v.type==="number"||v.type==="integer"?w=i||i===0?i:"":w=i??"";const O=N.useCallback(({target:{value:I}})=>c(I===""?h.emptyValue:I),[c,h]),C=N.useCallback(({target:I})=>l(e,I&&I.value),[l,e]),A=N.useCallback(({target:I})=>u(e,I&&I.value),[u,e]),_=N.useCallback(I=>{I.preventDefault(),I.stopPropagation(),c(h.emptyValue??"")},[c,h.emptyValue]);return m.jsxs(m.Fragment,{children:[m.jsx("input",{id:e,name:r||e,className:"form-control",readOnly:s,disabled:o,autoFocus:a,value:w,...v,list:g.examples?Qr(e):void 0,onChange:d||O,onBlur:C,onFocus:A,"aria-describedby":Fe(e,!!g.examples)}),h.allowClearTextInputs&&!s&&!o&&w&&m.jsx(b,{registry:p,onClick:_}),m.jsx(Zc,{id:e,schema:g})]})}function z1({uiSchema:t}){const{submitText:e,norender:n,props:r={}}=Nc(t);return n?null:m.jsx("div",{children:m.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:e})})}function _t(t){const{iconType:e="default",icon:n,className:r,uiSchema:i,registry:s,...o}=t;return m.jsx("button",{type:"button",className:`btn btn-${e} ${r}`,...o,children:m.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function W1(t){const{registry:{translateString:e}}=t;return m.jsx(_t,{title:e(G.CopyButton),...t,icon:"copy"})}function H1(t){const{registry:{translateString:e}}=t;return m.jsx(_t,{title:e(G.MoveDownButton),...t,icon:"arrow-down"})}function K1(t){const{registry:{translateString:e}}=t;return m.jsx(_t,{title:e(G.MoveUpButton),...t,icon:"arrow-up"})}function G1(t){const{registry:{translateString:e}}=t;return m.jsx(_t,{title:e(G.RemoveButton),...t,iconType:"danger",icon:"remove"})}function Y1({id:t,className:e,onClick:n,disabled:r,registry:i,...s}){const{translateString:o}=i;return m.jsx(_t,{id:t,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:o(G.ClearButton),onClick:n,disabled:r,registry:i,...s})}function J1({id:t,className:e,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return m.jsx("div",{className:"row",children:m.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${e}`,children:m.jsx(_t,{id:t,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(G.AddButton),onClick:n,disabled:r,registry:i})})})}function Z1(){return{SubmitButton:z1,AddButton:J1,CopyButton:W1,MoveDownButton:H1,MoveUpButton:K1,RemoveButton:G1,ClearButton:Y1}}const Xc=Vs();function Xs({description:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return B(n,r).enableMarkdownInDescription&&typeof t=="string"?m.jsx(mr,{options:{disableParsingRawHTML:!0},"data-testid":Xc.markdown,children:t}):t}Xs.TEST_IDS=Xc;function X1(t){const{id:e,description:n,registry:r,uiSchema:i}=t;return n?m.jsx("div",{id:e,className:"field-description",children:m.jsx(Xs,{description:n,registry:r,uiSchema:i})}):null}function Q1({errors:t,registry:e}){const{translateString:n}=e;return m.jsxs("div",{className:"panel panel-danger errors",children:[m.jsx("div",{className:"panel-heading",children:m.jsx("h3",{className:"panel-title",children:n(G.ErrorsLabel)})}),m.jsx("ul",{className:"list-group",children:t.map((r,i)=>m.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function eS(t){const{schema:e,registry:n,typeSelector:r,schemaField:i}=t,s=V("MultiSchemaFieldTemplate",n);return m.jsx(s,{selector:r,optionSchemaField:i,schema:e,registry:n})}const tS="*";function Qc(t){const{label:e,required:n,id:r}=t;return e?m.jsxs("label",{className:"control-label",htmlFor:r,children:[e,n&&m.jsx("span",{className:"required",children:tS})]}):null}function nS(t){const{id:e,label:n,children:r,errors:i,help:s,description:o,hidden:a,required:l,displayLabel:u,registry:c,uiSchema:d}=t,h=B(d),g=V("WrapIfAdditionalTemplate",c,h);if(a)return m.jsx("div",{className:"hidden",children:r});const f=h.widget==="checkbox";return m.jsxs(g,{...t,children:[u&&!f&&m.jsx(Qc,{label:n,required:l,id:e}),u&&o?o:null,r,i,s]})}function rS(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=qs(n);return m.jsx("div",{children:m.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:e.filter(i=>!!i).map((i,s)=>m.jsx("li",{className:"text-danger",children:i},s))})})}const eu=Vs();function Qs({help:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return B(n,r).enableMarkdownInHelp&&typeof t=="string"?m.jsx(mr,{options:{disableParsingRawHTML:!0},"data-testid":eu.markdown,children:t}):t}Qs.TEST_IDS=eu;function iS(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i}=t;return n?m.jsx("div",{id:zs(e),className:"help-block",children:m.jsx(Qs,{help:n,registry:i,uiSchema:r})}):null}function sS(t){const{children:e,column:n,className:r,...i}=t;return m.jsx("div",{className:r,...i,children:e})}function oS(t){const{selector:e,optionSchemaField:n}=t;return m.jsxs("div",{className:"panel panel-default panel-body",children:[m.jsx("div",{className:"form-group",children:e}),n]})}function aS(t){const{className:e,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:o,optionalDataControl:a,properties:l,readonly:u,registry:c,required:d,schema:h,title:g,uiSchema:f}=t,p=B(f),y=V("TitleFieldTemplate",c,p),x=V("DescriptionFieldTemplate",c,p);if((h.oneOf||h.anyOf)&&!h.properties&&l.length===0)return null;const E=!u&&!r,{ButtonTemplates:{AddButton:j}}=c.templates;return m.jsxs("fieldset",{className:e,id:s.$id,children:[g&&m.jsx(y,{id:ei(s),title:g,required:d,schema:h,uiSchema:f,registry:c,optionalDataControl:E?a:void 0}),n&&m.jsx(x,{id:Ht(s),description:n,schema:h,uiSchema:f,registry:c}),E?void 0:a,l.map(b=>b.content),ul(h,f,i)&&m.jsx(j,{id:Qe(s,"add"),className:"rjsf-object-property-expand",onClick:o,disabled:r||u,uiSchema:f,registry:c})]})}function lS(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?m.jsx(_t,{id:e,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?m.jsx(_t,{id:e,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):m.jsx("em",{id:e,children:r})}const cS="*";function uS(t){const{id:e,title:n,required:r,optionalDataControl:i}=t;return m.jsxs("legend",{id:e,children:[n,r&&m.jsx("span",{className:"required",children:cS}),i&&m.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function dS(t){const{schema:e,fieldPathId:n,reason:r,registry:i}=t,{translateString:s}=i;let o=G.UnsupportedField;const a=[];return n&&n.$id&&(o=G.UnsupportedFieldWithId,a.push(n.$id)),r&&(o=o===G.UnsupportedField?G.UnsupportedFieldWithReason:G.UnsupportedFieldWithIdAndReason,a.push(r)),m.jsxs("div",{className:"unsupported-field",children:[m.jsx("p",{children:m.jsx(mr,{options:{disableParsingRawHTML:!0},children:s(o,a)})}),e&&m.jsx("pre",{children:JSON.stringify(e,null,2)})]})}function fS(t){const{id:e,classNames:n,style:r,disabled:i,displayLabel:s,label:o,onKeyRenameBlur:a,onRemoveProperty:l,rawDescription:u,readonly:c,required:d,schema:h,hideError:g,rawErrors:f,children:p,uiSchema:y,registry:x}=t,{templates:S,translateString:E}=x,{RemoveButton:j}=S.ButtonTemplates,b=E(G.KeyLabel,[o]),v=ot in h,w=!!u,O=["form-group",n];!g&&f&&f.length>0&&O.push("has-error has-danger");const C=O.join(" ").trim();if(!v)return m.jsx("div",{className:C,style:r,children:p});const A=w?46:26;return m.jsx("div",{className:C,style:r,children:m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-xs-5 form-additional",children:m.jsxs("div",{className:"form-group",children:[s&&m.jsx(Qc,{label:b,required:d,id:`${e}-key`}),s&&u&&m.jsx("div",{children:" "}),m.jsx("input",{className:"form-control",type:"text",id:`${e}-key`,onBlur:a,defaultValue:o},o)]})}),m.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),m.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${A}px`:void 0},children:m.jsx(j,{id:Qe(e,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||c,onClick:l,uiSchema:y,registry:x})})]})})}function mS(){return{ArrayFieldDescriptionTemplate:M1,ArrayFieldItemTemplate:U1,ArrayFieldItemButtonsTemplate:L1,ArrayFieldTemplate:B1,ArrayFieldTitleTemplate:V1,ButtonTemplates:Z1(),BaseInputTemplate:q1,DescriptionFieldTemplate:X1,ErrorListTemplate:Q1,FallbackFieldTemplate:eS,FieldTemplate:nS,FieldErrorTemplate:rS,FieldHelpTemplate:iS,GridTemplate:sS,MultiSchemaFieldTemplate:oS,ObjectFieldTemplate:aS,OptionalDataControlsTemplate:lS,TitleFieldTemplate:uS,UnsupportedFieldTemplate:dS,WrapIfAdditionalTemplate:fS}}function hS(t){const{disabled:e=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:o,registry:a,onBlur:l,onFocus:u}=t,{translateString:c}=a,{elements:d,handleChange:h,handleClear:g,handleSetNow:f}=Cx(t);return m.jsxs("ul",{className:"list-inline",children:[d.map((p,y)=>m.jsx("li",{className:"list-inline-item",children:m.jsx(Ax,{rootId:s,name:o,select:h,...p,disabled:e,readonly:n,registry:a,onBlur:l,onFocus:u,autofocus:r&&y===0})},y)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&m.jsx("li",{className:"list-inline-item",children:m.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:f,children:c(G.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&m.jsx("li",{className:"list-inline-item",children:m.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:g,children:c(G.ClearLabel)})})]})}function pS({time:t=!0,...e}){const{AltDateWidget:n}=e.registry.widgets;return m.jsx(n,{time:t,...e})}function gS({schema:t,uiSchema:e,options:n,id:r,value:i,disabled:s,readonly:o,label:a,hideLabel:l,autofocus:u=!1,onBlur:c,onFocus:d,onChange:h,registry:g,htmlName:f}){const p=V("DescriptionFieldTemplate",g,n),y=Wn(t),x=N.useCallback(w=>h(w.target.checked),[h]),S=N.useCallback(w=>c(r,w.target.checked),[c,r]),E=N.useCallback(w=>d(r,w.target.checked),[d,r]),v=B(e).widget==="checkbox"?void 0:n.description??t.description;return m.jsxs("div",{className:`checkbox ${s||o?"disabled":""}`,children:[!l&&v&&m.jsx(p,{id:Ht(r),description:v,schema:t,uiSchema:e,registry:g}),m.jsxs("label",{children:[m.jsx("input",{type:"checkbox",id:r,name:f||r,checked:typeof i>"u"?!1:i,required:y,disabled:s||o,autoFocus:u,onChange:x,onBlur:S,onFocus:E,"aria-describedby":Fe(r)}),Fc(m.jsx("span",{children:a}),l)]})]})}function yS({id:t,disabled:e,options:n,value:r,autofocus:i=!1,readonly:s,onChange:o,onBlur:a,onFocus:l,htmlName:u}){const{inline:c=!1,enumOptions:d,enumDisabled:h,emptyValue:g}=n,f=vn(n),p=Array.isArray(r)?r:[r],y=N.useCallback(({target:S})=>a(t,Te(S&&S.value,d,f,g)),[a,t,d,g,f]),x=N.useCallback(({target:S})=>l(t,Te(S&&S.value,d,f,g)),[l,t,d,g,f]);return m.jsx("div",{className:"checkboxes",id:t,children:Array.isArray(d)&&d.map((S,E)=>{const j=ur(S.value,p),b=Array.isArray(h)&&h.indexOf(S.value)!==-1,v=e||b||s?"disabled":"",w=C=>{C.target.checked?o(Cc(E,p,d)):o(Ec(E,p,d))},O=m.jsxs("span",{children:[m.jsx("input",{type:"checkbox",id:Ft(t,E),name:u||t,checked:j,value:dr(S.value,E,f),disabled:e||b||s,autoFocus:i&&E===0,onChange:w,onBlur:y,onFocus:x,"aria-describedby":Fe(t)}),m.jsx("span",{children:S.label})]});return c?m.jsx("label",{className:`checkbox-inline ${v}`,children:O},E):m.jsx("div",{className:`checkbox ${v}`,children:m.jsx("label",{children:O})},E)})})}function bS(t){const{disabled:e,readonly:n,options:r,registry:i}=t,s=V("BaseInputTemplate",i,r);return m.jsx(s,{type:"color",...t,disabled:e||n})}function xS(t){const{onChange:e,options:n,registry:r}=t,i=V("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o||void 0),[e]);return m.jsx(i,{type:"date",...t,onChange:s})}function vS(t){const{onChange:e,value:n,options:r,registry:i}=t,s=V("BaseInputTemplate",i,r);return m.jsx(s,{type:"datetime-local",...t,value:Px(n),onChange:o=>e(Sx(o))})}function SS(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{type:"email",...t})}function wS({fileInfo:t,registry:e}){const{translateString:n}=e,{dataURL:r,type:i,name:s}=t;return r?["image/jpeg","image/png"].includes(i)?m.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):m.jsxs(m.Fragment,{children:[" ",m.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(G.PreviewLabel)})]}):null}function jS({filesInfo:t,registry:e,preview:n,onRemove:r,options:i}){if(t.length===0)return null;const{translateString:s}=e,{RemoveButton:o}=V("ButtonTemplates",e,i);return m.jsx("ul",{className:"file-info",children:t.map((a,l)=>{const{name:u,size:c,type:d}=a,h=()=>r(l);return m.jsxs("li",{children:[m.jsx(mr,{children:s(G.FilesInfo,[u,d,String(c)])}),n&&m.jsx(wS,{fileInfo:a,registry:e}),m.jsx(o,{onClick:h,registry:e})]},l)})})}function OS(t){const{disabled:e,readonly:n,required:r,multiple:i,onChange:s,value:o,options:a,registry:l}=t,{filesInfo:u,handleChange:c,handleRemove:d}=Nx(o,s,i),h=V("BaseInputTemplate",l,a),g=f=>{f.target.files&&c(f.target.files)};return m.jsxs("div",{children:[m.jsx(h,{...t,disabled:e||n,type:"file",required:o?!1:r,onChangeOverride:g,value:"",accept:a.accept?String(a.accept):void 0}),m.jsx(jS,{filesInfo:u,onRemove:d,registry:l,preview:a.filePreview,options:a})]})}function ES({id:t,value:e,htmlName:n}){return m.jsx("input",{type:"hidden",id:t,name:n||t,value:typeof e>"u"?"":e})}function AS(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{type:"password",...t})}function CS({options:t,value:e,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:o,onFocus:a,onChange:l,id:u,htmlName:c}){const{enumOptions:d,enumDisabled:h,inline:g,emptyValue:f}=t,p=vn(t),y=N.useCallback(({target:S})=>o(u,Te(S&&S.value,d,p,f)),[o,d,f,u,p]),x=N.useCallback(({target:S})=>a(u,Te(S&&S.value,d,p,f)),[a,d,f,u,p]);return m.jsx("div",{className:"field-radio-group",id:u,role:"radiogroup",children:Array.isArray(d)&&d.map((S,E)=>{const j=ur(S.value,e),b=Array.isArray(h)&&h.indexOf(S.value)!==-1,v=r||b||i?"disabled":"",w=()=>l(S.value),O=m.jsxs("span",{children:[m.jsx("input",{type:"radio",id:Ft(u,E),checked:j,name:c||u,required:n,value:dr(S.value,E,p),disabled:r||b||i,autoFocus:s&&E===0,onChange:w,onBlur:y,onFocus:x,"aria-describedby":Fe(u)}),m.jsx("span",{children:S.label})]});return g?m.jsx("label",{className:`radio-inline ${v}`,children:O},E):m.jsx("div",{className:`radio ${v}`,children:m.jsx("label",{children:O})},E)})})}function _S(t){const{value:e,registry:{templates:{BaseInputTemplate:n}}}=t;return m.jsxs("div",{className:"field-range-wrapper",children:[m.jsx(n,{type:"range",...t}),m.jsx("span",{className:"range-view",children:e})]})}function IS({id:t,value:e,required:n,disabled:r,readonly:i,autofocus:s,onChange:o,onFocus:a,onBlur:l,schema:u,options:c,htmlName:d}){const{stars:h=5,shape:g="star"}=c,f=u.maximum?Math.min(u.maximum,5):Math.min(Math.max(h,1),5),p=u.minimum||0,y=N.useCallback(j=>{!r&&!i&&o(j)},[o,r,i]),x=N.useCallback(j=>{if(a){const b=Number(j.target.dataset.value);a(t,b)}},[a,t]),S=N.useCallback(j=>{if(l){const b=Number(j.target.dataset.value);l(t,b)}},[l,t]),E=j=>g==="heart"?j?"♥":"♡":j?"★":"☆";return m.jsx(m.Fragment,{children:m.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(f)].map((j,b)=>{const v=p+b,w=v<=e;return m.jsx("span",{onClick:()=>y(v),onFocus:x,onBlur:S,"data-value":v,tabIndex:r||i?-1:0,role:"radio","aria-checked":v===e,"aria-label":`${v} ${g==="heart"?"heart":"star"}${v===1?"":"s"}`,style:{color:w?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:E(w)},b)}),m.jsx("input",{type:"hidden",id:t,name:d||t,value:e||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function Ti(t,e){return e?Array.from(t.target.options).slice().filter(n=>n.selected).map(n=>n.value):t.target.value}function TS({schema:t,id:e,options:n,value:r,required:i,disabled:s,readonly:o,multiple:a=!1,autofocus:l=!1,onChange:u,onBlur:c,onFocus:d,placeholder:h,htmlName:g}){const{enumOptions:f,enumDisabled:p,emptyValue:y}=n,x=a?[]:"",S=vn(n),E=N.useCallback(O=>{const C=Ti(O,a);return d(e,Te(C,f,S,y))},[d,e,a,f,y,S]),j=N.useCallback(O=>{const C=Ti(O,a);return c(e,Te(C,f,S,y))},[c,e,a,f,y,S]),b=N.useCallback(O=>{const C=Ti(O,a);return u(Te(C,f,S,y))},[u,a,f,y,S]),v=Ac(r,f,a,S,x),w=!a&&t.default===void 0;return m.jsxs("select",{id:e,name:g||e,multiple:a,role:"combobox",className:"form-control",value:v,required:i,disabled:s||o,autoFocus:l,onBlur:j,onFocus:E,onChange:b,"aria-describedby":Fe(e),children:[w&&m.jsx("option",{value:"",children:h}),Array.isArray(f)&&f.map(({value:O,label:C},A)=>{const _=p&&p.indexOf(O)!==-1;return m.jsx("option",{value:dr(O,A,S),disabled:_,children:C},A)})]})}function NS({id:t,options:e={},placeholder:n,value:r,required:i,disabled:s,readonly:o,autofocus:a=!1,onChange:l,onBlur:u,onFocus:c,htmlName:d}){const h=N.useCallback(({target:{value:p}})=>l(p===""?e.emptyValue:p),[l,e.emptyValue]),g=N.useCallback(({target:p})=>u(t,p&&p.value),[u,t]),f=N.useCallback(({target:p})=>c(t,p&&p.value),[t,c]);return m.jsx("textarea",{id:t,name:d||t,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:o,autoFocus:a,rows:e.rows,onBlur:g,onFocus:f,onChange:h,"aria-describedby":Fe(t)})}function PS(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{...t})}function FS(t){const{onChange:e,options:n,registry:r}=t,i=V("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o?`${o}:00`:void 0),[e]);return m.jsx(i,{type:"time",...t,onChange:s})}function $S(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{type:"url",...t})}function DS(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{type:"number",...t})}function RS(){return{AltDateWidget:hS,AltDateTimeWidget:pS,CheckboxWidget:gS,CheckboxesWidget:yS,ColorWidget:bS,DateWidget:xS,DateTimeWidget:vS,EmailWidget:SS,FileWidget:OS,HiddenWidget:ES,PasswordWidget:AS,RadioWidget:CS,RangeWidget:_S,RatingWidget:IS,SelectWidget:TS,TextWidget:PS,TextareaWidget:NS,TimeWidget:FS,UpDownWidget:DS,URLWidget:$S}}function kS(){return{fields:k1(),templates:mS(),widgets:RS(),rootSchema:{},formContext:{},translateString:ix,globalFormOptions:{idPrefix:al,idSeparator:ll,useFallbackUiForUnsupportedType:!1}}}function Gt(t,e){return{...Ls(t,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...e!==void 0&&{status:e}}}let MS=class extends N.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(e,n){if(e.extraErrors!==n._prevExtraErrors){const r={errors:n.schemaValidationErrors||[],errorSchema:n.schemaValidationErrorSchema||{}};let{errors:i,errorSchema:s}=r;return e.extraErrors&&({errors:i,errorSchema:s}=Mn(r,e.extraErrors)),n.customErrors&&({errors:i,errorSchema:s}=Mn({errors:i,errorSchema:s},n.customErrors.ErrorSchema,!0)),{_prevExtraErrors:e.extraErrors,errors:i,errorSchema:s}}return null}constructor(e){if(super(e),!e.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=e,s=n??r;this.state={...this.getStateFromProps(e,s,void 0,void 0,void 0,!0),_prevExtraErrors:e.extraErrors},i&&!ie(this.state.formData,s)&&i(Gt(this.state)),this.formElement=N.createRef()}getSnapshotBeforeUpdate(e,n){if(!ie(this.props,e)){const r=ha(this.props.formData,e.formData),i=ha(this.props.formData,this.state.formData),s=!ie(e.schema,this.props.schema),o=r.length>0||!ie(e.formData,this.props.formData),a=i.length>0||!ie(this.state.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,s||o?void 0:this.state.retrievedSchema,s,r,!a),u=!ie(l,n);return{nextState:l,shouldUpdate:u}}return{shouldUpdate:!1}}componentDidUpdate(e,n,r){if(r.shouldUpdate){const{nextState:i}=r,s=!ie(i.formData,this.props.formData),o=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,o&&s)return;s&&!ie(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(Gt(i)),this.setState(i)}}getStateFromProps(e,n,r,i=!1,s=[],o=!1){const a=this.state||{},l="schema"in e?e.schema:this.props.schema,u="validator"in e?e.validator:this.props.validator,c=("uiSchema"in e?e.uiSchema:this.props.uiSchema)||{},d=e.formData===void 0&&this.props.formData===void 0,h=typeof n<"u",g="liveValidate"in e?e.liveValidate:this.props.liveValidate,f=h&&!e.noValidate&&g,p="experimental_defaultFormStateBehavior"in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,y="experimental_customMergeAllOf"in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let x=a.schemaUtils;(!x||x.doesSchemaUtilsDiffer(u,l,p,y))&&(x=tx(u,l,p,y));const S=x.getRootSchema();let E=n;n===qa?E=void 0:n===void 0&&d&&(E=a.formData);const j=x.getDefaultFormState(S,E,!1,a.initialDefaultsGenerated),b=this.updateRetrievedSchema(r??x.retrieveSchema(S,j)),v=()=>e.noValidate||i?{errors:[],errorSchema:{}}:e.liveValidate?{errors:a.errors||[],errorSchema:a.errorSchema||{}}:{errors:a.schemaValidationErrors||[],errorSchema:a.schemaValidationErrorSchema||{}};let w,O,C=a.schemaValidationErrors,A=a.schemaValidationErrorSchema;if(f&&!o){const F=this.liveValidate(S,x,a.errorSchema,j,void 0,a.customErrors,r,r!==void 0);w=F.errors,O=F.errorSchema,C=F.schemaValidationErrors,A=F.schemaValidationErrorSchema}else{const F=v();if(w=F.errors,O=F.errorSchema,s.length>0&&!f){const k=s.reduce((M,U)=>(M[U]=void 0,M),{});O=A=Mt(F.errorSchema,k,"preventDuplicates")}const $=this.mergeErrors({errorSchema:O,errors:w},e.extraErrors,a.customErrors);w=$.errors,O=$.errorSchema}const _=this.getRegistry(e,S,x),I=ie(a.registry,_)?a.registry:_,T=a.fieldPathId&&a.fieldPathId?.[de]===I.globalFormOptions.idPrefix?a.fieldPathId:Be("",I.globalFormOptions);return{schemaUtils:x,schema:S,uiSchema:c,fieldPathId:T,formData:j,edit:h,errors:w,errorSchema:O,schemaValidationErrors:C,schemaValidationErrorSchema:A,retrievedSchema:b,initialDefaultsGenerated:!0,registry:I}}shouldComponentUpdate(e,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return $c(this,e,n,r)}validate(e,n=this.state.schema,r,i){const s=r||this.state.schemaUtils,{customValidate:o,transformErrors:a,uiSchema:l}=this.props,u=i??s.retrieveSchema(n,e);return s.getValidator().validateFormData(e,u,o,a,l)}renderErrors(e){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,o=B(s),a=V("ErrorListTemplate",e,o);return n&&n.length?m.jsx(a,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:e}):null}mergeErrors(e,n,r){let i=e.errorSchema,s=e.errors;if(n){const o=Mn(e,n);i=o.errorSchema,s=o.errors}if(r){const o=Mn({errors:s,errorSchema:i},r.ErrorSchema,!0);i=o.errorSchema,s=o.errors}return{errors:s,errorSchema:i}}liveValidate(e,n,r,i,s,o,a,l=!1){const u=this.validate(i,e,n,a),c=u.errors;let d=u.errorSchema;l&&(d=Mt(r,u.errorSchema,"preventDuplicates"));const h=c,g=d;return{...this.mergeErrors({errorSchema:d,errors:c},s,o),schemaValidationErrors:h,schemaValidationErrorSchema:g}}getUsedFormData=(e,n)=>G0(e,n);getFieldNames=(e,n)=>Y0(e,n);omitExtraData=e=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,e)};setFieldValue=(e,n)=>{const{registry:r}=this.state,i=Array.isArray(e)?e:e.split("."),s=Be("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[de])};onChange=(e,n,r,i)=>{this.pendingChanges.push({newValue:e,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:e,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:s,omitExtraData:o,liveOmit:a,noValidate:l,liveValidate:u,onChange:c,removeEmptyOptionalObjects:d}=this.props,{formData:h,schemaUtils:g,schema:f,fieldPathId:p,schemaValidationErrorSchema:y,errors:x}=this.state;let{customErrors:S,errorSchema:E}=this.state;const j=p.path[0]||"",b=!n||n.length===0||n.length===1&&n[0]===j;let v=this.state.retrievedSchema,w=b?e:Bs(h);const O=q(w)&&Object.keys(w).length>0&&Object.values(w).every(P=>P===void 0),C=h==null,A=O&&C?void 0:w;if(q(w)||Array.isArray(w)){e===Jc?Rx(w,n):b||ce(w,n,e);const P=this.getStateFromProps(this.props,A,void 0,void 0,void 0,!0);w=P.formData,v=P.retrievedSchema}const _=!l&&(u===!0||u==="onChange");let I={formData:w,schema:f},T=w;if(o===!0&&(a===!0||a==="onChange")&&(T=this.omitExtraData(w),I={formData:T}),d&&(T=rn(g.getValidator(),f,g.getRootSchema(),T),I={...I,formData:T}),i){const P=b?y:D(y,n);if(!ge(P))b?E=i:ce(E,n,i);else if(S||(S=new _c),b){const F=D(i,Ae);F&&S.setErrors(F)}else ce(S.ErrorSchema,n,i)}else S&&D(S.ErrorSchema,[...n,Ae])&&S.clearErrors(n);if(_&&this.pendingChanges.length===1){const P=this.liveValidate(f,g,E,T,s,S,v);I={formData:T,...P,customErrors:S}}else if(!l&&i){const P=this.mergeErrors({errorSchema:E,errors:x},s,S);I={formData:T,...P,customErrors:S}}this.setState(I,()=>{c&&c(Gt({...this.state,...I}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return ie(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{const{formData:e,initialFormData:n=qa,onChange:r}=this.props,o={formData:this.getStateFromProps(this.props,e??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(o,()=>r&&r(Gt({...this.state,...o})))};onBlur=(e,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:o,removeEmptyOptionalObjects:a}=this.props;if(r&&r(e,n),i===!0&&s==="onBlur"||o==="onBlur"){const{onChange:l,extraErrors:u}=this.props,{formData:c,schemaUtils:d,schema:h}=this.state;let g=c,f={formData:g};if(i===!0&&s==="onBlur"&&(g=this.omitExtraData(c),f={formData:g}),a&&(g=rn(d.getValidator(),h,d.getRootSchema(),g),f={...f,formData:g}),o==="onBlur"){const{schema:y,schemaUtils:x,errorSchema:S,customErrors:E,retrievedSchema:j}=this.state,b=this.liveValidate(y,x,S,g,u,E,j);f={formData:g,...b,customErrors:E}}const p=Object.keys(f).filter(y=>!y.startsWith("schemaValidation")).some(y=>{const x=D(this.state,y),S=D(f,y);return!ie(x,S)});this.setState(f,()=>{l&&p&&l(Gt({...this.state,...f}),e)})}};onFocus=(e,n)=>{const{onFocus:r}=this.props;r&&r(e,n)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();const{omitExtraData:n,extraErrors:r,noValidate:i,onSubmit:s,removeEmptyOptionalObjects:o}=this.props;let{formData:a}=this.state;if(n===!0&&(a=this.omitExtraData(a)),o){const{schemaUtils:l,schema:u}=this.state;a=rn(l.getValidator(),u,l.getRootSchema(),a)}if(i||this.validateFormWithFormData(a)){const l=r||{},u=r?Hs(r):[];this.setState({formData:a,errors:u,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(Gt({...this.state,formData:a},"submitted"),e)})}};getGlobalFormOptions(e){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=ll,idPrefix:s=al,nameGenerator:o,useFallbackUiForUnsupportedType:a=!1}=e;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:a,...r!==void 0&&{experimental_componentUpdateStrategy:r},...o!==void 0&&{nameGenerator:o}}}getRegistry(e,n,r){const{translateString:i,uiSchema:s={}}=e,{fields:o,templates:a,widgets:l,formContext:u,translateString:c}=kS();return{fields:{...o,...e.fields},templates:{...a,...e.templates,ButtonTemplates:{...a.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...l,...e.widgets},rootSchema:n,formContext:e.formContext||u,schemaUtils:r,translateString:i||c,globalUiOptions:s[qi],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:s[um]??{}}}submit=()=>{if(this.formElement.current){const e=new CustomEvent("submit",{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=e,s=Dc(i);s[0]===""?s[0]=n:s.unshift(n);const o=s.join(r);let a=this.formElement.current.elements[o];a||(a=this.formElement.current.querySelector(`input[id^="${o}"], button[id^="${o}"]`)),a&&a.length&&(a=a[0]),a&&a.focus()}validateFormWithFormData=e=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:o}=this.state,a=this.validate(e),{errors:l,errorSchema:u}=n?this.mergeErrors(a,n):a,c=a.errors.length>0||n&&r;return c?(i&&(typeof i=="function"?i(l[0]):this.focusOnError(l[0])),this.setState({errors:l,errorSchema:u,schemaValidationErrors:a.errors,schemaValidationErrorSchema:a.errorSchema},()=>{s?s(l):console.error("Form validation failed",l)})):l.length>0?this.setState({errors:l,errorSchema:u,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!c};validateForm(){const{omitExtraData:e,removeEmptyOptionalObjects:n}=this.props;let{formData:r}=this.state;if(e===!0&&(r=this.omitExtraData(r)),n){const{schemaUtils:i,schema:s}=this.state;r=rn(i.getValidator(),s,i.getRootSchema(),r)}return this.validateFormWithFormData(r)}render(){const{children:e,id:n,className:r="",tagName:i,name:s,method:o,target:a,action:l,autoComplete:u,enctype:c,acceptCharset:d,noHtml5Validate:h=!1,disabled:g,readonly:f,showErrorList:p="top",_internalFormWrapper:y}=this.props,{schema:x,uiSchema:S,formData:E,errorSchema:j,fieldPathId:b,registry:v}=this.state,{SchemaField:w}=v.fields,{SubmitButton:O}=v.templates.ButtonTemplates,C=y?i:void 0,A=y||i||"form";let{[Fr]:_={}}=B(S);g&&(_={..._,props:{..._.props,disabled:!0}});const I={[vt]:{[Fr]:_}};return m.jsxs(A,{className:r||"rjsf",id:n,name:s,method:o,target:a,action:l,autoComplete:u,encType:c,acceptCharset:d,noValidate:h,onSubmit:this.onSubmit,as:C,ref:this.formElement,children:[p==="top"&&this.renderErrors(v),m.jsx(w,{name:"",schema:x,uiSchema:S,errorSchema:j,fieldPathId:b,formData:E,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:v,disabled:g,readonly:f}),e||m.jsx(O,{uiSchema:I,registry:v}),p==="bottom"&&this.renderErrors(v)]})}};function US(t){return N.forwardRef(({fields:e,widgets:n,templates:r,...i},s)=>(e={...t?.fields,...e},n={...t?.widgets,...n},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},m.jsx(MS,{...t,...i,fields:e,widgets:n,templates:r,ref:s})))}function LS(t,e="none"){return e==="all"?t:t.reduce((n,r)=>{const{message:i,schemaPath:s}=r,o=e!=="anyOf"?s?.indexOf(`/${ee}/`):void 0,a=e!=="oneOf"?s?.indexOf(`/${W}/`):void 0;let l;return o&&o>=0?l=s?.substring(0,o):a&&a>=0&&(l=s?.substring(0,a)),l&&n.find(c=>{var d;return c.message===i&&((d=c.schemaPath)===null||d===void 0?void 0:d.startsWith(l))})||n.push(r),n},[])}function BS(t=[],e,n){const r=t.map(i=>{var s;const{instancePath:o,keyword:a,params:l,schemaPath:u,parentSchema:c,...d}=i;let{message:h=""}=d,g=o.replace(/\//g,"."),f=`${g} ${h}`.trim(),p="";const y=[...((s=l.deps)===null||s===void 0?void 0:s.split(", "))||[],l.missingProperty,l.property].filter(x=>x);if(y.length>0)y.forEach(x=>{const S=g?`${g}.${x}`:x;let E=B(D(e,S.replace(/^\./,""))).title;if(E===void 0){const j=u.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([x]);E=B(D(e,j)).title}if(E)h=h.replace(`'${x}'`,`'${E}'`),p=E;else{const j=D(c,[se,x,"title"]);j&&(h=h.replace(`'${x}'`,`'${j}'`),p=j)}}),f=h;else{const x=B(D(e,g.replace(/^\./,""))).title;if(x)f=`'${x}' ${h}`.trim(),p=x;else{const S=c?.title;S&&(f=`'${S}' ${h}`.trim(),p=S)}}return"missingProperty"in l&&(g=g?`${g}.${l.missingProperty}`:l.missingProperty),{name:a,property:g,message:h,params:l,stack:f,schemaPath:u,title:p}});return LS(r,n)}function VS(t,e,n,r,i,s,o,a){const{validationError:l}=e;let u=BS(e.errors,o,a);l&&(u=[...u,{stack:l.message}]),typeof s=="function"&&(u=s(u,o));let c=Ox(u);if(l&&(c={...c,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:u,errorSchema:c};const d=xc(t,r,n,r,!0),h=i(d,zi(d),o,c),g=Rc(h);return Mn({errors:u,errorSchema:c},g)}var xr={exports:{}},Ni={},za;function qS(){return za||(za=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(C,A){return{validate:C,compare:A}}t.fullFormats={date:e(s,o),time:e(l,u),"date-time":e(d,h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:O,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:x,int32:{type:"number",validate:j},int64:{type:"number",validate:b},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function n(C){return C%4===0&&(C%100!==0||C%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(C){const A=r.exec(C);if(!A)return!1;const _=+A[1],I=+A[2],T=+A[3];return I>=1&&I<=12&&T>=1&&T<=(I===2&&n(_)?29:i[I])}function o(C,A){if(C&&A)return C>A?1:C<A?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(C,A){const _=a.exec(C);if(!_)return!1;const I=+_[1],T=+_[2],P=+_[3],F=_[5];return(I<=23&&T<=59&&P<=59||I===23&&T===59&&P===60)&&(!A||F!=="")}function u(C,A){if(!(C&&A))return;const _=a.exec(C),I=a.exec(A);if(_&&I)return C=_[1]+_[2]+_[3]+(_[4]||""),A=I[1]+I[2]+I[3]+(I[4]||""),C>A?1:C<A?-1:0}const c=/t|\s/i;function d(C){const A=C.split(c);return A.length===2&&s(A[0])&&l(A[1],!0)}function h(C,A){if(!(C&&A))return;const[_,I]=C.split(c),[T,P]=A.split(c),F=o(_,T);if(F!==void 0)return F||u(I,P)}const g=/\/|:/,f=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p(C){return g.test(C)&&f.test(C)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function x(C){return y.lastIndex=0,y.test(C)}const S=-2147483648,E=2**31-1;function j(C){return Number.isInteger(C)&&C<=E&&C>=S}function b(C){return Number.isInteger(C)}function v(){return!0}const w=/[^\\]\\Z/;function O(C){if(w.test(C))return!1;try{return new RegExp(C),!0}catch{return!1}}})(Ni)),Ni}var Pi={},Wa;function zS(){return Wa||(Wa=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=Mu(),n=Qa(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:a,schemaCode:l})=>n.str`should be ${i[a].okStr} ${l}`,params:({keyword:a,schemaCode:l})=>n._`{comparison: ${i[a].okStr}, limit: ${l}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:l,data:u,schemaCode:c,keyword:d,it:h}=a,{opts:g,self:f}=h;if(!g.validateFormats)return;const p=new e.KeywordCxt(h,f.RULES.all.format.definition,"format");p.$data?y():x();function y(){const E=l.scopeValue("formats",{ref:f.formats,code:g.code.formats}),j=l.const("fmt",n._`${E}[${p.schemaCode}]`);a.fail$data(n.or(n._`typeof ${j} != "object"`,n._`${j} instanceof RegExp`,n._`typeof ${j}.compare != "function"`,S(j)))}function x(){const E=p.schema,j=f.formats[E];if(!j||j===!0)return;if(typeof j!="object"||j instanceof RegExp||typeof j.compare!="function")throw new Error(`"${d}": format "${E}" does not define "compare" function`);const b=l.scopeValue("formats",{key:E,ref:j,code:g.code.formats?n._`${g.code.formats}${n.getProperty(E)}`:void 0});a.fail$data(S(b))}function S(E){return n._`${E}.compare(${u}, ${c}) ${i[d].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=o})(Pi)),Pi}var Ha;function WS(){return Ha||(Ha=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=qS(),r=zS(),i=Qa(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(u,c={keywords:!0})=>{if(Array.isArray(c))return l(u,c,n.fullFormats,s),u;const[d,h]=c.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,s],g=c.formats||n.formatNames;return l(u,g,d,h),c.keywords&&r.default(u),u};a.get=(u,c="full")=>{const h=(c==="fast"?n.fastFormats:n.fullFormats)[u];if(!h)throw new Error(`Unknown format "${u}"`);return h};function l(u,c,d,h){var g,f;(g=(f=u.opts.code).formats)!==null&&g!==void 0||(f.formats=i._`require("ajv-formats/dist/formats").${h}`);for(const p of c)u.addFormat(p,d[p])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a})(xr,xr.exports)),xr.exports}var HS=WS();const Ka=us(HS),KS={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},GS=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,YS=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function JS(t,e,n={},r,i=nl,s){let o=new i({...KS,...n});return r?Ka(o,r):r!==!1&&Ka(o),o.addFormat("data-url",YS),o.addFormat("color",GS),o.addKeyword(ot),o.addKeyword(ys),Array.isArray(t)&&o.addMetaSchema(t),ne(e)&&Object.keys(e).forEach(a=>{o.addFormat(a,e[a])}),s&&(o=s(o)),o}class ZS{constructor(e,n){this.hasRegisteredRootSchema=!1;const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:o,AjvClass:a,extenderFn:l,suppressDuplicateFiltering:u}=e;this.ajv=JS(r,i,s,o,a,l),this.localizer=n,this.suppressDuplicateFiltering=u}reset(){this.ajv.removeSchema(),this.lastSeenRootSchema=void 0,this.hasRegisteredRootSchema=!1}rawValidation(e,n){var r,i;let s,o;try{e[de]&&(o=this.ajv.getSchema(e[de])),o===void 0&&(o=this.ajv.compile(e)),o(n)}catch(l){s=l}let a;return o&&(typeof this.localizer=="function"&&(((r=o.errors)!==null&&r!==void 0?r:[]).forEach(l=>{var u;["missingProperty","property"].forEach(c=>{var d;!((d=l.params)===null||d===void 0)&&d[c]&&(l.params[c]=`'${l.params[c]}'`)}),!((u=l.params)===null||u===void 0)&&u.deps&&(l.params.deps=l.params.deps.split(", ").map(c=>`'${c}'`).join(", "))}),this.localizer(o.errors),((i=o.errors)!==null&&i!==void 0?i:[]).forEach(l=>{var u;["missingProperty","property"].forEach(c=>{var d;!((d=l.params)===null||d===void 0)&&d[c]&&(l.params[c]=l.params[c].slice(1,-1))}),!((u=l.params)===null||u===void 0)&&u.deps&&(l.params.deps=l.params.deps.split(", ").map(c=>c.slice(1,-1)).join(", "))})),a=o.errors||void 0,o.errors=null),{errors:a,validationError:s}}validateFormData(e,n,r,i,s){const o=this.rawValidation(n,e);return VS(this,o,e,n,r,i,s,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){var n,r;if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;const i=(n=e[de])!==null&&n!==void 0?n:cl;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(e,i):ie(e,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(e,i)),this.lastSeenRootSchema=e,this.hasRegisteredRootSchema=!0}isValid(e,n,r){var i;try{this.handleSchemaUpdate(r);const s=Ks(e),o=(i=s[de])!==null&&i!==void 0?i:bx(s);let a;return a=this.ajv.getSchema(o),a===void 0&&(a=this.ajv.addSchema(s,o).getSchema(o)||this.ajv.compile(s)),a(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function XS(t={},e){return new ZS(t,e)}const QS=XS();const tu=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const ew=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const tw=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const Ga=t=>{const e=tw(t);return e.charAt(0).toUpperCase()+e.slice(1)};var Fi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const nw=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},rw=N.createContext({}),iw=()=>N.useContext(rw),sw=N.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>{const{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:d=!1,color:h="currentColor",className:g=""}=iw()??{},f=r??d?Number(n??c)*24/Number(e??u):n??c;return N.createElement("svg",{ref:l,...Fi,width:e??u??Fi.width,height:e??u??Fi.height,stroke:t??h,strokeWidth:f,className:tu("lucide",g,i),...!s&&!nw(a)&&{"aria-hidden":"true"},...a},[...o.map(([p,y])=>N.createElement(p,y)),...Array.isArray(s)?s:[s]])});const rt=(t,e)=>{const n=N.forwardRef(({className:r,...i},s)=>N.createElement(sw,{ref:s,iconNode:e,className:tu(`lucide-${ew(Ga(t))}`,`lucide-${t}`,r),...i}));return n.displayName=Ga(t),n};const ow=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],aw=rt("check",ow);const lw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],nu=rt("chevron-down",lw);const cw=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],uw=rt("chevron-up",cw);const dw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fw=rt("circle-alert",dw);const mw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],ru=rt("circle-plus",mw);const hw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pw=rt("circle",hw);const gw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],yw=rt("copy",gw);const bw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],xw=rt("search",bw);const vw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sw=rt("trash-2",vw);const ww=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],iu=rt("x",ww);function Y(...t){return Uu(Lu(t))}const jw=ds("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function eo({className:t,variant:e,size:n,asChild:r=!1,...i}){const s=r?el:"button";return m.jsx(s,{"data-slot":"button",className:Y(jw({variant:e,size:n,className:t})),...i})}function Ow({uiSchema:t,registry:e,className:n,...r}){const{translateString:i}=e;return m.jsx("div",{className:"p-0 m-0",children:m.jsxs(eo,{...r,className:Y("w-fit gap-2",n),variant:"outline",type:"button",children:[m.jsx(ru,{size:16})," ",i(G.AddItemButton)]})})}function Ew(t){const{children:e,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:s,uiSchema:o,registry:a}=t,l=B(o),u=V("ArrayFieldItemButtonsTemplate",a,l),c=i?-6:22;return m.jsx("div",{children:m.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[m.jsx("div",{className:"grow shrink",children:e}),m.jsx("div",{className:"flex items-end justify-end p-0.5",children:s&&m.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${c}px`:void 0},children:m.jsx(u,{...n})})})]})})}function Aw(t){const{canAdd:e,disabled:n,fieldPathId:r,uiSchema:i,items:s,optionalDataControl:o,onAddClick:a,readonly:l,registry:u,required:c,schema:d,title:h}=t,g=B(i),f=V("ArrayFieldDescriptionTemplate",u,g),p=V("ArrayFieldTitleTemplate",u,g),y=!l&&!n,{ButtonTemplates:{AddButton:x}}=u.templates;return m.jsx("div",{children:m.jsx("div",{className:"m-0 flex p-0",children:m.jsxs("div",{className:"m-0 w-full p-0",children:[m.jsx(p,{fieldPathId:r,title:g.title||h,schema:d,uiSchema:i,required:c,registry:u,optionalDataControl:y?o:void 0}),m.jsx(f,{fieldPathId:r,description:g.description||d.description,schema:d,uiSchema:i,registry:u}),m.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[y?void 0:o,s,e&&m.jsx("div",{className:"mt-2 flex justify-end",children:m.jsx(x,{id:Qe(r,"add"),className:"rjsf-array-item-add",onClick:a,disabled:n||l,uiSchema:i,registry:u})})]},`array-item-list-${r.$id}`)]})})})}function su({className:t,type:e,...n}){return m.jsx("input",{type:e,"data-slot":"input",className:Y("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}function Cw({id:t,htmlName:e,placeholder:n,required:r,readonly:i,disabled:s,type:o,value:a,onChange:l,onChangeOverride:u,onBlur:c,onFocus:d,autofocus:h,options:g,schema:f,rawErrors:p=[],children:y,extraProps:x,className:S,registry:E}){const{ClearButton:j}=E.templates.ButtonTemplates,b={...x,...Tc(f,o,g)},v=({target:{value:A}})=>l(A===""?g.emptyValue:A),w=({target:A})=>c(t,A&&A.value),O=({target:A})=>d(t,A&&A.value),C=N.useCallback(A=>{var _;A.preventDefault(),A.stopPropagation(),l((_=g.emptyValue)!==null&&_!==void 0?_:"")},[l,g.emptyValue]);return m.jsxs("div",{className:"p-0.5",children:[m.jsx(su,{id:t,name:e||t,type:o,placeholder:n,autoFocus:h,required:r,disabled:s,readOnly:i,className:Y({"border-destructive focus-visible:ring-0":p.length>0},S),list:f.examples?Qr(t):void 0,...b,value:a||a===0?a:"",onChange:u||v,onBlur:w,onFocus:O,"aria-describedby":Fe(t,!!f.examples)}),g.allowClearTextInputs&&!i&&!s&&a&&m.jsx(j,{onClick:C,registry:E}),y,m.jsx(Zc,{id:t,schema:f})]})}function _w({id:t,description:e,registry:n,uiSchema:r}){return e?m.jsx("div",{children:m.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:m.jsx(Xs,{description:e,registry:n,uiSchema:r})})}):null}const Iw=ds("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Tw({className:t,variant:e,...n}){return m.jsx("div",{"data-slot":"alert",role:"alert",className:Y(Iw({variant:e}),t),...n})}function Nw({className:t,...e}){return m.jsx("div",{"data-slot":"alert-title",className:Y("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Pw({className:t,...e}){return m.jsx("div",{"data-slot":"alert-description",className:Y("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function Fw({errors:t,registry:e}){const{translateString:n}=e;return m.jsxs(Tw,{variant:"destructive",className:"mb-2",children:[m.jsx(fw,{className:"h-4 w-4"}),m.jsx(Nw,{children:n(G.ErrorsLabel)}),m.jsx(Pw,{className:"flex flex-col gap-1",children:t.map((r,i)=>m.jsxs("span",{children:["• ",r.stack]},i))})]})}function $w(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=qs(n);return m.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((i,s)=>m.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:i},s))})}function Dw(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i,hasErrors:s}=t;return n?m.jsx("span",{className:Y("text-xs font-medium text-muted-foreground",{"text-destructive":s}),id:zs(e),children:m.jsx(Qs,{help:n,registry:i,uiSchema:r})}):null}function Rw({id:t,children:e,displayLabel:n,rawErrors:r=[],errors:i,help:s,description:o,rawDescription:a,classNames:l,style:u,disabled:c,label:d,hidden:h,onKeyRename:g,onKeyRenameBlur:f,onRemoveProperty:p,readonly:y,required:x,schema:S,uiSchema:E,registry:j}){const b=B(E),v=V("WrapIfAdditionalTemplate",j,b);if(h)return m.jsx("div",{className:"hidden",children:e});const w=b.widget==="checkbox";return m.jsx(v,{classNames:l,style:u,disabled:c,id:t,label:d,displayLabel:n,onKeyRename:g,onKeyRenameBlur:f,onRemoveProperty:p,rawDescription:a,readonly:y,required:x,schema:S,uiSchema:E,registry:j,children:m.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!w&&m.jsxs("label",{className:Y("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[d,x?"*":null]}),e,n&&a&&!w&&m.jsx("span",{className:Y("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:o}),i,s]})})}function kw(t){const{children:e,column:n,className:r,...i}=t;return m.jsx("div",{className:Y("grid gap-2",r),...i,children:e})}function Mw(t){const{icon:e,iconType:n,className:r,uiSchema:i,registry:s,...o}=t;return m.jsx(eo,{size:"icon",variant:"outline",className:r,...o,type:"button",children:e})}const wn=N.memo(Mw);function Uw(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.CopyButton),...t,icon:m.jsx(yw,{className:"h-4 w-4"})})}const Lw=N.memo(Uw);function Bw(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.MoveDownButton),...t,icon:m.jsx(nu,{className:"h-4 w-4"})})}const Vw=N.memo(Bw);function qw(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.MoveUpButton),...t,icon:m.jsx(uw,{className:"h-4 w-4"})})}const zw=N.memo(qw);function Ww(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.RemoveButton),...t,className:"border-destructive",icon:m.jsx(Sw,{className:"h-4 w-4 stroke-destructive"})})}const ou=N.memo(Ww);function Hw(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.ClearButton),...t,icon:m.jsx(iu,{})})}const Kw=N.memo(Hw);function Gw({selector:t,optionSchemaField:e}){return m.jsxs("div",{className:Y("p-4 border rounded-md bg-background shadow-sm"),children:[m.jsx("div",{className:Y("mb-4"),children:t}),e]})}function Yw({description:t,title:e,properties:n,required:r,uiSchema:i,fieldPathId:s,schema:o,formData:a,optionalDataControl:l,onAddProperty:u,disabled:c,readonly:d,registry:h}){const g=B(i),f=V("TitleFieldTemplate",h,g),p=V("DescriptionFieldTemplate",h,g),y=!d&&!c,{ButtonTemplates:{AddButton:x}}=h.templates;return m.jsxs(m.Fragment,{children:[e&&m.jsx(f,{id:ei(s),title:e,required:r,schema:o,uiSchema:i,registry:h,optionalDataControl:y?l:void 0}),t&&m.jsx(p,{id:Ht(s),description:t,schema:o,uiSchema:i,registry:h}),m.jsxs("div",{className:"flex flex-col gap-2",children:[y?void 0:l,n.map(S=>m.jsx("div",{className:`${S.hidden?"hidden":""} flex`,children:m.jsx("div",{className:"w-full",children:S.content})},S.name)),ul(o,i,a)?m.jsx("div",{className:"mt-2 flex justify-end",children:m.jsx(x,{id:Qe(s,"add"),onClick:u,disabled:c||d,className:"rjsf-object-property-expand",uiSchema:i,registry:h})}):null]})]})}function Jw(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?m.jsx(wn,{id:e,registry:n,className:"rjsf-add-optional-data",onClick:i,title:r,icon:m.jsx(ru,{}),size:"xs"}):s?m.jsx(ou,{id:e,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):m.jsx("em",{id:e,children:r})}function Zw(t){const{submitText:e,norender:n,props:r}=Nc(t.uiSchema);return n?null:m.jsx("div",{children:m.jsx(eo,{type:"submit",...r,className:Y("my-2",r?.className),children:e})})}function au({className:t,orientation:e="horizontal",decorative:n=!0,...r}){return m.jsx(Bu,{"data-slot":"separator",decorative:n,orientation:e,className:Y("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function Xw({id:t,title:e,uiSchema:n,optionalDataControl:r}){const i=B(n);let s=m.jsx("h5",{children:i.title||e});return r&&(s=m.jsxs("div",{className:"flex flex-row",children:[m.jsx("div",{className:"flex-grow",children:s}),m.jsx("div",{className:"flex",children:r})]})),m.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[s,m.jsx(au,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Qw({classNames:t,style:e,children:n,disabled:r,id:i,label:s,displayLabel:o,onRemoveProperty:a,onKeyRenameBlur:l,rawDescription:u,readonly:c,required:d,schema:h,uiSchema:g,registry:f}){const{templates:p,translateString:y}=f,{RemoveButton:x}=p.ButtonTemplates,S=y(G.KeyLabel,[s]);if(!(ot in h))return m.jsx("div",{className:t,style:e,children:n});const b=o?22+(u?-28:0):0,v=`${i}-key`;return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[m.jsx("div",{className:"grid gap-2 col-span-5",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[o&&m.jsx("label",{htmlFor:v,className:"text-sm font-medium text-muted-foreground leading-none",children:S}),m.jsx("div",{className:"pl-0.5",children:m.jsx(su,{required:d,defaultValue:s,disabled:r||c,id:v,name:v,onBlur:c?void 0:l,type:"text",className:"w-full border shadow-sm"},s)}),!!u&&m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),m.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),m.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${b}px`},children:m.jsx(x,{id:Qe(i,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||c,onClick:a,uiSchema:g,registry:f})})]}),m.jsx(au,{dir:"horizontal",className:"mt-2"})]})}function ej(){return{ArrayFieldItemTemplate:Ew,ArrayFieldTemplate:Aw,BaseInputTemplate:Cw,ButtonTemplates:{AddButton:Ow,CopyButton:Lw,MoveDownButton:Vw,MoveUpButton:zw,RemoveButton:ou,SubmitButton:Zw,ClearButton:Kw},DescriptionFieldTemplate:_w,ErrorListTemplate:Fw,FieldErrorTemplate:$w,FieldHelpTemplate:Dw,FieldTemplate:Rw,GridTemplate:kw,MultiSchemaFieldTemplate:Gw,ObjectFieldTemplate:Yw,OptionalDataControlsTemplate:Jw,TitleFieldTemplate:Xw,WrapIfAdditionalTemplate:Qw}}function tj(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var nj=["color"],rj=N.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=tj(t,nj);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),N.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function lu({className:t,...e}){return m.jsx(Vu,{"data-slot":"checkbox",className:Y("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:m.jsx(qu,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:m.jsx(rj,{className:"size-3.5"})})})}function to({className:t,...e}){return m.jsx(zu,{"data-slot":"label",className:Y("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})}function ij({id:t,htmlName:e,disabled:n,options:r,value:i,autofocus:s,readonly:o,required:a,onChange:l,onBlur:u,onFocus:c,className:d}){const{enumOptions:h,enumDisabled:g,inline:f,emptyValue:p}=r,y=vn(r),x=Array.isArray(i)?i:[i],S=({target:j})=>u(t,Te(j&&j.value,h,y,p)),E=({target:j})=>c(t,Te(j&&j.value,h,y,p));return m.jsx("div",{className:Y({"flex flex-col gap-2":!f,"flex flex-row gap-4 flex-wrap":f}),children:Array.isArray(h)&&h.map((j,b)=>{const v=ur(j.value,x),w=Array.isArray(g)&&g.includes(j.value),O=Ft(t,b);return m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(lu,{id:O,name:e||t,required:a,disabled:n||w||o,onCheckedChange:C=>{l(C?Cc(b,x,h):Ec(b,x,h))},className:d,checked:v,autoFocus:s&&b===0,onBlur:S,onFocus:E,"aria-describedby":Fe(t)}),m.jsx(to,{className:"leading-tight",htmlFor:Ft(t,b),children:j.label})]},O)})})}function sj(t){const{id:e,htmlName:n,value:r,disabled:i,readonly:s,label:o,hideLabel:a,schema:l,autofocus:u,options:c,onChange:d,onBlur:h,onFocus:g,registry:f,uiSchema:p,className:y}=t,x=Wn(l),S=V("DescriptionFieldTemplate",f,c),E=w=>d(w),j=()=>h(e,r),b=()=>g(e,r),v=c.description||l.description;return m.jsxs("div",{className:`relative ${i||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":Fe(e),children:[!a&&v&&m.jsx(S,{id:Ht(e),description:v,schema:l,uiSchema:p,registry:f}),m.jsxs("div",{className:"flex items-center gap-2 my-2",children:[m.jsx(lu,{id:e,name:n||e,checked:typeof r>"u"?!1:!!r,required:x,disabled:i||s,autoFocus:u,onCheckedChange:E,onBlur:j,onFocus:b,className:y}),m.jsx(to,{className:"leading-tight",htmlFor:e,children:Fc(o,a||!o)})]})]})}function oj({className:t,...e}){return m.jsx(Ed,{"data-slot":"radio-group",className:Y("grid gap-3",t),...e})}function aj({className:t,...e}){return m.jsx(Ad,{"data-slot":"radio-group-item",className:Y("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:m.jsx(Cd,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:m.jsx(pw,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function lj({id:t,options:e,value:n,required:r,disabled:i,readonly:s,onChange:o,onBlur:a,onFocus:l,className:u}){const{enumOptions:c,enumDisabled:d,emptyValue:h}=e,g=vn(e),f=S=>o(Te(S,c,g,h)),p=({target:S})=>a(t,Te(S&&S.value,c,g,h)),y=({target:S})=>l(t,Te(S&&S.value,c,g,h)),x=!!(e&&e.inline);return m.jsx("div",{className:"mb-0",children:m.jsx(oj,{defaultValue:n?.toString(),required:r,disabled:i||s,onValueChange:S=>{f(S)},onBlur:p,onFocus:y,"aria-describedby":Fe(t),orientation:x?"horizontal":"vertical",className:Y("flex flex-wrap",{"flex-col":!x},u),children:Array.isArray(c)&&c.map((S,E)=>{const j=Array.isArray(d)&&d.includes(S.value),b=ur(S.value,n);return m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(aj,{checked:b,value:dr(S.value,E,g),id:Ft(t,E),disabled:j}),m.jsx(to,{className:"leading-tight",htmlFor:Ft(t,E),children:S.label})]},Ft(t,E))})})})}var cu=["PageUp","PageDown"],uu=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],du={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},jn="Slider",[is,cj,uj]=Hu(jn),[fu]=Yu(jn,[uj]),[dj,ri]=fu(jn),mu=N.forwardRef((t,e)=>{const{name:n,min:r=0,max:i=100,step:s=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:c,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:g=!1,form:f,...p}=t,y=N.useRef(new Set),x=N.useRef(0),E=o==="horizontal"?fj:mj,[j=[],b]=Wu({prop:c,defaultProp:u,onChange:_=>{[...y.current][x.current]?.focus(),d(_)}}),v=N.useRef(j);function w(_){const I=bj(j,_);A(_,I)}function O(_){A(_,x.current)}function C(){const _=v.current[x.current];j[x.current]!==_&&h(j)}function A(_,I,{commit:T}={commit:!1}){const P=wj(s),F=jj(Math.round((_-r)/s)*s+r,P),$=il(F,[r,i]);b((k=[])=>{const M=gj(k,$,I);if(Sj(M,l*s)){x.current=M.indexOf($);const U=String(M)!==String(k);return U&&T&&h(M),U?M:k}else return k})}return m.jsx(dj,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:x,thumbs:y.current,values:j,orientation:o,form:f,children:m.jsx(is.Provider,{scope:t.__scopeSlider,children:m.jsx(is.Slot,{scope:t.__scopeSlider,children:m.jsx(E,{"aria-disabled":a,"data-disabled":a?"":void 0,...p,ref:e,onPointerDown:Qt(p.onPointerDown,()=>{a||(v.current=j)}),min:r,max:i,inverted:g,onSlideStart:a?void 0:w,onSlideMove:a?void 0:O,onSlideEnd:a?void 0:C,onHomeKeyDown:()=>!a&&A(r,0,{commit:!0}),onEndKeyDown:()=>!a&&A(i,j.length-1,{commit:!0}),onStepKeyDown:({event:_,direction:I})=>{if(!a){const F=cu.includes(_.key)||_.shiftKey&&uu.includes(_.key)?10:1,$=x.current,k=j[$],M=s*F*I;A(k+M,$,{commit:!0})}}})})})})});mu.displayName=jn;var[hu,pu]=fu(jn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),fj=N.forwardRef((t,e)=>{const{min:n,max:r,dir:i,inverted:s,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:u,...c}=t,[d,h]=N.useState(null),g=gn(e,E=>h(E)),f=N.useRef(void 0),p=Ku(i),y=p==="ltr",x=y&&!s||!y&&s;function S(E){const j=f.current||d.getBoundingClientRect(),b=[0,j.width],w=no(b,x?[n,r]:[r,n]);return f.current=j,w(E-j.left)}return m.jsx(hu,{scope:t.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:m.jsx(gu,{dir:p,"data-orientation":"horizontal",...c,ref:g,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const j=S(E.clientX);o?.(j)},onSlideMove:E=>{const j=S(E.clientX);a?.(j)},onSlideEnd:()=>{f.current=void 0,l?.()},onStepKeyDown:E=>{const b=du[x?"from-left":"from-right"].includes(E.key);u?.({event:E,direction:b?-1:1})}})})}),mj=N.forwardRef((t,e)=>{const{min:n,max:r,inverted:i,onSlideStart:s,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...u}=t,c=N.useRef(null),d=gn(e,c),h=N.useRef(void 0),g=!i;function f(p){const y=h.current||c.current.getBoundingClientRect(),x=[0,y.height],E=no(x,g?[r,n]:[n,r]);return h.current=y,E(p-y.top)}return m.jsx(hu,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:m.jsx(gu,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const y=f(p.clientY);s?.(y)},onSlideMove:p=>{const y=f(p.clientY);o?.(y)},onSlideEnd:()=>{h.current=void 0,a?.()},onStepKeyDown:p=>{const x=du[g?"from-bottom":"from-top"].includes(p.key);l?.({event:p,direction:x?-1:1})}})})}),gu=N.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...u}=t,c=ri(jn,n);return m.jsx(rr.span,{...u,ref:e,onKeyDown:Qt(t.onKeyDown,d=>{d.key==="Home"?(o(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):cu.concat(uu).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Qt(t.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),c.thumbs.has(h)?h.focus():r(d)}),onPointerMove:Qt(t.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&i(d)}),onPointerUp:Qt(t.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),s(d))})})}),yu="SliderTrack",bu=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=ri(yu,n);return m.jsx(rr.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:e})});bu.displayName=yu;var ss="SliderRange",xu=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=ri(ss,n),s=pu(ss,n),o=N.useRef(null),a=gn(e,o),l=i.values.length,u=i.values.map(h=>wu(h,i.min,i.max)),c=l>1?Math.min(...u):0,d=100-Math.max(...u);return m.jsx(rr.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...t.style,[s.startEdge]:c+"%",[s.endEdge]:d+"%"}})});xu.displayName=ss;var os="SliderThumb",vu=N.forwardRef((t,e)=>{const n=cj(t.__scopeSlider),[r,i]=N.useState(null),s=gn(e,a=>i(a)),o=N.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return m.jsx(hj,{...t,ref:s,index:o})}),hj=N.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:i,...s}=t,o=ri(os,n),a=pu(os,n),[l,u]=N.useState(null),c=gn(e,S=>u(S)),d=l?o.form||!!l.closest("form"):!0,h=Gu(l),g=o.values[r],f=g===void 0?0:wu(g,o.min,o.max),p=yj(r,o.values.length),y=h?.[a.size],x=y?xj(y,f,a.direction):0;return N.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${f}% + ${x}px)`},children:[m.jsx(is.ItemSlot,{scope:t.__scopeSlider,children:m.jsx(rr.span,{role:"slider","aria-label":t["aria-label"]||p,"aria-valuemin":o.min,"aria-valuenow":g,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...s,ref:c,style:g===void 0?{display:"none"}:t.style,onFocus:Qt(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&m.jsx(Su,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:g},r)]})});vu.displayName=os;var pj="RadioBubbleInput",Su=N.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const i=N.useRef(null),s=gn(i,r),o=Ju(e);return N.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&c){const d=new Event("input",{bubbles:!0});c.call(a,e),a.dispatchEvent(d)}},[o,e]),m.jsx(rr.input,{style:{display:"none"},...n,ref:s,defaultValue:e})});Su.displayName=pj;function gj(t=[],e,n){const r=[...t];return r[n]=e,r.sort((i,s)=>i-s)}function wu(t,e,n){const s=100/(n-e)*(t-e);return il(s,[0,100])}function yj(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function bj(t,e){if(t.length===1)return 0;const n=t.map(i=>Math.abs(i-e)),r=Math.min(...n);return n.indexOf(r)}function xj(t,e,n){const r=t/2,s=no([0,50],[0,r]);return(r-s(e)*n)*n}function vj(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function Sj(t,e){if(e>0){const n=vj(t);return Math.min(...n)>=e}return!0}function no(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function wj(t){return(String(t).split(".")[1]||"").length}function jj(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var Oj=mu,Ej=bu,Aj=xu,Cj=vu;function _j({className:t,defaultValue:e,value:n,min:r=0,max:i=100,...s}){const o=N.useMemo(()=>Array.isArray(n)?n:Array.isArray(e)?e:[r,i],[n,e,r,i]);return m.jsxs(Oj,{"data-slot":"slider",defaultValue:e,value:n,min:r,max:i,className:Y("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...s,children:[m.jsx(Ej,{"data-slot":"slider-track",className:Y("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:m.jsx(Aj,{"data-slot":"slider-range",className:Y("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(a,l)=>m.jsx(Cj,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},l))]})}const Ij=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Tj({value:t,readonly:e,disabled:n,options:r,schema:i,onChange:s,label:o,id:a}){const l=d=>s(d[0]),u={...Ic(i)},c={id:a,...Ls(r.props||{},Ij)};return m.jsxs(m.Fragment,{children:[m.jsx(_j,{disabled:n||e,min:u.min,max:u.max,step:u.step,value:[t],onValueChange:l,...c,"aria-describedby":Fe(a)}),t]})}const Nj=ds("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Pj({className:t,variant:e,asChild:n=!1,...r}){const i=n?el:"span";return m.jsx(i,{"data-slot":"badge",className:Y(Nj({variant:e}),t),...r})}const ju=N.forwardRef(({className:t,...e},n)=>m.jsx(Lt,{ref:n,"data-slot":"command",className:Y("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),Fj=N.forwardRef(({className:t,...e},n)=>m.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m.jsx(xw,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m.jsx(Lt.Input,{ref:n,className:Y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Fj.displayName=Lt.Input.displayName;function Ou({className:t,...e}){return m.jsx(Lt.List,{"data-slot":"command-list",className:Y("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function Eu({className:t,...e}){return m.jsx(Lt.Group,{"data-slot":"command-group",className:Y("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function Au({className:t,...e}){return m.jsx(Lt.Item,{"data-slot":"command-item",className:Y("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function $j({multiple:t,items:e=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:s=!1,ariaDescribedby:o,ariaPlaceholder:a,onFocus:l,onBlur:u,className:c,id:d}){const h=N.useRef(null),[g,f]=N.useState(!1),[p,y]=N.useState(""),x=N.useMemo(()=>e.filter(w=>n.some(O=>_r(w.value,O))),[e,n]),S=N.useMemo(()=>e.filter(w=>!x.some(O=>_r(O.value,w.value))),[e,x]),E=N.useCallback(w=>{if(s)return;const O=x.filter(C=>!_r(C.value,w.value));r?.(O.map(C=>C.index))},[x,r,s]),j=N.useCallback(w=>{if(!(s||!h.current||h.current.value!==""))if(w.key==="Delete"||w.key==="Backspace"){const O=x.slice(0,-1);r?.(O.map(C=>C.index))}else w.key==="Escape"&&h.current.blur()},[x,r,s]),b=N.useCallback(w=>{if(s)return;y("");const O=t?[...x,w]:[w];r?.(O.map(C=>C.index))},[t,x,r,s]),v=N.useCallback(w=>{s||f(!0),l?.(w)},[s,l]);return m.jsxs(ju,{onKeyDown:j,className:Y("overflow-visible bg-transparent",c),autoFocus:i,"aria-disabled":s,onBlur:u,onFocus:v,"aria-describedby":o,"aria-placeholder":a,children:[m.jsx("div",{className:Y("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",s&&"opacity-50 cursor-not-allowed"),children:m.jsxs("div",{className:"flex gap-1 flex-wrap",children:[x.map(w=>m.jsxs(Pj,{variant:"secondary",children:[w.label,m.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:O=>O.key==="Enter"&&!s&&E(w),onMouseDown:O=>{O.preventDefault(),O.stopPropagation()},onClick:()=>E(w),disabled:s,children:m.jsx(iu,{className:Y("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},w.value)),m.jsx(Lt.Input,{ref:h,value:p,onValueChange:y,onBlur:()=>f(!1),onFocus:()=>!s&&f(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:s,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),g&&!s&&S.length>0&&m.jsx("div",{className:"relative mt-2",children:m.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:m.jsx(Eu,{className:"h-full overflow-auto",children:m.jsx(Ou,{children:S.map(w=>m.jsx(Au,{disabled:w.disabled,onMouseDown:O=>{O.preventDefault(),O.stopPropagation()},"aria-controls":`${w.value}-command-item`,"aria-labelledby":`${w.value}-command-item`,id:`${w.value}-command-item`,onSelect:()=>b(w),className:"cursor-pointer",children:w.label},`${w.value}-command-item`))})})})})]})}function Dj({items:t,selected:e,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:s=!1,placeholder:o="Select...",ariaDescribedby:a,ariaPlaceholder:l,onFocus:u,onBlur:c,className:d}){const[h,g]=N.useState(!1),f=t?.find(S=>S.value===e),p=N.useRef(null),y=N.useRef(null);N.useEffect(()=>{h&&p.current&&requestAnimationFrame(()=>{var S;(S=p.current)===null||S===void 0||S.scrollIntoView({block:"nearest"})})},[h]);const x=S=>{y.current&&!y.current.contains(S.relatedTarget)&&g(!1),c?.(S)};return m.jsxs(ju,{ref:y,className:Y("overflow-visible bg-transparent",d),autoFocus:r,"aria-disabled":i,onBlur:x,onFocus:u,"aria-describedby":a,"aria-placeholder":l,children:[m.jsxs("div",{role:"button",tabIndex:i?-1:0,onClick:()=>!i&&g(!h),onKeyDown:S=>(S.key==="Enter"||S.key===" ")&&!i&&g(!h),className:Y("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!f&&s&&"border-red-500",i&&"opacity-50 cursor-not-allowed",d),children:[m.jsx("span",{className:Y("flex-1 line-clamp-1",!f&&"text-muted-foreground"),children:f?.label||o}),m.jsx(nu,{className:"h-4 w-4 opacity-50"})]}),m.jsx("div",{className:"relative",children:h&&t&&t.length>0?m.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:m.jsx(Eu,{className:"h-full overflow-auto",children:m.jsx(Ou,{children:t.map(S=>m.jsxs(Au,{ref:S.value===e?p:void 0,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onSelect:()=>{S.disabled||(n?.(S.value),g(!1))},className:Y("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",S.value===e&&"font-semibold",S.disabled&&"opacity-50 cursor-not-allowed"),children:[m.jsx("span",{children:S.label}),m.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:S.value===e&&m.jsx(aw,{className:"h-4 w-4"})})]},S.value))})})}):null})]})}function Rj({id:t,options:e,required:n,disabled:r,readonly:i,value:s,multiple:o,autofocus:a,onChange:l,onBlur:u,onFocus:c,placeholder:d,rawErrors:h=[],className:g}){const{enumOptions:f,enumDisabled:p,emptyValue:y}=e,x=vn(e),S=()=>{c(t,Te(s,f,x,y))},E=()=>{u(t,Te(s,f,x,y))},j=f?.map(({value:v,label:w},O)=>({value:o?v:dr(v,O,x),label:w,index:O,disabled:Array.isArray(p)&&p.includes(v)})),b=Y({"border-destructive":h.length>0},g);return m.jsx("div",{className:"p-0.5",children:o?m.jsx($j,{id:t,autoFocus:a,disabled:r||i,multiple:!0,className:b,items:j,selected:s,onValueChange:v=>{l(Te(v.map(String),f,x,y))},onFocus:S,onBlur:E}):m.jsx(Dj,{items:j,selected:Ac(s,f,!1,x,""),onValueChange:v=>{l(Te(v,f,x,y))},autoFocus:a,disabled:r||i,required:n,placeholder:d,className:b,onFocus:S,onBlur:E,ariaDescribedby:Fe(t)})})}function kj({className:t,...e}){return m.jsx("textarea",{"data-slot":"textarea",className:Y("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function Mj({id:t,htmlName:e,placeholder:n,value:r,required:i,disabled:s,autofocus:o,readonly:a,onBlur:l,onFocus:u,onChange:c,options:d,className:h}){const g=({target:{value:y}})=>c(y===""?d.emptyValue:y),f=({target:y})=>l(t,y&&y.value),p=({target:y})=>u(t,y&&y.value);return m.jsx("div",{className:"flex p-0.5",children:m.jsx(kj,{id:t,name:e||t,placeholder:n,disabled:s,readOnly:a,value:r??"",required:i,autoFocus:o,rows:d.rows||5,onChange:g,onBlur:f,onFocus:p,"aria-describedby":Fe(t),className:h})})}function Uj(){return{CheckboxWidget:sj,CheckboxesWidget:ij,RadioWidget:lj,RangeWidget:Tj,SelectWidget:Rj,TextareaWidget:Mj}}function Lj(){return{templates:ej(),widgets:Uj()}}function Bj(){return US(Lj())}const Vj=Bj();function qj(t){const e=je.c(21),{virtualMcp:n,isSelected:r}=t,i=r&&"bg-accent";let s;e[0]!==i?(s=Ur("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",i),e[0]=i,e[1]=s):s=e[1];let o;e[2]!==n.icon||e[3]!==n.title?(o=m.jsx(rl,{icon:n.icon,name:n.title,size:"sm"}),e[2]=n.icon,e[3]=n.title,e[4]=o):o=e[4];let a;e[5]!==n.title?(a=m.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[5]=n.title,e[6]=a):a=e[6];let l;e[7]!==r?(l=r&&m.jsx(kd,{size:16,className:"text-foreground shrink-0"}),e[7]=r,e[8]=l):l=e[8];let u;e[9]!==a||e[10]!==l?(u=m.jsxs("div",{className:"flex items-center justify-between",children:[a,l]}),e[9]=a,e[10]=l,e[11]=u):u=e[11];let c;e[12]!==n.description?(c=n.description&&m.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[12]=n.description,e[13]=c):c=e[13];let d;e[14]!==u||e[15]!==c?(d=m.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[u,c]}),e[14]=u,e[15]=c,e[16]=d):d=e[16];let h;return e[17]!==s||e[18]!==o||e[19]!==d?(h=m.jsxs("div",{className:s,children:[o,d]}),e[17]=s,e[18]=o,e[19]=d,e[20]=h):h=e[20],h}function zj(){const t=je.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx("div",{className:"flex items-center justify-center py-12",children:m.jsx(fs,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function Wj(t){const e=je.c(40),{selectedVirtualMcpId:n,onVirtualMcpChange:r,searchInputRef:i}=t,s=lt(),o=Rd(),[a,l]=N.useState(""),u=N.useRef(null),c=i??u;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={navigateOnCreate:!0},e[0]=d):d=e[0];const{createVirtualMCP:h,isCreating:g}=Bd(d);let f,p,y,x;if(e[1]!==h||e[2]!==c||e[3]!==g||e[4]!==r||e[5]!==a||e[6]!==n||e[7]!==s||e[8]!==o){let j;e:{const P=o.filter(Hj);if(!a.trim()){j=P;break e}const F=a.toLowerCase();j=P.filter($=>$.title.toLowerCase().includes(F)||$.description?.toLowerCase().includes(F))}const b=j;let v;e[13]!==r?(v=P=>{r(P),l("")},e[13]=r,e[14]=v):v=e[14];const w=v;y="flex flex-col max-h-[min(400px,60dvh)]";let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=m.jsx(Md,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[15]=O):O=e[15];let C;e[16]!==s?(C=s("chat.selectVirtualMcp.searchPlaceholder"),e[16]=s,e[17]=C):C=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=P=>l(P.target.value),e[18]=A):A=e[18];let _;e[19]!==c||e[20]!==a||e[21]!==C?(_=m.jsx(_d,{ref:c,type:"text",placeholder:C,value:a,onChange:A,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[19]=c,e[20]=a,e[21]=C,e[22]=_):_=e[22];let I;e[23]!==g||e[24]!==s?(I=s(g?"chat.selectVirtualMcp.creating":"chat.selectVirtualMcp.createAgent"),e[23]=g,e[24]=s,e[25]=I):I=e[25];let T;e[26]!==h||e[27]!==g||e[28]!==I?(T=m.jsx(Lr,{onClick:h,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:g,children:I}),e[26]=h,e[27]=g,e[28]=I,e[29]=T):T=e[29],e[30]!==_||e[31]!==T?(x=m.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:m.jsxs("div",{className:"relative flex items-center gap-2",children:[O,_,T]})}),e[30]=_,e[31]=T,e[32]=x):x=e[32],f="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",p=b.length>0?m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:b.map(P=>m.jsx("div",{role:"button",tabIndex:0,onClick:()=>w(P.id),onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),w(P.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:m.jsx(qj,{virtualMcp:P,isSelected:P.id===n})},P.id))}):m.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:s("chat.selectVirtualMcp.noAgentsFound")}),e[1]=h,e[2]=c,e[3]=g,e[4]=r,e[5]=a,e[6]=n,e[7]=s,e[8]=o,e[9]=f,e[10]=p,e[11]=y,e[12]=x}else f=e[9],p=e[10],y=e[11],x=e[12];let S;e[33]!==f||e[34]!==p?(S=m.jsx("div",{className:f,children:p}),e[33]=f,e[34]=p,e[35]=S):S=e[35];let E;return e[36]!==y||e[37]!==x||e[38]!==S?(E=m.jsxs("div",{className:y,children:[x,S]}),e[36]=y,e[37]=x,e[38]=S,e[39]=E):E=e[39],E}function Hj(t){return!t.id||!sd(t.id)}function Kj(t){const e=je.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsx(zj,{}),e[0]=n):n=e[0];let r;return e[1]!==t?(r=m.jsx(N.Suspense,{fallback:n,children:m.jsx(Wj,{...t})}),e[1]=t,e[2]=r):r=e[2],r}function Gj(t){const e=je.c(35),{selectedVirtualMcpId:n,selectedVirtualMcp:r,onVirtualMcpChange:i,className:s,showTooltip:o,disabled:a}=t,l=o===void 0?!0:o,u=a===void 0?!1:a,c=lt(),[d,h]=N.useState(!1),g=N.useRef(null);let f;e[0]!==i?(f=$=>{i($),h(!1)},e[0]=i,e[1]=f):f=e[1];const p=f,y=Ld();let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=$=>{h($)},e[2]=x):x=e[2];const S=x;let E,j;e[3]!==y||e[4]!==d?(E=()=>{d&&!y&&setTimeout(()=>{g.current?.focus()},0)},j=[d,y],e[3]=y,e[4]=d,e[5]=E,e[6]=j):(E=e[5],j=e[6]),N.useEffect(E,j);const b=u?!1:d,v=u?void 0:S,w=u?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let O;e[7]!==s||e[8]!==w?(O=Ur("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",w,s),e[7]=s,e[8]=w,e[9]=O):O=e[9];let C;e[10]!==c?(C=c("chat.selectVirtualMcp.selectAgent"),e[10]=c,e[11]=C):C=e[11];let A;e[12]!==r?(A=r?m.jsx(rl,{icon:r.icon,name:r.title,size:"sm",className:"absolute inset-0 size-full"}):m.jsxs(m.Fragment,{children:[m.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[m.jsx("defs",{children:m.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[m.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),m.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),m.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),m.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),m.jsx(Ud,{size:16})]}),e[12]=r,e[13]=A):A=e[13];let _;e[14]!==u||e[15]!==O||e[16]!==C||e[17]!==A?(_=m.jsx(Fd,{asChild:!0,children:m.jsx(Id,{asChild:!0,children:m.jsx("button",{type:"button",disabled:u,className:O,"aria-label":C,children:A})})}),e[14]=u,e[15]=O,e[16]=C,e[17]=A,e[18]=_):_=e[18];let I;e[19]!==d||e[20]!==r?.title||e[21]!==l||e[22]!==c?(I=l&&!d&&m.jsx(Pd,{side:"top",className:"text-xs",children:r?.title??c("chat.selectVirtualMcp.chooseAgentTooltip")}),e[19]=d,e[20]=r?.title,e[21]=l,e[22]=c,e[23]=I):I=e[23];let T;e[24]!==_||e[25]!==I?(T=m.jsx($d,{children:m.jsxs(Dd,{children:[_,I]})}),e[24]=_,e[25]=I,e[26]=T):T=e[26];let P;e[27]!==p||e[28]!==n?(P=m.jsx(Td,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:m.jsx(Kj,{selectedVirtualMcpId:n,onVirtualMcpChange:p,searchInputRef:g})}),e[27]=p,e[28]=n,e[29]=P):P=e[29];let F;return e[30]!==T||e[31]!==P||e[32]!==b||e[33]!==v?(F=m.jsxs(Nd,{open:b,onOpenChange:v,children:[T,P]}),e[30]=T,e[31]=P,e[32]=b,e[33]=v,e[34]=F):F=e[34],F}function Yj(t){const e=t.properties;if(!e)return!1;const n=e.__type,r=e.__binding;return!!(n?.const||r?.const)}function Jj(t){const e=t.properties;if(!e)return{};const n=e.__type,r=e.__binding;return{bindingType:n?.const,bindingSchema:r?.const}}function Zj(t){const e=je.c(10),{bindingSchema:n,bindingType:r,currentValue:i,onValueChange:s,placeholder:o,onAddNew:a,className:l}=t;let u;e[0]!==r?(u=em(r),e[0]=r,e[1]=u):u=e[1];const d=u??(typeof n=="string"?n:n??void 0);let h;return e[2]!==r||e[3]!==l||e[4]!==i||e[5]!==a||e[6]!==s||e[7]!==o||e[8]!==d?(h=m.jsx(Xj,{value:i,onValueChange:s,placeholder:o,binding:d,bindingType:r,onAddNew:a,className:l}),e[2]=r,e[3]=l,e[4]=i,e[5]=a,e[6]=s,e[7]=o,e[8]=d,e[9]=h):h=e[9],h}function Xj({value:t,onValueChange:e,placeholder:n="Select a connection...",binding:r,bindingType:i,onAddNew:s,className:o}){const a=lt(),[l,u]=N.useState(!1),{installByBinding:c,isInstalling:d}=rm(),h=l||d,g=r?void 0:i||void 0,f=dd(r?{binding:r}:g?{filters:[{column:"app_name",value:g}]}:{}),p=fd(t&&!f.some(E=>E.id===t)?t:void 0),y=p?[p,...f]:f,x=i?.startsWith("@"),S=async()=>{if(x&&i){u(!0);try{const E=await c(i);E&&e(E.id)}catch(E){const j=E instanceof Error?E.message:String(E);vr.error(a("details.mcpConfigurationForm.failedToConnectMcp",{message:j}))}finally{u(!1)}return}s?.()};return m.jsxs(vd,{value:t,onValueChange:e,children:[m.jsx(Sd,{size:"sm",className:Ur("w-[200px]",o),children:m.jsx(wd,{placeholder:n})}),m.jsxs(jd,{children:[y.length===0?m.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:a("details.mcpConfigurationForm.noConnectionsFound")}):y.map(E=>m.jsx(Od,{value:E.id,children:m.jsxs("div",{className:"flex items-center gap-2",children:[E.icon?m.jsx("img",{src:E.icon,alt:E.title,className:"w-4 h-4 rounded"}):m.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:E.title.slice(0,1).toUpperCase()}),m.jsx("span",{children:E.title})]})},E.id)),(s||x)&&m.jsx("div",{className:"border-t border-border",children:m.jsx(Lr,{onClick:E=>{E.preventDefault(),E.stopPropagation(),S()},disabled:h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:h?m.jsxs(m.Fragment,{children:[m.jsx(fs,{size:16,className:"animate-spin"}),m.jsx("span",{children:a("details.mcpConfigurationForm.connecting")})]}):m.jsxs(m.Fragment,{children:[m.jsx(xd,{size:16}),m.jsx("span",{children:a("details.mcpConfigurationForm.customConnection")})]})})})]})]})}function Qj(t){const e=je.c(50),n=lt(),{schema:r,formData:i,title:s,description:o,registry:a}=t,l=a.formContext,u=s||"",c=s||"";if(Yj(r)){const g=r;let f;e[0]!==g?(f=Jj(g),e[0]=g,e[1]=f):f=e[1];const{bindingType:p,bindingSchema:y}=f,S=(l?.formData?.[u]?.value??i?.value)||"";let E;e[2]!==p||e[3]!==u||e[4]!==l||e[5]!==i?(E=F=>{const $={...i,value:F??"",...p&&{__type:p}};l?.onFieldChange(u,$)},e[2]=p,e[3]=u,e[4]=l,e[5]=i,e[6]=E):E=e[6];const j=E,b=tO;let v;e[7]!==c||e[8]!==u||e[9]!==s?(v=b(s||c||u),e[7]=c,e[8]=u,e[9]=s,e[10]=v):v=e[10];const w=v;if(p==="@deco/agent"){let F;e[11]!==w?(F=m.jsx("label",{className:"text-sm font-medium truncate block",children:w}),e[11]=w,e[12]=F):F=e[12];let $;e[13]!==o?($=o&&m.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o}),e[13]=o,e[14]=$):$=e[14];let k;e[15]!==F||e[16]!==$?(k=m.jsxs("div",{className:"flex-1 min-w-0",children:[F,$]}),e[15]=F,e[16]=$,e[17]=k):k=e[17];const M=S||void 0;let U;e[18]!==j||e[19]!==M?(U=m.jsx(Gj,{selectedVirtualMcpId:M,onVirtualMcpChange:j,variant:"bordered",placeholder:"Select Agent",className:"w-[200px] shrink-0"}),e[18]=j,e[19]=M,e[20]=U):U=e[20];let J;return e[21]!==k||e[22]!==U?(J=m.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[k,U]}),e[21]=k,e[22]=U,e[23]=J):J=e[23],J}let O;e[24]!==w?(O=m.jsx("label",{className:"text-sm font-medium truncate block",children:w}),e[24]=w,e[25]=O):O=e[25];let C;e[26]!==o?(C=o&&m.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o}),e[26]=o,e[27]=C):C=e[27];let A;e[28]!==O||e[29]!==C?(A=m.jsxs("div",{className:"flex-1 min-w-0",children:[O,C]}),e[28]=O,e[29]=C,e[30]=A):A=e[30];let _;e[31]!==w||e[32]!==n?(_=n("details.mcpConfigurationForm.selectPlaceholder",{title:w.toLowerCase()}),e[31]=w,e[32]=n,e[33]=_):_=e[33];let I;e[34]!==l?(I=()=>l?.onAddNew(),e[34]=l,e[35]=I):I=e[35];let T;e[36]!==y||e[37]!==p||e[38]!==S||e[39]!==j||e[40]!==_||e[41]!==I?(T=m.jsx(Zj,{bindingSchema:y,bindingType:p,currentValue:S,onValueChange:j,placeholder:_,onAddNew:I,className:"w-[200px] shrink-0"}),e[36]=y,e[37]=p,e[38]=S,e[39]=j,e[40]=_,e[41]=I,e[42]=T):T=e[42];let P;return e[43]!==A||e[44]!==T?(P=m.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[A,T]}),e[43]=A,e[44]=T,e[45]=P):P=e[45],P}let d;e[46]!==t.properties?(d=t.properties.map(eO),e[46]=t.properties,e[47]=d):d=e[47];let h;return e[48]!==d?(h=m.jsx("div",{className:"flex flex-col gap-4",children:d}),e[48]=d,e[49]=h):h=e[49],h}function eO(t){return t.content}function tO(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,nO)}function nO(t){return t.toUpperCase()}function rO(t){const e=je.c(13),{label:n,children:r,description:i,id:s,schema:o}=t;if(s.includes("__type")||s.includes("__binding"))return null;if(o.type==="object")return r;let a;e[0]!==s||e[1]!==n?(a=n&&m.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:s,children:n}),e[0]=s,e[1]=n,e[2]=a):a=e[2];let l;e[3]!==i?(l=i&&m.jsx("div",{className:"text-xs text-muted-foreground truncate",children:i}),e[3]=i,e[4]=l):l=e[4];let u;e[5]!==a||e[6]!==l?(u=m.jsxs("div",{className:"flex-1 min-w-0",children:[a,l]}),e[5]=a,e[6]=l,e[7]=u):u=e[7];let c;e[8]!==r?(c=m.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=c):c=e[9];let d;return e[10]!==u||e[11]!==c?(d=m.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[u,c]}),e[10]=u,e[11]=c,e[12]=d):d=e[12],d}const iO={ObjectFieldTemplate:Qj,FieldTemplate:rO};function sO(t){const e=je.c(19),{formKey:n,formState:r,onFormStateChange:i,stateSchema:s}=t,{org:o}=cs(),a=Zu();let l;e[0]!==i?(l=S=>{S.formData&&i(S.formData)},e[0]=i,e[1]=l):l=e[1];const u=l;let c;e[2]!==r||e[3]!==i?(c=(S,E)=>{const j={...r,[S]:E};i(j)},e[2]=r,e[3]=i,e[4]=c):c=e[4];const d=c;let h;e[5]!==a||e[6]!==o?(h=()=>{a({to:"/$org/settings/connections",params:{org:o.slug},search:{action:"create"}})},e[5]=a,e[6]=o,e[7]=h):h=e[7];const g=h;let f;e[8]!==r||e[9]!==g||e[10]!==d?(f={onFieldChange:d,formData:r,onAddNew:g},e[8]=r,e[9]=g,e[10]=d,e[11]=f):f=e[11];const p=f;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=m.jsx(m.Fragment,{}),e[12]=y):y=e[12];let x;return e[13]!==p||e[14]!==n||e[15]!==r||e[16]!==u||e[17]!==s?(x=m.jsx("div",{className:"flex flex-col h-full overflow-auto",children:m.jsx(Vj,{schema:s,validator:QS,formData:r,onChange:u,formContext:p,liveValidate:!1,showErrorList:!1,templates:iO,children:y},n)}),e[13]=p,e[14]=n,e[15]=r,e[16]=u,e[17]=s,e[18]=x):x=e[18],x}function oO(t){const e=je.c(14),{org:n}=cs();let r;e[0]!==t||e[1]!==n.id||e[2]!==n.slug?(r={connectionId:t,orgId:n.id,orgSlug:n.slug},e[0]=t,e[1]=n.id,e[2]=n.slug,e[3]=r):r=e[3];const i=od(r);let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={},e[4]=s):s=e[4];let o;e[5]!==i?(o={client:i,toolName:"MCP_CONFIGURATION",toolArguments:s,select:aO},e[5]=i,e[6]=o):o=e[6];const{data:a}=ad(o);let l;e[7]!==a.stateSchema?(l=a.stateSchema??{type:"object",properties:{}},e[7]=a.stateSchema,e[8]=l):l=e[8];const u=l;let c;e[9]!==a.scopes?(c=a.scopes??[],e[9]=a.scopes,e[10]=c):c=e[10];const d=c;let h;return e[11]!==d||e[12]!==u?(h={stateSchema:u,scopes:d},e[11]=d,e[12]=u,e[13]=h):h=e[13],h}function aO(t){return t.structuredContent??t}function lO(t){const e=je.c(17),{onAuthenticate:n,buttonText:r}=t,i=r===void 0?"Authenticate":r,s=lt();let o;e[0]!==s?(o=s("details.settingsTab.authenticationRequired"),e[0]=s,e[1]=o):o=e[1];let a;e[2]!==o?(a=m.jsx("h3",{className:"text-sm font-semibold",children:o}),e[2]=o,e[3]=a):a=e[3];let l;e[4]!==s?(l=s("details.settingsTab.oauthAuthenticationDescription"),e[4]=s,e[5]=l):l=e[5];let u;e[6]!==l?(u=m.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:l}),e[6]=l,e[7]=u):u=e[7];let c;e[8]!==a||e[9]!==u?(c=m.jsxs("div",{className:"flex flex-col gap-2",children:[a,u]}),e[8]=a,e[9]=u,e[10]=c):c=e[10];let d;e[11]!==i||e[12]!==n?(d=m.jsx(Lr,{onClick:n,size:"default",children:i}),e[11]=i,e[12]=n,e[13]=d):d=e[13];let h;return e[14]!==c||e[15]!==d?(h=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[c,d]})}),e[14]=c,e[15]=d,e[16]=h):h=e[16],h}function cO(t){const e=je.c(19),{hasReadme:n,onViewReadme:r}=t,i=lt();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(cd,{size:36,className:"text-muted-foreground"}),e[0]=s):s=e[0];let o;e[1]!==i?(o=i("details.settingsTab.manualAuthenticationRequired"),e[1]=i,e[2]=o):o=e[2];let a;e[3]!==o?(a=m.jsx("h3",{className:"text-sm font-semibold",children:o}),e[3]=o,e[4]=a):a=e[4];let l;e[5]!==i?(l=i("details.settingsTab.manualAuthenticationDescription"),e[5]=i,e[6]=l):l=e[6];let u;e[7]!==l?(u=m.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:l}),e[7]=l,e[8]=u):u=e[8];let c;e[9]!==a||e[10]!==u?(c=m.jsxs("div",{className:"flex flex-col gap-2",children:[a,u]}),e[9]=a,e[10]=u,e[11]=c):c=e[11];let d;e[12]!==n||e[13]!==r||e[14]!==i?(d=n&&r&&m.jsxs(Lr,{onClick:r,variant:"outline",size:"lg",children:[m.jsx(ld,{size:18,className:"mr-2"}),i("details.settingsTab.viewReadme")]}),e[12]=n,e[13]=r,e[14]=i,e[15]=d):d=e[15];let h;return e[16]!==c||e[17]!==d?(h=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[s,c,d]})}),e[16]=c,e[17]=d,e[18]=h):h=e[18],h}function uO(){const t=je.c(12),e=lt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("details.settingsTab.serverError"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==r?(i=m.jsx("h3",{className:"text-lg font-semibold",children:r}),t[3]=r,t[4]=i):i=t[4];let s;t[5]!==e?(s=e("details.settingsTab.serverErrorDescription"),t[5]=e,t[6]=s):s=t[6];let o;t[7]!==s?(o=m.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:s}),t[7]=s,t[8]=o):o=t[8];let a;return t[9]!==i||t[10]!==o?(a=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[n,m.jsxs("div",{className:"flex flex-col gap-2",children:[i,o]})]})}),t[9]=i,t[10]=o,t[11]=a):a=t[11],a}function dO(t){const e=je.c(19),{connection:n,form:r}=t,i=lt(),{stateSchema:s}=oO(n.id);let o;e[0]!==r.control?(o={control:r.control,name:"configuration_state"},e[0]=r.control,e[1]=o):o=e[1];const a=Qu(o);let l;e[2]!==r?(l=g=>{r.setValue("configuration_state",g,{shouldDirty:!0})},e[2]=r,e[3]=l):l=e[3];const u=l;if(!(s&&s.properties&&typeof s.properties=="object"&&Object.keys(s.properties).length>0)){let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e[4]=g):g=e[4];let f;e[5]!==i?(f=i("details.settingsTab.serverAllSet"),e[5]=i,e[6]=f):f=e[6];let p;e[7]!==i?(p=i("details.settingsTab.noAdditionalConfigurationNeeded"),e[7]=i,e[8]=p):p=e[8];let y;return e[9]!==f||e[10]!==p?(y=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsx(tl,{image:g,title:f,description:p})}),e[9]=f,e[10]=p,e[11]=y):y=e[11],y}let d;e[12]!==a?(d=a??{},e[12]=a,e[13]=d):d=e[13];let h;return e[14]!==n.id||e[15]!==u||e[16]!==s||e[17]!==d?(h=m.jsx("div",{className:"flex-1 overflow-auto",children:m.jsx(sO,{formKey:n.id,stateSchema:s,formState:d,onFormStateChange:u})}),e[14]=n.id,e[15]=u,e[16]=s,e[17]=d,e[18]=h):h=e[18],h}function fO(t){const e=je.c(18),n=lt(),{connection:r,form:i,hasMcpBinding:s,isMCPAuthenticated:o,supportsOAuth:a,isServerError:l,onAuthenticate:u,onViewReadme:c}=t,h=!!r?.metadata?.repository?.url;if(!o){if(l){let y;return e[0]===Symbol.for("react.memo_cache_sentinel")?(y=m.jsx(uO,{}),e[0]=y):y=e[0],y}if(a){let y;return e[1]!==u?(y=m.jsx(lO,{onAuthenticate:u}),e[1]=u,e[2]=y):y=e[2],y}let p;return e[3]!==h||e[4]!==c?(p=m.jsx(cO,{hasReadme:h,onViewReadme:c}),e[3]=h,e[4]=c,e[5]=p):p=e[5],p}if(!s){let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e[6]=p):p=e[6];let y;e[7]!==n?(y=n("details.settingsTab.serverAllSet"),e[7]=n,e[8]=y):y=e[8];let x;e[9]!==n?(x=n("details.settingsTab.noAdditionalConfigurationNeeded"),e[9]=n,e[10]=x):x=e[10];let S;return e[11]!==y||e[12]!==x?(S=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsx(tl,{image:p,title:y,description:x})}),e[11]=y,e[12]=x,e[13]=S):S=e[13],S}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsx(fs,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=g):g=e[14];let f;return e[15]!==r||e[16]!==i?(f=m.jsx(Xu,{children:m.jsx(N.Suspense,{fallback:g,children:m.jsx(dO,{connection:r,form:i})})}),e[15]=r,e[16]=i,e[17]=f):f=e[17],f}function WO(t){const e=je.c(2);let n;return e[0]!==t?(n=m.jsx("div",{className:"flex-1 flex h-full",children:m.jsx(fO,{...t})}),e[0]=t,e[1]=n):n=e[1],n}export{cO as M,lO as O,WO as S,qO as V,VO as a,BO as b,LO as c};
24
+ `,x),j=f.slice(x,E===-1?void 0:E+1),b=f[x];if((b===">"||b==="#"||b==="|"||b==="`"||b==="~"||b==="*"||b==="-"||b==="_"||b===" ")&&qa(s,j)||(y+=j,E===-1||!j.trim()))break;x=E+1}const S=Kn(y);return S===""?null:[y,,S]}),u:3,i:j1},22:{t:["["],o:ht(Gv),u:0,i:f=>(c[f[1]]={target:f[2],title:f[4]},{})},23:{t:["!["],o:br(Yv),u:0,i:f=>({alt:f[1]?Ge(f[1]):void 0,ref:f[2]})},24:{t:f=>f[0]==="["&&!Ke(f,"]("),o:ht(Jv),u:0,i:(f,p,y)=>({children:p(f[1],y),fallbackChildren:f[0],ref:f[2]})},25:{t:["|"],o:it(ka),u:1,i:b1},27:{o:xt(function(f,p){let y;return rs(f,":")&&(y=r1.exec(f)),y||o1.exec(f)}),u:4,i(f){const p=f[0];return{text:Ke(p,"&")?p.replace(Bv,(y,x)=>e.namedCodesToUnicode[x]||y):p}}},34:{t:["*","_","~","="],o:xt(wv),u:2,i:(f,p,y)=>({children:p(f[2],y),tag:f[1]})},28:{t:["\\"],o:br(i1),u:1,i:f=>({text:f[1],type:"27"})}};e.disableParsingRawHTML===!0&&(delete d[11],delete d[13]);const h=(function(f){var p=Object.keys(f);function y(x,S){var E=[];if(S.prevCapture=S.prevCapture||"",x.trim())for(;x;)for(var j=0;j<p.length;){var b=p[j],v=f[b];if(!v.t||g1(x,S,v.t)){var w=v.o(x,S);if(w&&w[0]){x=x.substring(w[0].length);var O=v.i(w,y,S);S.prevCapture+=w[0],O.type||(O.type=b),E.push(O);break}j++}else j++}return S.prevCapture="",E}return p.sort(function(x,S){return f[x].u-f[S].u||(x<S?-1:1)}),function(x,S){return y((function(E){return E.replace($v,`
25
+ `).replace(kv,"").replace(Xv," ")})(x),S)}})(d),g=(function(f,p,y,x,S){function E(j){return Array.isArray(j)?j.map(b=>"text"in b?b.text:""):"text"in j?j.text:""}return function j(b,v={}){const w=(v.renderDepth||0)+1;if(w>2500)return E(b);v.renderDepth=w;try{if(Array.isArray(b)){const C=v.key,A=[];let _=!1;for(let I=0;I<b.length;I++){v.key=I;const T=j(b[I],v),P=Ua(T);P&&_?A[A.length-1]+=T:T!==null&&A.push(T),_=P}return v.key=C,v.renderDepth=w-1,A}const O=(function(C,A,_){const I=()=>(function(T,P,F,$,k,M,U){switch(T.type){case"0":{const J={key:F.key};return T.alert&&(J.className="markdown-alert-"+M(T.alert.toLowerCase(),Pn),T.children.unshift({attrs:{},children:[{type:"27",text:T.alert}],noInnerParse:!0,type:"11",tag:"header"})),$("blockquote",J,P(T.children,F))}case"1":return $("br",{key:F.key});case"2":return $("hr",{key:F.key});case"3":return $("pre",{key:F.key},$("code",Je({},T.attrs,{className:T.lang?"lang-"+T.lang:""}),T.text));case"5":return $("code",{key:F.key},T.text);case"7":return $("a",{key:F.key,href:k(T.target,"a","href")},$("sup",{key:F.key},T.text));case"8":return $("input",{checked:T.completed,key:F.key,readOnly:!0,type:"checkbox"});case"9":return $("h"+T.level,{id:T.id,key:F.key},P(T.children,F));case"11":return $(T.tag,Je({key:F.key},T.attrs),T.text||(T.children?P(T.children,F):""));case"13":return $(T.tag,Je({},T.attrs,{key:F.key}));case"14":return $("img",{key:F.key,alt:T.alt||void 0,title:T.title||void 0,src:k(T.target,"img","src")});case"15":return $("a",{key:F.key,href:k(T.target,"a","href"),title:T.title},P(T.children,F));case"23":return U[T.ref]?$("img",{key:F.key,alt:T.alt,src:k(U[T.ref].target,"img","src"),title:U[T.ref].title}):null;case"24":return U[T.ref]?$("a",{key:F.key,href:k(U[T.ref].target,"a","href"),title:U[T.ref].title},P(T.children,F)):$("span",{key:F.key},T.fallbackChildren);case"25":{const J=T;return $("table",{key:F.key},$("thead",null,$("tr",null,J.header.map(function(ae,fe){return $("th",{key:fe,style:Ba(J,fe)},P(ae,F))}))),$("tbody",null,J.cells.map(function(ae,fe){return $("tr",{key:fe},ae.map(function(ye,L){return $("td",{key:L,style:Ba(J,L)},P(ye,F))}))})))}case"27":return T.text;case"34":return $(T.tag,{key:F.key},P(T.children,F));case"20":case"30":return $(T.ordered?"ol":"ul",{key:F.key,start:T.type==="20"?T.start:void 0},T.items.map(function(J,ae){return $("li",{key:ae},P(J,F))}));case"19":return`
26
+ `;case"21":return $("p",{key:F.key},P(T.children,F));default:return null}})(C,A,_,p,y,x,S);return f?f(I,C,A,_):I()})(b,j,v);return v.renderDepth=w-1,O}catch(O){if(O instanceof RangeError&&O.message.includes("Maximum call stack"))return E(b);throw O}}})(e.renderRule,a,r,n,c);return l(t)}const mr=t=>{let{children:e,options:n}=t,r=(function(i,s){if(i==null)return{};var o={};for(var a in i)if({}.hasOwnProperty.call(i,a)){if(s.indexOf(a)!==-1)continue;o[a]=i[a]}return o})(t,jv);return E1(e??"",Je({},n,{wrapperProps:Je({},n?.wrapperProps,r)}))},Zc=Symbol("remove-this-key"),za=Symbol("reset");function A1(t,e){return Array.isArray(t.required)&&t.required.indexOf(e)!==-1}function C1(t,e){switch(e){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return t(G.NewStringDefault)}}function _1(t){const{fieldPathId:e,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:o,onChange:a,onBlur:l,onFocus:u,disabled:c,readonly:d,required:h,hideError:g,propertyName:f,handleKeyRename:p,handleRemoveProperty:y,addedByAdditionalProperties:x}=t,[S,E]=N.useState(!1),{globalFormOptions:j,fields:b}=r,{SchemaField:v}=b,w=Kt(Be(f,j,e.path)),O=N.useCallback((I,T,P,F)=>{I===void 0&&x&&(I=""),a(I,T,P,F)},[a,x]),C=N.useCallback(I=>{f!==I&&E(!0),p(f,I)},[f,p]),A=N.useCallback(I=>{const{target:{value:T}}=I;C(T)},[C]),_=N.useCallback(()=>{y(f)},[f,y]);return m.jsx(v,{name:f,required:h,schema:n,uiSchema:i,errorSchema:s,fieldPathId:w,formData:o,wasPropertyKeyModified:S,onKeyRename:C,onKeyRenameBlur:A,onRemoveProperty:_,onChange:O,onBlur:l,onFocus:u,registry:r,disabled:c,readonly:d,hideError:g})}function I1(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,required:a=!1,disabled:l,readonly:u,hideError:c,onBlur:d,onFocus:h,onChange:g,registry:f,title:p}=t,{fields:y,schemaUtils:x,translateString:S,globalUiOptions:E}=f,{OptionalDataControlsField:j}=y,b=N.useRef(r);b.current=r;const v=x.retrieveSchema(e,r,!0),w=B(n,E),{properties:O={}}=v,C=t.childFieldPathId??s,A=N.useRef({previousKey:"",currentKey:void 0}),_=w.title??v.title??p??o,I=w.description??v.description,T=fr(f,v,a,n),P=Sn(r);let F=[];const $=N.useCallback((L,le)=>{const{duplicateKeySuffixSeparator:te="-"}=B(n,E);let H=0,K=L;for(;X(le,K);)K=`${L}${te}${++H}`;return K},[n,E]),k=N.useCallback(()=>{if(!(v.additionalProperties||v.patternProperties))return;const{translateString:L}=f,le={...r},te=$("newKey",le);if(v.patternProperties)ce(le,te,null);else{let H,K,z;if(ne(v.additionalProperties)){H=v.additionalProperties.type,K=v.additionalProperties.const,z=v.additionalProperties.default;let oe=v.additionalProperties;if(ue in oe){const{schemaUtils:Oe}=f;oe=Oe.retrieveSchema({[ue]:oe[ue]},r),H=oe.type,K=oe.const,z=oe.default}!H&&(ee in oe||W in oe)&&(H="object")}const re=K??z??C1(L,H);ce(le,te,re)}A.current.previousKey===te&&(A.current.currentKey=te,A.current.previousKey=$(te,le)),g(le,C.path)},[r,g,f,C,$,v]),M=N.useCallback((L,le)=>{if(L!==le){const te=b.current,H=$(le,te),K={...te},z={[L]:H},re=Object.keys(K).map(Oe=>({[z[Oe]||Oe]:K[Oe]})),oe=Object.assign({},...re);b.current=oe,L!==A.current.currentKey&&(A.current.previousKey=L),A.current.currentKey=H,g(oe,C.path)}},[g,C,$]),U=N.useCallback(L=>{g(Zc,[...C.path,L])},[g,C]),J=N.useCallback(L=>A.current.currentKey===L?A.current.previousKey:L,[]);if(!T||P)try{const L=Object.keys(O);F=wx(L,w.order)}catch(L){return m.jsxs("div",{children:[m.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:m.jsx(mr,{options:{disableParsingRawHTML:!0},children:S(G.InvalidObjectField,[o||"root",L.message])})}),m.jsx("pre",{children:JSON.stringify(v)})]})}const ae=V("ObjectFieldTemplate",f,w),fe=T?m.jsx(j,{...t,fieldPathId:C,schema:v}):void 0,ye={title:w.label===!1?"":_,description:w.label===!1?void 0:I,properties:F.map(L=>{const le=X(v,[se,L,ot]),te=le?n.additionalProperties:n[L],H=B(te).widget==="hidden";return{content:m.jsx(_1,{propertyName:L,required:A1(v,L),schema:D(v,[se,L],{}),uiSchema:te,errorSchema:D(i,[L]),fieldPathId:C,formData:D(r,[L]),handleKeyRename:M,handleRemoveProperty:U,addedByAdditionalProperties:le,onChange:g,onBlur:d,onFocus:h,registry:f,disabled:l,readonly:u,hideError:c},J(L)),name:L,readonly:u,disabled:l,required:a,hidden:H}}),readonly:u,disabled:l,required:a,fieldPathId:s,uiSchema:n,errorSchema:i,schema:v,formData:r,registry:f,optionalDataControl:fe,className:T?"rjsf-optional-object-field":void 0};return m.jsx(ae,{...ye,onAddProperty:k})}function T1(t){const{schema:e,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:o,errorSchema:a,fieldPathId:l,registry:u}=t,{globalUiOptions:c={},schemaUtils:d,translateString:h}=u,g=B(n,c),f=V("OptionalDataControlsTemplate",u,g),p=Sn(r);let y,x,S,E;if(i||s)y=ji(l,"Msg"),x=p?void 0:h(G.OptionalObjectEmptyMsg);else{const j=p?G.OptionalObjectRemove:G.OptionalObjectAdd;x=h(j),p?(y=ji(l,"Remove"),E=()=>o(void 0,l.path,a)):(y=ji(l,"Add"),S=()=>{let b=d.getDefaultFormState(e,r,"excludeObjectChildren");b===void 0&&(b=Le(e)==="array"?[]:{}),o(b,l.path,a)})}return x&&m.jsx(f,{id:y,registry:u,schema:e,uiSchema:n,label:x,onAddClick:S,onRemoveClick:E})}const N1={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function P1(t,e,n){const r=e.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=Le(t),o=Array.isArray(s)?s[0]:s||"",a=t.$id;let l=N1[o];return a&&a in i&&(l=a),!l&&(t.anyOf||t.oneOf)?()=>null:l in i?i[l]:i.FallbackField}function F1(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:o,onChange:a,onKeyRename:l,onKeyRenameBlur:u,onRemoveProperty:c,required:d=!1,registry:h,wasPropertyKeyModified:g=!1}=t,{schemaUtils:f,globalFormOptions:p,globalUiOptions:y,fields:x}=h,{AnyOfField:S,OneOfField:E}=x,j=jx(e,r,h),b=B(j,y),v=V("FieldTemplate",h,b),w=V("DescriptionFieldTemplate",h,b),O=V("FieldHelpTemplate",h,b),C=V("FieldErrorTemplate",h,b),A=f.retrieveSchema(e,i),_=n[de],I=N.useCallback((On,En,It,_u)=>a(On,En,It,_u||_),[_,a]),T=P1(A,b,h),P=!!(b.disabled??t.disabled),F=!!(b.readonly??(t.readonly||t.schema.readOnly||A.readOnly)),$=b.hideError,k=$===void 0?t.hideError:!!$,M=!!(b.autofocus??t.autofocus);if(Object.keys(A).length===0)return null;let U=f.getDisplayLabel(A,j,y);const J=b.field&&b.fieldReplacesAnyOrOneOf===!0;let ae,fe,ye={fieldPathId:n};if((ee in A||W in A)&&!J&&!f.isSelect(A)){A[ee]?(ae=S,fe=A[ee].map(It=>f.retrieveSchema(ne(It)?It:{},i))):A[W]&&(ae=E,fe=A[W].map(It=>f.retrieveSchema(ne(It)?It:{},i)));const On=fr(h,A,d,j),En=Sn(i);U=U&&(!On||En),ye={childFieldPathId:n,fieldPathId:Be("XxxOf",p,n)}}const{__errors:L,...le}=s||{},te=un(j,["ui:classNames","classNames","ui:style"]);vt in te&&(te[vt]=un(te[vt],["classNames","style"]));const H=m.jsx(T,{...t,onChange:I,...ye,schema:A,uiSchema:te,disabled:P,readonly:F,hideError:k,autofocus:M,errorSchema:le,rawErrors:L}),K=n[de];let z;g?z=o:z=ot in A?o:b.title||t.schema.title||A.title||t.title||o;const re=b.description||t.schema.description||A.description||"",oe=b.help,Oe=b.widget==="hidden",Ee=["rjsf-field",`rjsf-field-${Le(A)}`];!k&&L&&L.length>0&&Ee.push("rjsf-field-error"),b.classNames&&Ee.push(b.classNames);const xe=m.jsx(O,{help:oe,fieldPathId:n,schema:A,uiSchema:j,hasErrors:!k&&L&&L.length>0,registry:h}),$e=k||ae&&!f.isSelect(A)?void 0:m.jsx(C,{errors:L,errorSchema:s,fieldPathId:n,schema:A,uiSchema:j,registry:h}),mt={description:m.jsx(w,{id:Ht(K),description:re,schema:A,uiSchema:j,registry:h}),rawDescription:re,help:xe,rawHelp:typeof oe=="string"?oe:void 0,errors:$e,rawErrors:k?void 0:L,fieldPathId:n,id:K,label:z,hidden:Oe,onChange:a,onKeyRename:l,onKeyRenameBlur:u,onRemoveProperty:c,required:d,disabled:P,readonly:F,hideError:k,displayLabel:U,classNames:Ee.join(" ").trim(),style:b.style,formData:i,schema:A,uiSchema:j,registry:h};return m.jsx(v,{...mt,children:m.jsxs(m.Fragment,{children:[H,ae&&m.jsx(ae,{name:o,disabled:P,readonly:F,hideError:k,errorSchema:s,formData:i,fieldPathId:n,onBlur:t.onBlur,onChange:t.onChange,onFocus:t.onFocus,options:fe,registry:h,required:d,schema:A,uiSchema:j})]})})}class $1 extends N.Component{shouldComponentUpdate(e){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return Dc(this,e,this.state,r)}render(){return m.jsx(F1,{...this.props})}}function D1(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,required:o,disabled:a=!1,readonly:l=!1,autofocus:u=!1,onChange:c,onBlur:d,onFocus:h,registry:g,rawErrors:f,hideError:p,title:y}=t,{title:x,format:S}=e,{widgets:E,schemaUtils:j,globalUiOptions:b}=g,v=j.isSelect(e)?mn(e,r):void 0;let w=v?"select":"text";S&&xx(e,S,E)&&(w=S);const{widget:O=w,placeholder:C="",title:A,..._}=B(r),I=j.getDisplayLabel(e,r,b),T=A??y??x??n,P=tt(e,O,E),F=N.useCallback(($,k,M)=>c($,i.path,k,M),[c,i]);return m.jsx(P,{options:{..._,enumOptions:v},schema:e,uiSchema:r,id:i.$id,name:n,label:T,hideLabel:!I,hideError:p,value:s,onChange:F,onBlur:d,onFocus:h,required:o,disabled:a,readonly:l,autofocus:u,registry:g,placeholder:C,rawErrors:f,htmlName:i.name})}function R1(t){const{formData:e,onChange:n,fieldPathId:r}=t;return N.useEffect(()=>{e===void 0&&n(null,r.path)},[r,e,n]),null}function k1(){return{AnyOfField:Aa,ArrayField:Wx,BooleanField:Hx,FallbackField:Jx,LayoutGridField:Gs,LayoutHeaderField:gv,LayoutMultiSchemaField:yv,NumberField:vv,ObjectField:I1,OneOfField:Aa,OptionalDataControlsField:T1,SchemaField:$1,StringField:D1,NullField:R1}}function M1(t){const{fieldPathId:e,description:n,registry:r,schema:i,uiSchema:s}=t,o=B(s,r.globalUiOptions),{label:a=!0}=o;if(!n||!a)return null;const l=V("DescriptionFieldTemplate",r,o);return m.jsx(l,{id:Ht(e),description:n,schema:i,uiSchema:s,registry:r})}function U1(t){const{children:e,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:o,registry:a,uiSchema:l}=t,u=B(l),c=V("ArrayFieldItemButtonsTemplate",a,u),d={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},h=s?31:9,g={display:"flex",alignItems:i?"center":"baseline"},f={display:"flex",justifyContent:"flex-end",marginTop:i?`${h}px`:0};return m.jsxs("div",{className:n,style:g,children:[m.jsx("div",{className:o?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:e}),o&&m.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:m.jsx("div",{className:"btn-group",style:f,children:m.jsx(c,{...r,style:d})})})]})}function L1(t){const{disabled:e,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:o,onCopyItem:a,onRemoveItem:l,onMoveDownItem:u,onMoveUpItem:c,readonly:d,registry:h,uiSchema:g}=t,{CopyButton:f,MoveDownButton:p,MoveUpButton:y,RemoveButton:x}=h.templates.ButtonTemplates;return m.jsxs(m.Fragment,{children:[(i||r)&&m.jsx(y,{id:Qe(o,"moveUp"),className:"rjsf-array-item-move-up",disabled:e||d||!i,onClick:c,uiSchema:g,registry:h}),(i||r)&&m.jsx(p,{id:Qe(o,"moveDown"),className:"rjsf-array-item-move-down",disabled:e||d||!r,onClick:u,uiSchema:g,registry:h}),n&&m.jsx(f,{id:Qe(o,"copy"),className:"rjsf-array-item-copy",disabled:e||d,onClick:a,uiSchema:g,registry:h}),s&&m.jsx(x,{id:Qe(o,"remove"),className:"rjsf-array-item-remove",disabled:e||d,onClick:l,uiSchema:g,registry:h})]})}function B1(t){const{canAdd:e,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:o,optionalDataControl:a,onAddClick:l,readonly:u,registry:c,required:d,schema:h,title:g}=t,f=B(s),p=V("ArrayFieldDescriptionTemplate",c,f),y=V("ArrayFieldTitleTemplate",c,f),x=!u&&!r,{ButtonTemplates:{AddButton:S}}=c.templates;return m.jsxs("fieldset",{className:n,id:i.$id,children:[m.jsx(y,{fieldPathId:i,title:f.title||g,required:d,schema:h,uiSchema:s,registry:c,optionalDataControl:x?a:void 0}),m.jsx(p,{fieldPathId:i,description:f.description||h.description,schema:h,uiSchema:s,registry:c}),x?void 0:a,m.jsx("div",{className:"row array-item-list",children:o}),e&&m.jsx(S,{id:Qe(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:r||u,uiSchema:s,registry:c})]})}function V1(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,optionalDataControl:a}=t,l=B(i,o.globalUiOptions),{label:u=!0}=l;if(!n||!u)return null;const c=V("TitleFieldTemplate",o,l);return m.jsx(c,{id:ei(e),title:n,required:s,schema:r,uiSchema:i,registry:o,optionalDataControl:a})}function Xc(t){const{id:e,schema:n}=t,{examples:r,default:i}=n;return Array.isArray(r)?m.jsx("datalist",{id:Qr(e),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(s=>m.jsx("option",{value:s},String(s)))},`datalist_${e}`):null}function q1(t){const{id:e,name:n,htmlName:r,value:i,readonly:s,disabled:o,autofocus:a,onBlur:l,onFocus:u,onChange:c,onChangeOverride:d,options:h,schema:g,uiSchema:f,registry:p,rawErrors:y,type:x,hideLabel:S,hideError:E,...j}=t,{ClearButton:b}=p.templates.ButtonTemplates;if(!e)throw console.log("No id for",t),new Error(`no id for props ${JSON.stringify(t)}`);const v={...j,...Nc(g,x,h)};let w;v.type==="number"||v.type==="integer"?w=i||i===0?i:"":w=i??"";const O=N.useCallback(({target:{value:I}})=>c(I===""?h.emptyValue:I),[c,h]),C=N.useCallback(({target:I})=>l(e,I&&I.value),[l,e]),A=N.useCallback(({target:I})=>u(e,I&&I.value),[u,e]),_=N.useCallback(I=>{I.preventDefault(),I.stopPropagation(),c(h.emptyValue??"")},[c,h.emptyValue]);return m.jsxs(m.Fragment,{children:[m.jsx("input",{id:e,name:r||e,className:"form-control",readOnly:s,disabled:o,autoFocus:a,value:w,...v,list:g.examples?Qr(e):void 0,onChange:d||O,onBlur:C,onFocus:A,"aria-describedby":Fe(e,!!g.examples)}),h.allowClearTextInputs&&!s&&!o&&w&&m.jsx(b,{registry:p,onClick:_}),m.jsx(Xc,{id:e,schema:g})]})}function z1({uiSchema:t}){const{submitText:e,norender:n,props:r={}}=Pc(t);return n?null:m.jsx("div",{children:m.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:e})})}function _t(t){const{iconType:e="default",icon:n,className:r,uiSchema:i,registry:s,...o}=t;return m.jsx("button",{type:"button",className:`btn btn-${e} ${r}`,...o,children:m.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function W1(t){const{registry:{translateString:e}}=t;return m.jsx(_t,{title:e(G.CopyButton),...t,icon:"copy"})}function H1(t){const{registry:{translateString:e}}=t;return m.jsx(_t,{title:e(G.MoveDownButton),...t,icon:"arrow-down"})}function K1(t){const{registry:{translateString:e}}=t;return m.jsx(_t,{title:e(G.MoveUpButton),...t,icon:"arrow-up"})}function G1(t){const{registry:{translateString:e}}=t;return m.jsx(_t,{title:e(G.RemoveButton),...t,iconType:"danger",icon:"remove"})}function Y1({id:t,className:e,onClick:n,disabled:r,registry:i,...s}){const{translateString:o}=i;return m.jsx(_t,{id:t,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:o(G.ClearButton),onClick:n,disabled:r,registry:i,...s})}function J1({id:t,className:e,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return m.jsx("div",{className:"row",children:m.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${e}`,children:m.jsx(_t,{id:t,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(G.AddButton),onClick:n,disabled:r,registry:i})})})}function Z1(){return{SubmitButton:z1,AddButton:J1,CopyButton:W1,MoveDownButton:H1,MoveUpButton:K1,RemoveButton:G1,ClearButton:Y1}}const Qc=Vs();function Xs({description:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return B(n,r).enableMarkdownInDescription&&typeof t=="string"?m.jsx(mr,{options:{disableParsingRawHTML:!0},"data-testid":Qc.markdown,children:t}):t}Xs.TEST_IDS=Qc;function X1(t){const{id:e,description:n,registry:r,uiSchema:i}=t;return n?m.jsx("div",{id:e,className:"field-description",children:m.jsx(Xs,{description:n,registry:r,uiSchema:i})}):null}function Q1({errors:t,registry:e}){const{translateString:n}=e;return m.jsxs("div",{className:"panel panel-danger errors",children:[m.jsx("div",{className:"panel-heading",children:m.jsx("h3",{className:"panel-title",children:n(G.ErrorsLabel)})}),m.jsx("ul",{className:"list-group",children:t.map((r,i)=>m.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function eS(t){const{schema:e,registry:n,typeSelector:r,schemaField:i}=t,s=V("MultiSchemaFieldTemplate",n);return m.jsx(s,{selector:r,optionSchemaField:i,schema:e,registry:n})}const tS="*";function eu(t){const{label:e,required:n,id:r}=t;return e?m.jsxs("label",{className:"control-label",htmlFor:r,children:[e,n&&m.jsx("span",{className:"required",children:tS})]}):null}function nS(t){const{id:e,label:n,children:r,errors:i,help:s,description:o,hidden:a,required:l,displayLabel:u,registry:c,uiSchema:d}=t,h=B(d),g=V("WrapIfAdditionalTemplate",c,h);if(a)return m.jsx("div",{className:"hidden",children:r});const f=h.widget==="checkbox";return m.jsxs(g,{...t,children:[u&&!f&&m.jsx(eu,{label:n,required:l,id:e}),u&&o?o:null,r,i,s]})}function rS(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=qs(n);return m.jsx("div",{children:m.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:e.filter(i=>!!i).map((i,s)=>m.jsx("li",{className:"text-danger",children:i},s))})})}const tu=Vs();function Qs({help:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return B(n,r).enableMarkdownInHelp&&typeof t=="string"?m.jsx(mr,{options:{disableParsingRawHTML:!0},"data-testid":tu.markdown,children:t}):t}Qs.TEST_IDS=tu;function iS(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i}=t;return n?m.jsx("div",{id:zs(e),className:"help-block",children:m.jsx(Qs,{help:n,registry:i,uiSchema:r})}):null}function sS(t){const{children:e,column:n,className:r,...i}=t;return m.jsx("div",{className:r,...i,children:e})}function oS(t){const{selector:e,optionSchemaField:n}=t;return m.jsxs("div",{className:"panel panel-default panel-body",children:[m.jsx("div",{className:"form-group",children:e}),n]})}function aS(t){const{className:e,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:o,optionalDataControl:a,properties:l,readonly:u,registry:c,required:d,schema:h,title:g,uiSchema:f}=t,p=B(f),y=V("TitleFieldTemplate",c,p),x=V("DescriptionFieldTemplate",c,p);if((h.oneOf||h.anyOf)&&!h.properties&&l.length===0)return null;const E=!u&&!r,{ButtonTemplates:{AddButton:j}}=c.templates;return m.jsxs("fieldset",{className:e,id:s.$id,children:[g&&m.jsx(y,{id:ei(s),title:g,required:d,schema:h,uiSchema:f,registry:c,optionalDataControl:E?a:void 0}),n&&m.jsx(x,{id:Ht(s),description:n,schema:h,uiSchema:f,registry:c}),E?void 0:a,l.map(b=>b.content),dl(h,f,i)&&m.jsx(j,{id:Qe(s,"add"),className:"rjsf-object-property-expand",onClick:o,disabled:r||u,uiSchema:f,registry:c})]})}function lS(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?m.jsx(_t,{id:e,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?m.jsx(_t,{id:e,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):m.jsx("em",{id:e,children:r})}const cS="*";function uS(t){const{id:e,title:n,required:r,optionalDataControl:i}=t;return m.jsxs("legend",{id:e,children:[n,r&&m.jsx("span",{className:"required",children:cS}),i&&m.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function dS(t){const{schema:e,fieldPathId:n,reason:r,registry:i}=t,{translateString:s}=i;let o=G.UnsupportedField;const a=[];return n&&n.$id&&(o=G.UnsupportedFieldWithId,a.push(n.$id)),r&&(o=o===G.UnsupportedField?G.UnsupportedFieldWithReason:G.UnsupportedFieldWithIdAndReason,a.push(r)),m.jsxs("div",{className:"unsupported-field",children:[m.jsx("p",{children:m.jsx(mr,{options:{disableParsingRawHTML:!0},children:s(o,a)})}),e&&m.jsx("pre",{children:JSON.stringify(e,null,2)})]})}function fS(t){const{id:e,classNames:n,style:r,disabled:i,displayLabel:s,label:o,onKeyRenameBlur:a,onRemoveProperty:l,rawDescription:u,readonly:c,required:d,schema:h,hideError:g,rawErrors:f,children:p,uiSchema:y,registry:x}=t,{templates:S,translateString:E}=x,{RemoveButton:j}=S.ButtonTemplates,b=E(G.KeyLabel,[o]),v=ot in h,w=!!u,O=["form-group",n];!g&&f&&f.length>0&&O.push("has-error has-danger");const C=O.join(" ").trim();if(!v)return m.jsx("div",{className:C,style:r,children:p});const A=w?46:26;return m.jsx("div",{className:C,style:r,children:m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-xs-5 form-additional",children:m.jsxs("div",{className:"form-group",children:[s&&m.jsx(eu,{label:b,required:d,id:`${e}-key`}),s&&u&&m.jsx("div",{children:" "}),m.jsx("input",{className:"form-control",type:"text",id:`${e}-key`,onBlur:a,defaultValue:o},o)]})}),m.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),m.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${A}px`:void 0},children:m.jsx(j,{id:Qe(e,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||c,onClick:l,uiSchema:y,registry:x})})]})})}function mS(){return{ArrayFieldDescriptionTemplate:M1,ArrayFieldItemTemplate:U1,ArrayFieldItemButtonsTemplate:L1,ArrayFieldTemplate:B1,ArrayFieldTitleTemplate:V1,ButtonTemplates:Z1(),BaseInputTemplate:q1,DescriptionFieldTemplate:X1,ErrorListTemplate:Q1,FallbackFieldTemplate:eS,FieldTemplate:nS,FieldErrorTemplate:rS,FieldHelpTemplate:iS,GridTemplate:sS,MultiSchemaFieldTemplate:oS,ObjectFieldTemplate:aS,OptionalDataControlsTemplate:lS,TitleFieldTemplate:uS,UnsupportedFieldTemplate:dS,WrapIfAdditionalTemplate:fS}}function hS(t){const{disabled:e=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:o,registry:a,onBlur:l,onFocus:u}=t,{translateString:c}=a,{elements:d,handleChange:h,handleClear:g,handleSetNow:f}=Cx(t);return m.jsxs("ul",{className:"list-inline",children:[d.map((p,y)=>m.jsx("li",{className:"list-inline-item",children:m.jsx(Ax,{rootId:s,name:o,select:h,...p,disabled:e,readonly:n,registry:a,onBlur:l,onFocus:u,autofocus:r&&y===0})},y)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&m.jsx("li",{className:"list-inline-item",children:m.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:f,children:c(G.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&m.jsx("li",{className:"list-inline-item",children:m.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:g,children:c(G.ClearLabel)})})]})}function pS({time:t=!0,...e}){const{AltDateWidget:n}=e.registry.widgets;return m.jsx(n,{time:t,...e})}function gS({schema:t,uiSchema:e,options:n,id:r,value:i,disabled:s,readonly:o,label:a,hideLabel:l,autofocus:u=!1,onBlur:c,onFocus:d,onChange:h,registry:g,htmlName:f}){const p=V("DescriptionFieldTemplate",g,n),y=Wn(t),x=N.useCallback(w=>h(w.target.checked),[h]),S=N.useCallback(w=>c(r,w.target.checked),[c,r]),E=N.useCallback(w=>d(r,w.target.checked),[d,r]),v=B(e).widget==="checkbox"?void 0:n.description??t.description;return m.jsxs("div",{className:`checkbox ${s||o?"disabled":""}`,children:[!l&&v&&m.jsx(p,{id:Ht(r),description:v,schema:t,uiSchema:e,registry:g}),m.jsxs("label",{children:[m.jsx("input",{type:"checkbox",id:r,name:f||r,checked:typeof i>"u"?!1:i,required:y,disabled:s||o,autoFocus:u,onChange:x,onBlur:S,onFocus:E,"aria-describedby":Fe(r)}),$c(m.jsx("span",{children:a}),l)]})]})}function yS({id:t,disabled:e,options:n,value:r,autofocus:i=!1,readonly:s,onChange:o,onBlur:a,onFocus:l,htmlName:u}){const{inline:c=!1,enumOptions:d,enumDisabled:h,emptyValue:g}=n,f=vn(n),p=Array.isArray(r)?r:[r],y=N.useCallback(({target:S})=>a(t,Te(S&&S.value,d,f,g)),[a,t,d,g,f]),x=N.useCallback(({target:S})=>l(t,Te(S&&S.value,d,f,g)),[l,t,d,g,f]);return m.jsx("div",{className:"checkboxes",id:t,children:Array.isArray(d)&&d.map((S,E)=>{const j=ur(S.value,p),b=Array.isArray(h)&&h.indexOf(S.value)!==-1,v=e||b||s?"disabled":"",w=C=>{C.target.checked?o(_c(E,p,d)):o(Ac(E,p,d))},O=m.jsxs("span",{children:[m.jsx("input",{type:"checkbox",id:Ft(t,E),name:u||t,checked:j,value:dr(S.value,E,f),disabled:e||b||s,autoFocus:i&&E===0,onChange:w,onBlur:y,onFocus:x,"aria-describedby":Fe(t)}),m.jsx("span",{children:S.label})]});return c?m.jsx("label",{className:`checkbox-inline ${v}`,children:O},E):m.jsx("div",{className:`checkbox ${v}`,children:m.jsx("label",{children:O})},E)})})}function bS(t){const{disabled:e,readonly:n,options:r,registry:i}=t,s=V("BaseInputTemplate",i,r);return m.jsx(s,{type:"color",...t,disabled:e||n})}function xS(t){const{onChange:e,options:n,registry:r}=t,i=V("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o||void 0),[e]);return m.jsx(i,{type:"date",...t,onChange:s})}function vS(t){const{onChange:e,value:n,options:r,registry:i}=t,s=V("BaseInputTemplate",i,r);return m.jsx(s,{type:"datetime-local",...t,value:Px(n),onChange:o=>e(Sx(o))})}function SS(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{type:"email",...t})}function wS({fileInfo:t,registry:e}){const{translateString:n}=e,{dataURL:r,type:i,name:s}=t;return r?["image/jpeg","image/png"].includes(i)?m.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):m.jsxs(m.Fragment,{children:[" ",m.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(G.PreviewLabel)})]}):null}function jS({filesInfo:t,registry:e,preview:n,onRemove:r,options:i}){if(t.length===0)return null;const{translateString:s}=e,{RemoveButton:o}=V("ButtonTemplates",e,i);return m.jsx("ul",{className:"file-info",children:t.map((a,l)=>{const{name:u,size:c,type:d}=a,h=()=>r(l);return m.jsxs("li",{children:[m.jsx(mr,{children:s(G.FilesInfo,[u,d,String(c)])}),n&&m.jsx(wS,{fileInfo:a,registry:e}),m.jsx(o,{onClick:h,registry:e})]},l)})})}function OS(t){const{disabled:e,readonly:n,required:r,multiple:i,onChange:s,value:o,options:a,registry:l}=t,{filesInfo:u,handleChange:c,handleRemove:d}=Nx(o,s,i),h=V("BaseInputTemplate",l,a),g=f=>{f.target.files&&c(f.target.files)};return m.jsxs("div",{children:[m.jsx(h,{...t,disabled:e||n,type:"file",required:o?!1:r,onChangeOverride:g,value:"",accept:a.accept?String(a.accept):void 0}),m.jsx(jS,{filesInfo:u,onRemove:d,registry:l,preview:a.filePreview,options:a})]})}function ES({id:t,value:e,htmlName:n}){return m.jsx("input",{type:"hidden",id:t,name:n||t,value:typeof e>"u"?"":e})}function AS(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{type:"password",...t})}function CS({options:t,value:e,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:o,onFocus:a,onChange:l,id:u,htmlName:c}){const{enumOptions:d,enumDisabled:h,inline:g,emptyValue:f}=t,p=vn(t),y=N.useCallback(({target:S})=>o(u,Te(S&&S.value,d,p,f)),[o,d,f,u,p]),x=N.useCallback(({target:S})=>a(u,Te(S&&S.value,d,p,f)),[a,d,f,u,p]);return m.jsx("div",{className:"field-radio-group",id:u,role:"radiogroup",children:Array.isArray(d)&&d.map((S,E)=>{const j=ur(S.value,e),b=Array.isArray(h)&&h.indexOf(S.value)!==-1,v=r||b||i?"disabled":"",w=()=>l(S.value),O=m.jsxs("span",{children:[m.jsx("input",{type:"radio",id:Ft(u,E),checked:j,name:c||u,required:n,value:dr(S.value,E,p),disabled:r||b||i,autoFocus:s&&E===0,onChange:w,onBlur:y,onFocus:x,"aria-describedby":Fe(u)}),m.jsx("span",{children:S.label})]});return g?m.jsx("label",{className:`radio-inline ${v}`,children:O},E):m.jsx("div",{className:`radio ${v}`,children:m.jsx("label",{children:O})},E)})})}function _S(t){const{value:e,registry:{templates:{BaseInputTemplate:n}}}=t;return m.jsxs("div",{className:"field-range-wrapper",children:[m.jsx(n,{type:"range",...t}),m.jsx("span",{className:"range-view",children:e})]})}function IS({id:t,value:e,required:n,disabled:r,readonly:i,autofocus:s,onChange:o,onFocus:a,onBlur:l,schema:u,options:c,htmlName:d}){const{stars:h=5,shape:g="star"}=c,f=u.maximum?Math.min(u.maximum,5):Math.min(Math.max(h,1),5),p=u.minimum||0,y=N.useCallback(j=>{!r&&!i&&o(j)},[o,r,i]),x=N.useCallback(j=>{if(a){const b=Number(j.target.dataset.value);a(t,b)}},[a,t]),S=N.useCallback(j=>{if(l){const b=Number(j.target.dataset.value);l(t,b)}},[l,t]),E=j=>g==="heart"?j?"♥":"♡":j?"★":"☆";return m.jsx(m.Fragment,{children:m.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(f)].map((j,b)=>{const v=p+b,w=v<=e;return m.jsx("span",{onClick:()=>y(v),onFocus:x,onBlur:S,"data-value":v,tabIndex:r||i?-1:0,role:"radio","aria-checked":v===e,"aria-label":`${v} ${g==="heart"?"heart":"star"}${v===1?"":"s"}`,style:{color:w?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:E(w)},b)}),m.jsx("input",{type:"hidden",id:t,name:d||t,value:e||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function Ti(t,e){return e?Array.from(t.target.options).slice().filter(n=>n.selected).map(n=>n.value):t.target.value}function TS({schema:t,id:e,options:n,value:r,required:i,disabled:s,readonly:o,multiple:a=!1,autofocus:l=!1,onChange:u,onBlur:c,onFocus:d,placeholder:h,htmlName:g}){const{enumOptions:f,enumDisabled:p,emptyValue:y}=n,x=a?[]:"",S=vn(n),E=N.useCallback(O=>{const C=Ti(O,a);return d(e,Te(C,f,S,y))},[d,e,a,f,y,S]),j=N.useCallback(O=>{const C=Ti(O,a);return c(e,Te(C,f,S,y))},[c,e,a,f,y,S]),b=N.useCallback(O=>{const C=Ti(O,a);return u(Te(C,f,S,y))},[u,a,f,y,S]),v=Cc(r,f,a,S,x),w=!a&&t.default===void 0;return m.jsxs("select",{id:e,name:g||e,multiple:a,role:"combobox",className:"form-control",value:v,required:i,disabled:s||o,autoFocus:l,onBlur:j,onFocus:E,onChange:b,"aria-describedby":Fe(e),children:[w&&m.jsx("option",{value:"",children:h}),Array.isArray(f)&&f.map(({value:O,label:C},A)=>{const _=p&&p.indexOf(O)!==-1;return m.jsx("option",{value:dr(O,A,S),disabled:_,children:C},A)})]})}function NS({id:t,options:e={},placeholder:n,value:r,required:i,disabled:s,readonly:o,autofocus:a=!1,onChange:l,onBlur:u,onFocus:c,htmlName:d}){const h=N.useCallback(({target:{value:p}})=>l(p===""?e.emptyValue:p),[l,e.emptyValue]),g=N.useCallback(({target:p})=>u(t,p&&p.value),[u,t]),f=N.useCallback(({target:p})=>c(t,p&&p.value),[t,c]);return m.jsx("textarea",{id:t,name:d||t,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:o,autoFocus:a,rows:e.rows,onBlur:g,onFocus:f,onChange:h,"aria-describedby":Fe(t)})}function PS(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{...t})}function FS(t){const{onChange:e,options:n,registry:r}=t,i=V("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o?`${o}:00`:void 0),[e]);return m.jsx(i,{type:"time",...t,onChange:s})}function $S(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{type:"url",...t})}function DS(t){const{options:e,registry:n}=t,r=V("BaseInputTemplate",n,e);return m.jsx(r,{type:"number",...t})}function RS(){return{AltDateWidget:hS,AltDateTimeWidget:pS,CheckboxWidget:gS,CheckboxesWidget:yS,ColorWidget:bS,DateWidget:xS,DateTimeWidget:vS,EmailWidget:SS,FileWidget:OS,HiddenWidget:ES,PasswordWidget:AS,RadioWidget:CS,RangeWidget:_S,RatingWidget:IS,SelectWidget:TS,TextWidget:PS,TextareaWidget:NS,TimeWidget:FS,UpDownWidget:DS,URLWidget:$S}}function kS(){return{fields:k1(),templates:mS(),widgets:RS(),rootSchema:{},formContext:{},translateString:ix,globalFormOptions:{idPrefix:ll,idSeparator:cl,useFallbackUiForUnsupportedType:!1}}}function Gt(t,e){return{...Ls(t,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...e!==void 0&&{status:e}}}let MS=class extends N.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(e,n){if(e.extraErrors!==n._prevExtraErrors){const r={errors:n.schemaValidationErrors||[],errorSchema:n.schemaValidationErrorSchema||{}};let{errors:i,errorSchema:s}=r;return e.extraErrors&&({errors:i,errorSchema:s}=Mn(r,e.extraErrors)),n.customErrors&&({errors:i,errorSchema:s}=Mn({errors:i,errorSchema:s},n.customErrors.ErrorSchema,!0)),{_prevExtraErrors:e.extraErrors,errors:i,errorSchema:s}}return null}constructor(e){if(super(e),!e.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=e,s=n??r;this.state={...this.getStateFromProps(e,s,void 0,void 0,void 0,!0),_prevExtraErrors:e.extraErrors},i&&!ie(this.state.formData,s)&&i(Gt(this.state)),this.formElement=N.createRef()}getSnapshotBeforeUpdate(e,n){if(!ie(this.props,e)){const r=pa(this.props.formData,e.formData),i=pa(this.props.formData,this.state.formData),s=!ie(e.schema,this.props.schema),o=r.length>0||!ie(e.formData,this.props.formData),a=i.length>0||!ie(this.state.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,s||o?void 0:this.state.retrievedSchema,s,r,!a),u=!ie(l,n);return{nextState:l,shouldUpdate:u}}return{shouldUpdate:!1}}componentDidUpdate(e,n,r){if(r.shouldUpdate){const{nextState:i}=r,s=!ie(i.formData,this.props.formData),o=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,o&&s)return;s&&!ie(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(Gt(i)),this.setState(i)}}getStateFromProps(e,n,r,i=!1,s=[],o=!1){const a=this.state||{},l="schema"in e?e.schema:this.props.schema,u="validator"in e?e.validator:this.props.validator,c=("uiSchema"in e?e.uiSchema:this.props.uiSchema)||{},d=e.formData===void 0&&this.props.formData===void 0,h=typeof n<"u",g="liveValidate"in e?e.liveValidate:this.props.liveValidate,f=h&&!e.noValidate&&g,p="experimental_defaultFormStateBehavior"in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,y="experimental_customMergeAllOf"in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let x=a.schemaUtils;(!x||x.doesSchemaUtilsDiffer(u,l,p,y))&&(x=tx(u,l,p,y));const S=x.getRootSchema();let E=n;n===za?E=void 0:n===void 0&&d&&(E=a.formData);const j=x.getDefaultFormState(S,E,!1,a.initialDefaultsGenerated),b=this.updateRetrievedSchema(r??x.retrieveSchema(S,j)),v=()=>e.noValidate||i?{errors:[],errorSchema:{}}:e.liveValidate?{errors:a.errors||[],errorSchema:a.errorSchema||{}}:{errors:a.schemaValidationErrors||[],errorSchema:a.schemaValidationErrorSchema||{}};let w,O,C=a.schemaValidationErrors,A=a.schemaValidationErrorSchema;if(f&&!o){const F=this.liveValidate(S,x,a.errorSchema,j,void 0,a.customErrors,r,r!==void 0);w=F.errors,O=F.errorSchema,C=F.schemaValidationErrors,A=F.schemaValidationErrorSchema}else{const F=v();if(w=F.errors,O=F.errorSchema,s.length>0&&!f){const k=s.reduce((M,U)=>(M[U]=void 0,M),{});O=A=Mt(F.errorSchema,k,"preventDuplicates")}const $=this.mergeErrors({errorSchema:O,errors:w},e.extraErrors,a.customErrors);w=$.errors,O=$.errorSchema}const _=this.getRegistry(e,S,x),I=ie(a.registry,_)?a.registry:_,T=a.fieldPathId&&a.fieldPathId?.[de]===I.globalFormOptions.idPrefix?a.fieldPathId:Be("",I.globalFormOptions);return{schemaUtils:x,schema:S,uiSchema:c,fieldPathId:T,formData:j,edit:h,errors:w,errorSchema:O,schemaValidationErrors:C,schemaValidationErrorSchema:A,retrievedSchema:b,initialDefaultsGenerated:!0,registry:I}}shouldComponentUpdate(e,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return Dc(this,e,n,r)}validate(e,n=this.state.schema,r,i){const s=r||this.state.schemaUtils,{customValidate:o,transformErrors:a,uiSchema:l}=this.props,u=i??s.retrieveSchema(n,e);return s.getValidator().validateFormData(e,u,o,a,l)}renderErrors(e){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,o=B(s),a=V("ErrorListTemplate",e,o);return n&&n.length?m.jsx(a,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:e}):null}mergeErrors(e,n,r){let i=e.errorSchema,s=e.errors;if(n){const o=Mn(e,n);i=o.errorSchema,s=o.errors}if(r){const o=Mn({errors:s,errorSchema:i},r.ErrorSchema,!0);i=o.errorSchema,s=o.errors}return{errors:s,errorSchema:i}}liveValidate(e,n,r,i,s,o,a,l=!1){const u=this.validate(i,e,n,a),c=u.errors;let d=u.errorSchema;l&&(d=Mt(r,u.errorSchema,"preventDuplicates"));const h=c,g=d;return{...this.mergeErrors({errorSchema:d,errors:c},s,o),schemaValidationErrors:h,schemaValidationErrorSchema:g}}getUsedFormData=(e,n)=>G0(e,n);getFieldNames=(e,n)=>Y0(e,n);omitExtraData=e=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,e)};setFieldValue=(e,n)=>{const{registry:r}=this.state,i=Array.isArray(e)?e:e.split("."),s=Be("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[de])};onChange=(e,n,r,i)=>{this.pendingChanges.push({newValue:e,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:e,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:s,omitExtraData:o,liveOmit:a,noValidate:l,liveValidate:u,onChange:c,removeEmptyOptionalObjects:d}=this.props,{formData:h,schemaUtils:g,schema:f,fieldPathId:p,schemaValidationErrorSchema:y,errors:x}=this.state;let{customErrors:S,errorSchema:E}=this.state;const j=p.path[0]||"",b=!n||n.length===0||n.length===1&&n[0]===j;let v=this.state.retrievedSchema,w=b?e:Bs(h);const O=q(w)&&Object.keys(w).length>0&&Object.values(w).every(P=>P===void 0),C=h==null,A=O&&C?void 0:w;if(q(w)||Array.isArray(w)){e===Zc?Rx(w,n):b||ce(w,n,e);const P=this.getStateFromProps(this.props,A,void 0,void 0,void 0,!0);w=P.formData,v=P.retrievedSchema}const _=!l&&(u===!0||u==="onChange");let I={formData:w,schema:f},T=w;if(o===!0&&(a===!0||a==="onChange")&&(T=this.omitExtraData(w),I={formData:T}),d&&(T=rn(g.getValidator(),f,g.getRootSchema(),T),I={...I,formData:T}),i){const P=b?y:D(y,n);if(!ge(P))b?E=i:ce(E,n,i);else if(S||(S=new Ic),b){const F=D(i,Ae);F&&S.setErrors(F)}else ce(S.ErrorSchema,n,i)}else S&&D(S.ErrorSchema,[...n,Ae])&&S.clearErrors(n);if(_&&this.pendingChanges.length===1){const P=this.liveValidate(f,g,E,T,s,S,v);I={formData:T,...P,customErrors:S}}else if(!l&&i){const P=this.mergeErrors({errorSchema:E,errors:x},s,S);I={formData:T,...P,customErrors:S}}this.setState(I,()=>{c&&c(Gt({...this.state,...I}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return ie(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{const{formData:e,initialFormData:n=za,onChange:r}=this.props,o={formData:this.getStateFromProps(this.props,e??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(o,()=>r&&r(Gt({...this.state,...o})))};onBlur=(e,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:o,removeEmptyOptionalObjects:a}=this.props;if(r&&r(e,n),i===!0&&s==="onBlur"||o==="onBlur"){const{onChange:l,extraErrors:u}=this.props,{formData:c,schemaUtils:d,schema:h}=this.state;let g=c,f={formData:g};if(i===!0&&s==="onBlur"&&(g=this.omitExtraData(c),f={formData:g}),a&&(g=rn(d.getValidator(),h,d.getRootSchema(),g),f={...f,formData:g}),o==="onBlur"){const{schema:y,schemaUtils:x,errorSchema:S,customErrors:E,retrievedSchema:j}=this.state,b=this.liveValidate(y,x,S,g,u,E,j);f={formData:g,...b,customErrors:E}}const p=Object.keys(f).filter(y=>!y.startsWith("schemaValidation")).some(y=>{const x=D(this.state,y),S=D(f,y);return!ie(x,S)});this.setState(f,()=>{l&&p&&l(Gt({...this.state,...f}),e)})}};onFocus=(e,n)=>{const{onFocus:r}=this.props;r&&r(e,n)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();const{omitExtraData:n,extraErrors:r,noValidate:i,onSubmit:s,removeEmptyOptionalObjects:o}=this.props;let{formData:a}=this.state;if(n===!0&&(a=this.omitExtraData(a)),o){const{schemaUtils:l,schema:u}=this.state;a=rn(l.getValidator(),u,l.getRootSchema(),a)}if(i||this.validateFormWithFormData(a)){const l=r||{},u=r?Hs(r):[];this.setState({formData:a,errors:u,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(Gt({...this.state,formData:a},"submitted"),e)})}};getGlobalFormOptions(e){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=cl,idPrefix:s=ll,nameGenerator:o,useFallbackUiForUnsupportedType:a=!1}=e;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:a,...r!==void 0&&{experimental_componentUpdateStrategy:r},...o!==void 0&&{nameGenerator:o}}}getRegistry(e,n,r){const{translateString:i,uiSchema:s={}}=e,{fields:o,templates:a,widgets:l,formContext:u,translateString:c}=kS();return{fields:{...o,...e.fields},templates:{...a,...e.templates,ButtonTemplates:{...a.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...l,...e.widgets},rootSchema:n,formContext:e.formContext||u,schemaUtils:r,translateString:i||c,globalUiOptions:s[qi],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:s[um]??{}}}submit=()=>{if(this.formElement.current){const e=new CustomEvent("submit",{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=e,s=Rc(i);s[0]===""?s[0]=n:s.unshift(n);const o=s.join(r);let a=this.formElement.current.elements[o];a||(a=this.formElement.current.querySelector(`input[id^="${o}"], button[id^="${o}"]`)),a&&a.length&&(a=a[0]),a&&a.focus()}validateFormWithFormData=e=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:o}=this.state,a=this.validate(e),{errors:l,errorSchema:u}=n?this.mergeErrors(a,n):a,c=a.errors.length>0||n&&r;return c?(i&&(typeof i=="function"?i(l[0]):this.focusOnError(l[0])),this.setState({errors:l,errorSchema:u,schemaValidationErrors:a.errors,schemaValidationErrorSchema:a.errorSchema},()=>{s?s(l):console.error("Form validation failed",l)})):l.length>0?this.setState({errors:l,errorSchema:u,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!c};validateForm(){const{omitExtraData:e,removeEmptyOptionalObjects:n}=this.props;let{formData:r}=this.state;if(e===!0&&(r=this.omitExtraData(r)),n){const{schemaUtils:i,schema:s}=this.state;r=rn(i.getValidator(),s,i.getRootSchema(),r)}return this.validateFormWithFormData(r)}render(){const{children:e,id:n,className:r="",tagName:i,name:s,method:o,target:a,action:l,autoComplete:u,enctype:c,acceptCharset:d,noHtml5Validate:h=!1,disabled:g,readonly:f,showErrorList:p="top",_internalFormWrapper:y}=this.props,{schema:x,uiSchema:S,formData:E,errorSchema:j,fieldPathId:b,registry:v}=this.state,{SchemaField:w}=v.fields,{SubmitButton:O}=v.templates.ButtonTemplates,C=y?i:void 0,A=y||i||"form";let{[Fr]:_={}}=B(S);g&&(_={..._,props:{..._.props,disabled:!0}});const I={[vt]:{[Fr]:_}};return m.jsxs(A,{className:r||"rjsf",id:n,name:s,method:o,target:a,action:l,autoComplete:u,encType:c,acceptCharset:d,noValidate:h,onSubmit:this.onSubmit,as:C,ref:this.formElement,children:[p==="top"&&this.renderErrors(v),m.jsx(w,{name:"",schema:x,uiSchema:S,errorSchema:j,fieldPathId:b,formData:E,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:v,disabled:g,readonly:f}),e||m.jsx(O,{uiSchema:I,registry:v}),p==="bottom"&&this.renderErrors(v)]})}};function US(t){return N.forwardRef(({fields:e,widgets:n,templates:r,...i},s)=>(e={...t?.fields,...e},n={...t?.widgets,...n},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},m.jsx(MS,{...t,...i,fields:e,widgets:n,templates:r,ref:s})))}function LS(t,e="none"){return e==="all"?t:t.reduce((n,r)=>{const{message:i,schemaPath:s}=r,o=e!=="anyOf"?s?.indexOf(`/${ee}/`):void 0,a=e!=="oneOf"?s?.indexOf(`/${W}/`):void 0;let l;return o&&o>=0?l=s?.substring(0,o):a&&a>=0&&(l=s?.substring(0,a)),l&&n.find(c=>{var d;return c.message===i&&((d=c.schemaPath)===null||d===void 0?void 0:d.startsWith(l))})||n.push(r),n},[])}function BS(t=[],e,n){const r=t.map(i=>{var s;const{instancePath:o,keyword:a,params:l,schemaPath:u,parentSchema:c,...d}=i;let{message:h=""}=d,g=o.replace(/\//g,"."),f=`${g} ${h}`.trim(),p="";const y=[...((s=l.deps)===null||s===void 0?void 0:s.split(", "))||[],l.missingProperty,l.property].filter(x=>x);if(y.length>0)y.forEach(x=>{const S=g?`${g}.${x}`:x;let E=B(D(e,S.replace(/^\./,""))).title;if(E===void 0){const j=u.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([x]);E=B(D(e,j)).title}if(E)h=h.replace(`'${x}'`,`'${E}'`),p=E;else{const j=D(c,[se,x,"title"]);j&&(h=h.replace(`'${x}'`,`'${j}'`),p=j)}}),f=h;else{const x=B(D(e,g.replace(/^\./,""))).title;if(x)f=`'${x}' ${h}`.trim(),p=x;else{const S=c?.title;S&&(f=`'${S}' ${h}`.trim(),p=S)}}return"missingProperty"in l&&(g=g?`${g}.${l.missingProperty}`:l.missingProperty),{name:a,property:g,message:h,params:l,stack:f,schemaPath:u,title:p}});return LS(r,n)}function VS(t,e,n,r,i,s,o,a){const{validationError:l}=e;let u=BS(e.errors,o,a);l&&(u=[...u,{stack:l.message}]),typeof s=="function"&&(u=s(u,o));let c=Ox(u);if(l&&(c={...c,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:u,errorSchema:c};const d=vc(t,r,n,r,!0),h=i(d,zi(d),o,c),g=kc(h);return Mn({errors:u,errorSchema:c},g)}var xr={exports:{}},Ni={},Wa;function qS(){return Wa||(Wa=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(C,A){return{validate:C,compare:A}}t.fullFormats={date:e(s,o),time:e(l,u),"date-time":e(d,h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:O,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:x,int32:{type:"number",validate:j},int64:{type:"number",validate:b},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function n(C){return C%4===0&&(C%100!==0||C%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(C){const A=r.exec(C);if(!A)return!1;const _=+A[1],I=+A[2],T=+A[3];return I>=1&&I<=12&&T>=1&&T<=(I===2&&n(_)?29:i[I])}function o(C,A){if(C&&A)return C>A?1:C<A?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(C,A){const _=a.exec(C);if(!_)return!1;const I=+_[1],T=+_[2],P=+_[3],F=_[5];return(I<=23&&T<=59&&P<=59||I===23&&T===59&&P===60)&&(!A||F!=="")}function u(C,A){if(!(C&&A))return;const _=a.exec(C),I=a.exec(A);if(_&&I)return C=_[1]+_[2]+_[3]+(_[4]||""),A=I[1]+I[2]+I[3]+(I[4]||""),C>A?1:C<A?-1:0}const c=/t|\s/i;function d(C){const A=C.split(c);return A.length===2&&s(A[0])&&l(A[1],!0)}function h(C,A){if(!(C&&A))return;const[_,I]=C.split(c),[T,P]=A.split(c),F=o(_,T);if(F!==void 0)return F||u(I,P)}const g=/\/|:/,f=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p(C){return g.test(C)&&f.test(C)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function x(C){return y.lastIndex=0,y.test(C)}const S=-2147483648,E=2**31-1;function j(C){return Number.isInteger(C)&&C<=E&&C>=S}function b(C){return Number.isInteger(C)}function v(){return!0}const w=/[^\\]\\Z/;function O(C){if(w.test(C))return!1;try{return new RegExp(C),!0}catch{return!1}}})(Ni)),Ni}var Pi={},Ha;function zS(){return Ha||(Ha=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=Uu(),n=el(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:a,schemaCode:l})=>n.str`should be ${i[a].okStr} ${l}`,params:({keyword:a,schemaCode:l})=>n._`{comparison: ${i[a].okStr}, limit: ${l}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:l,data:u,schemaCode:c,keyword:d,it:h}=a,{opts:g,self:f}=h;if(!g.validateFormats)return;const p=new e.KeywordCxt(h,f.RULES.all.format.definition,"format");p.$data?y():x();function y(){const E=l.scopeValue("formats",{ref:f.formats,code:g.code.formats}),j=l.const("fmt",n._`${E}[${p.schemaCode}]`);a.fail$data(n.or(n._`typeof ${j} != "object"`,n._`${j} instanceof RegExp`,n._`typeof ${j}.compare != "function"`,S(j)))}function x(){const E=p.schema,j=f.formats[E];if(!j||j===!0)return;if(typeof j!="object"||j instanceof RegExp||typeof j.compare!="function")throw new Error(`"${d}": format "${E}" does not define "compare" function`);const b=l.scopeValue("formats",{key:E,ref:j,code:g.code.formats?n._`${g.code.formats}${n.getProperty(E)}`:void 0});a.fail$data(S(b))}function S(E){return n._`${E}.compare(${u}, ${c}) ${i[d].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=o})(Pi)),Pi}var Ka;function WS(){return Ka||(Ka=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=qS(),r=zS(),i=el(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(u,c={keywords:!0})=>{if(Array.isArray(c))return l(u,c,n.fullFormats,s),u;const[d,h]=c.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,s],g=c.formats||n.formatNames;return l(u,g,d,h),c.keywords&&r.default(u),u};a.get=(u,c="full")=>{const h=(c==="fast"?n.fastFormats:n.fullFormats)[u];if(!h)throw new Error(`Unknown format "${u}"`);return h};function l(u,c,d,h){var g,f;(g=(f=u.opts.code).formats)!==null&&g!==void 0||(f.formats=i._`require("ajv-formats/dist/formats").${h}`);for(const p of c)u.addFormat(p,d[p])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a})(xr,xr.exports)),xr.exports}var HS=WS();const Ga=us(HS),KS={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},GS=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,YS=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function JS(t,e,n={},r,i=rl,s){let o=new i({...KS,...n});return r?Ga(o,r):r!==!1&&Ga(o),o.addFormat("data-url",YS),o.addFormat("color",GS),o.addKeyword(ot),o.addKeyword(ys),Array.isArray(t)&&o.addMetaSchema(t),ne(e)&&Object.keys(e).forEach(a=>{o.addFormat(a,e[a])}),s&&(o=s(o)),o}class ZS{constructor(e,n){this.hasRegisteredRootSchema=!1;const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:o,AjvClass:a,extenderFn:l,suppressDuplicateFiltering:u}=e;this.ajv=JS(r,i,s,o,a,l),this.localizer=n,this.suppressDuplicateFiltering=u}reset(){this.ajv.removeSchema(),this.lastSeenRootSchema=void 0,this.hasRegisteredRootSchema=!1}rawValidation(e,n){var r,i;let s,o;try{e[de]&&(o=this.ajv.getSchema(e[de])),o===void 0&&(o=this.ajv.compile(e)),o(n)}catch(l){s=l}let a;return o&&(typeof this.localizer=="function"&&(((r=o.errors)!==null&&r!==void 0?r:[]).forEach(l=>{var u;["missingProperty","property"].forEach(c=>{var d;!((d=l.params)===null||d===void 0)&&d[c]&&(l.params[c]=`'${l.params[c]}'`)}),!((u=l.params)===null||u===void 0)&&u.deps&&(l.params.deps=l.params.deps.split(", ").map(c=>`'${c}'`).join(", "))}),this.localizer(o.errors),((i=o.errors)!==null&&i!==void 0?i:[]).forEach(l=>{var u;["missingProperty","property"].forEach(c=>{var d;!((d=l.params)===null||d===void 0)&&d[c]&&(l.params[c]=l.params[c].slice(1,-1))}),!((u=l.params)===null||u===void 0)&&u.deps&&(l.params.deps=l.params.deps.split(", ").map(c=>c.slice(1,-1)).join(", "))})),a=o.errors||void 0,o.errors=null),{errors:a,validationError:s}}validateFormData(e,n,r,i,s){const o=this.rawValidation(n,e);return VS(this,o,e,n,r,i,s,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){var n,r;if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;const i=(n=e[de])!==null&&n!==void 0?n:ul;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(e,i):ie(e,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(e,i)),this.lastSeenRootSchema=e,this.hasRegisteredRootSchema=!0}isValid(e,n,r){var i;try{this.handleSchemaUpdate(r);const s=Ks(e),o=(i=s[de])!==null&&i!==void 0?i:bx(s);let a;return a=this.ajv.getSchema(o),a===void 0&&(a=this.ajv.addSchema(s,o).getSchema(o)||this.ajv.compile(s)),a(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function XS(t={},e){return new ZS(t,e)}const QS=XS();const nu=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const ew=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const tw=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const Ya=t=>{const e=tw(t);return e.charAt(0).toUpperCase()+e.slice(1)};var Fi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const nw=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},rw=N.createContext({}),iw=()=>N.useContext(rw),sw=N.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>{const{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:d=!1,color:h="currentColor",className:g=""}=iw()??{},f=r??d?Number(n??c)*24/Number(e??u):n??c;return N.createElement("svg",{ref:l,...Fi,width:e??u??Fi.width,height:e??u??Fi.height,stroke:t??h,strokeWidth:f,className:nu("lucide",g,i),...!s&&!nw(a)&&{"aria-hidden":"true"},...a},[...o.map(([p,y])=>N.createElement(p,y)),...Array.isArray(s)?s:[s]])});const rt=(t,e)=>{const n=N.forwardRef(({className:r,...i},s)=>N.createElement(sw,{ref:s,iconNode:e,className:nu(`lucide-${ew(Ya(t))}`,`lucide-${t}`,r),...i}));return n.displayName=Ya(t),n};const ow=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],aw=rt("check",ow);const lw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ru=rt("chevron-down",lw);const cw=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],uw=rt("chevron-up",cw);const dw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fw=rt("circle-alert",dw);const mw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],iu=rt("circle-plus",mw);const hw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pw=rt("circle",hw);const gw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],yw=rt("copy",gw);const bw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],xw=rt("search",bw);const vw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sw=rt("trash-2",vw);const ww=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],su=rt("x",ww);function Y(...t){return Lu(Bu(t))}const jw=ds("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function eo({className:t,variant:e,size:n,asChild:r=!1,...i}){const s=r?tl:"button";return m.jsx(s,{"data-slot":"button",className:Y(jw({variant:e,size:n,className:t})),...i})}function Ow({uiSchema:t,registry:e,className:n,...r}){const{translateString:i}=e;return m.jsx("div",{className:"p-0 m-0",children:m.jsxs(eo,{...r,className:Y("w-fit gap-2",n),variant:"outline",type:"button",children:[m.jsx(iu,{size:16})," ",i(G.AddItemButton)]})})}function Ew(t){const{children:e,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:s,uiSchema:o,registry:a}=t,l=B(o),u=V("ArrayFieldItemButtonsTemplate",a,l),c=i?-6:22;return m.jsx("div",{children:m.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[m.jsx("div",{className:"grow shrink",children:e}),m.jsx("div",{className:"flex items-end justify-end p-0.5",children:s&&m.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${c}px`:void 0},children:m.jsx(u,{...n})})})]})})}function Aw(t){const{canAdd:e,disabled:n,fieldPathId:r,uiSchema:i,items:s,optionalDataControl:o,onAddClick:a,readonly:l,registry:u,required:c,schema:d,title:h}=t,g=B(i),f=V("ArrayFieldDescriptionTemplate",u,g),p=V("ArrayFieldTitleTemplate",u,g),y=!l&&!n,{ButtonTemplates:{AddButton:x}}=u.templates;return m.jsx("div",{children:m.jsx("div",{className:"m-0 flex p-0",children:m.jsxs("div",{className:"m-0 w-full p-0",children:[m.jsx(p,{fieldPathId:r,title:g.title||h,schema:d,uiSchema:i,required:c,registry:u,optionalDataControl:y?o:void 0}),m.jsx(f,{fieldPathId:r,description:g.description||d.description,schema:d,uiSchema:i,registry:u}),m.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[y?void 0:o,s,e&&m.jsx("div",{className:"mt-2 flex justify-end",children:m.jsx(x,{id:Qe(r,"add"),className:"rjsf-array-item-add",onClick:a,disabled:n||l,uiSchema:i,registry:u})})]},`array-item-list-${r.$id}`)]})})})}function ou({className:t,type:e,...n}){return m.jsx("input",{type:e,"data-slot":"input",className:Y("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}function Cw({id:t,htmlName:e,placeholder:n,required:r,readonly:i,disabled:s,type:o,value:a,onChange:l,onChangeOverride:u,onBlur:c,onFocus:d,autofocus:h,options:g,schema:f,rawErrors:p=[],children:y,extraProps:x,className:S,registry:E}){const{ClearButton:j}=E.templates.ButtonTemplates,b={...x,...Nc(f,o,g)},v=({target:{value:A}})=>l(A===""?g.emptyValue:A),w=({target:A})=>c(t,A&&A.value),O=({target:A})=>d(t,A&&A.value),C=N.useCallback(A=>{var _;A.preventDefault(),A.stopPropagation(),l((_=g.emptyValue)!==null&&_!==void 0?_:"")},[l,g.emptyValue]);return m.jsxs("div",{className:"p-0.5",children:[m.jsx(ou,{id:t,name:e||t,type:o,placeholder:n,autoFocus:h,required:r,disabled:s,readOnly:i,className:Y({"border-destructive focus-visible:ring-0":p.length>0},S),list:f.examples?Qr(t):void 0,...b,value:a||a===0?a:"",onChange:u||v,onBlur:w,onFocus:O,"aria-describedby":Fe(t,!!f.examples)}),g.allowClearTextInputs&&!i&&!s&&a&&m.jsx(j,{onClick:C,registry:E}),y,m.jsx(Xc,{id:t,schema:f})]})}function _w({id:t,description:e,registry:n,uiSchema:r}){return e?m.jsx("div",{children:m.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:m.jsx(Xs,{description:e,registry:n,uiSchema:r})})}):null}const Iw=ds("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Tw({className:t,variant:e,...n}){return m.jsx("div",{"data-slot":"alert",role:"alert",className:Y(Iw({variant:e}),t),...n})}function Nw({className:t,...e}){return m.jsx("div",{"data-slot":"alert-title",className:Y("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Pw({className:t,...e}){return m.jsx("div",{"data-slot":"alert-description",className:Y("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function Fw({errors:t,registry:e}){const{translateString:n}=e;return m.jsxs(Tw,{variant:"destructive",className:"mb-2",children:[m.jsx(fw,{className:"h-4 w-4"}),m.jsx(Nw,{children:n(G.ErrorsLabel)}),m.jsx(Pw,{className:"flex flex-col gap-1",children:t.map((r,i)=>m.jsxs("span",{children:["• ",r.stack]},i))})]})}function $w(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=qs(n);return m.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((i,s)=>m.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:i},s))})}function Dw(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i,hasErrors:s}=t;return n?m.jsx("span",{className:Y("text-xs font-medium text-muted-foreground",{"text-destructive":s}),id:zs(e),children:m.jsx(Qs,{help:n,registry:i,uiSchema:r})}):null}function Rw({id:t,children:e,displayLabel:n,rawErrors:r=[],errors:i,help:s,description:o,rawDescription:a,classNames:l,style:u,disabled:c,label:d,hidden:h,onKeyRename:g,onKeyRenameBlur:f,onRemoveProperty:p,readonly:y,required:x,schema:S,uiSchema:E,registry:j}){const b=B(E),v=V("WrapIfAdditionalTemplate",j,b);if(h)return m.jsx("div",{className:"hidden",children:e});const w=b.widget==="checkbox";return m.jsx(v,{classNames:l,style:u,disabled:c,id:t,label:d,displayLabel:n,onKeyRename:g,onKeyRenameBlur:f,onRemoveProperty:p,rawDescription:a,readonly:y,required:x,schema:S,uiSchema:E,registry:j,children:m.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!w&&m.jsxs("label",{className:Y("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[d,x?"*":null]}),e,n&&a&&!w&&m.jsx("span",{className:Y("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:o}),i,s]})})}function kw(t){const{children:e,column:n,className:r,...i}=t;return m.jsx("div",{className:Y("grid gap-2",r),...i,children:e})}function Mw(t){const{icon:e,iconType:n,className:r,uiSchema:i,registry:s,...o}=t;return m.jsx(eo,{size:"icon",variant:"outline",className:r,...o,type:"button",children:e})}const wn=N.memo(Mw);function Uw(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.CopyButton),...t,icon:m.jsx(yw,{className:"h-4 w-4"})})}const Lw=N.memo(Uw);function Bw(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.MoveDownButton),...t,icon:m.jsx(ru,{className:"h-4 w-4"})})}const Vw=N.memo(Bw);function qw(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.MoveUpButton),...t,icon:m.jsx(uw,{className:"h-4 w-4"})})}const zw=N.memo(qw);function Ww(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.RemoveButton),...t,className:"border-destructive",icon:m.jsx(Sw,{className:"h-4 w-4 stroke-destructive"})})}const au=N.memo(Ww);function Hw(t){const{registry:{translateString:e}}=t;return m.jsx(wn,{title:e(G.ClearButton),...t,icon:m.jsx(su,{})})}const Kw=N.memo(Hw);function Gw({selector:t,optionSchemaField:e}){return m.jsxs("div",{className:Y("p-4 border rounded-md bg-background shadow-sm"),children:[m.jsx("div",{className:Y("mb-4"),children:t}),e]})}function Yw({description:t,title:e,properties:n,required:r,uiSchema:i,fieldPathId:s,schema:o,formData:a,optionalDataControl:l,onAddProperty:u,disabled:c,readonly:d,registry:h}){const g=B(i),f=V("TitleFieldTemplate",h,g),p=V("DescriptionFieldTemplate",h,g),y=!d&&!c,{ButtonTemplates:{AddButton:x}}=h.templates;return m.jsxs(m.Fragment,{children:[e&&m.jsx(f,{id:ei(s),title:e,required:r,schema:o,uiSchema:i,registry:h,optionalDataControl:y?l:void 0}),t&&m.jsx(p,{id:Ht(s),description:t,schema:o,uiSchema:i,registry:h}),m.jsxs("div",{className:"flex flex-col gap-2",children:[y?void 0:l,n.map(S=>m.jsx("div",{className:`${S.hidden?"hidden":""} flex`,children:m.jsx("div",{className:"w-full",children:S.content})},S.name)),dl(o,i,a)?m.jsx("div",{className:"mt-2 flex justify-end",children:m.jsx(x,{id:Qe(s,"add"),onClick:u,disabled:c||d,className:"rjsf-object-property-expand",uiSchema:i,registry:h})}):null]})]})}function Jw(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?m.jsx(wn,{id:e,registry:n,className:"rjsf-add-optional-data",onClick:i,title:r,icon:m.jsx(iu,{}),size:"xs"}):s?m.jsx(au,{id:e,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):m.jsx("em",{id:e,children:r})}function Zw(t){const{submitText:e,norender:n,props:r}=Pc(t.uiSchema);return n?null:m.jsx("div",{children:m.jsx(eo,{type:"submit",...r,className:Y("my-2",r?.className),children:e})})}function lu({className:t,orientation:e="horizontal",decorative:n=!0,...r}){return m.jsx(Vu,{"data-slot":"separator",decorative:n,orientation:e,className:Y("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function Xw({id:t,title:e,uiSchema:n,optionalDataControl:r}){const i=B(n);let s=m.jsx("h5",{children:i.title||e});return r&&(s=m.jsxs("div",{className:"flex flex-row",children:[m.jsx("div",{className:"flex-grow",children:s}),m.jsx("div",{className:"flex",children:r})]})),m.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[s,m.jsx(lu,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Qw({classNames:t,style:e,children:n,disabled:r,id:i,label:s,displayLabel:o,onRemoveProperty:a,onKeyRenameBlur:l,rawDescription:u,readonly:c,required:d,schema:h,uiSchema:g,registry:f}){const{templates:p,translateString:y}=f,{RemoveButton:x}=p.ButtonTemplates,S=y(G.KeyLabel,[s]);if(!(ot in h))return m.jsx("div",{className:t,style:e,children:n});const b=o?22+(u?-28:0):0,v=`${i}-key`;return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[m.jsx("div",{className:"grid gap-2 col-span-5",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[o&&m.jsx("label",{htmlFor:v,className:"text-sm font-medium text-muted-foreground leading-none",children:S}),m.jsx("div",{className:"pl-0.5",children:m.jsx(ou,{required:d,defaultValue:s,disabled:r||c,id:v,name:v,onBlur:c?void 0:l,type:"text",className:"w-full border shadow-sm"},s)}),!!u&&m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),m.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),m.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${b}px`},children:m.jsx(x,{id:Qe(i,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||c,onClick:a,uiSchema:g,registry:f})})]}),m.jsx(lu,{dir:"horizontal",className:"mt-2"})]})}function ej(){return{ArrayFieldItemTemplate:Ew,ArrayFieldTemplate:Aw,BaseInputTemplate:Cw,ButtonTemplates:{AddButton:Ow,CopyButton:Lw,MoveDownButton:Vw,MoveUpButton:zw,RemoveButton:au,SubmitButton:Zw,ClearButton:Kw},DescriptionFieldTemplate:_w,ErrorListTemplate:Fw,FieldErrorTemplate:$w,FieldHelpTemplate:Dw,FieldTemplate:Rw,GridTemplate:kw,MultiSchemaFieldTemplate:Gw,ObjectFieldTemplate:Yw,OptionalDataControlsTemplate:Jw,TitleFieldTemplate:Xw,WrapIfAdditionalTemplate:Qw}}function tj(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var nj=["color"],rj=N.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=tj(t,nj);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),N.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function cu({className:t,...e}){return m.jsx(qu,{"data-slot":"checkbox",className:Y("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:m.jsx(zu,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:m.jsx(rj,{className:"size-3.5"})})})}function to({className:t,...e}){return m.jsx(Wu,{"data-slot":"label",className:Y("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})}function ij({id:t,htmlName:e,disabled:n,options:r,value:i,autofocus:s,readonly:o,required:a,onChange:l,onBlur:u,onFocus:c,className:d}){const{enumOptions:h,enumDisabled:g,inline:f,emptyValue:p}=r,y=vn(r),x=Array.isArray(i)?i:[i],S=({target:j})=>u(t,Te(j&&j.value,h,y,p)),E=({target:j})=>c(t,Te(j&&j.value,h,y,p));return m.jsx("div",{className:Y({"flex flex-col gap-2":!f,"flex flex-row gap-4 flex-wrap":f}),children:Array.isArray(h)&&h.map((j,b)=>{const v=ur(j.value,x),w=Array.isArray(g)&&g.includes(j.value),O=Ft(t,b);return m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(cu,{id:O,name:e||t,required:a,disabled:n||w||o,onCheckedChange:C=>{l(C?_c(b,x,h):Ac(b,x,h))},className:d,checked:v,autoFocus:s&&b===0,onBlur:S,onFocus:E,"aria-describedby":Fe(t)}),m.jsx(to,{className:"leading-tight",htmlFor:Ft(t,b),children:j.label})]},O)})})}function sj(t){const{id:e,htmlName:n,value:r,disabled:i,readonly:s,label:o,hideLabel:a,schema:l,autofocus:u,options:c,onChange:d,onBlur:h,onFocus:g,registry:f,uiSchema:p,className:y}=t,x=Wn(l),S=V("DescriptionFieldTemplate",f,c),E=w=>d(w),j=()=>h(e,r),b=()=>g(e,r),v=c.description||l.description;return m.jsxs("div",{className:`relative ${i||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":Fe(e),children:[!a&&v&&m.jsx(S,{id:Ht(e),description:v,schema:l,uiSchema:p,registry:f}),m.jsxs("div",{className:"flex items-center gap-2 my-2",children:[m.jsx(cu,{id:e,name:n||e,checked:typeof r>"u"?!1:!!r,required:x,disabled:i||s,autoFocus:u,onCheckedChange:E,onBlur:j,onFocus:b,className:y}),m.jsx(to,{className:"leading-tight",htmlFor:e,children:$c(o,a||!o)})]})]})}function oj({className:t,...e}){return m.jsx(Ad,{"data-slot":"radio-group",className:Y("grid gap-3",t),...e})}function aj({className:t,...e}){return m.jsx(Cd,{"data-slot":"radio-group-item",className:Y("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:m.jsx(_d,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:m.jsx(pw,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function lj({id:t,options:e,value:n,required:r,disabled:i,readonly:s,onChange:o,onBlur:a,onFocus:l,className:u}){const{enumOptions:c,enumDisabled:d,emptyValue:h}=e,g=vn(e),f=S=>o(Te(S,c,g,h)),p=({target:S})=>a(t,Te(S&&S.value,c,g,h)),y=({target:S})=>l(t,Te(S&&S.value,c,g,h)),x=!!(e&&e.inline);return m.jsx("div",{className:"mb-0",children:m.jsx(oj,{defaultValue:n?.toString(),required:r,disabled:i||s,onValueChange:S=>{f(S)},onBlur:p,onFocus:y,"aria-describedby":Fe(t),orientation:x?"horizontal":"vertical",className:Y("flex flex-wrap",{"flex-col":!x},u),children:Array.isArray(c)&&c.map((S,E)=>{const j=Array.isArray(d)&&d.includes(S.value),b=ur(S.value,n);return m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(aj,{checked:b,value:dr(S.value,E,g),id:Ft(t,E),disabled:j}),m.jsx(to,{className:"leading-tight",htmlFor:Ft(t,E),children:S.label})]},Ft(t,E))})})})}var uu=["PageUp","PageDown"],du=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fu={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},jn="Slider",[is,cj,uj]=Ku(jn),[mu]=Ju(jn,[uj]),[dj,ri]=mu(jn),hu=N.forwardRef((t,e)=>{const{name:n,min:r=0,max:i=100,step:s=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:c,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:g=!1,form:f,...p}=t,y=N.useRef(new Set),x=N.useRef(0),E=o==="horizontal"?fj:mj,[j=[],b]=Hu({prop:c,defaultProp:u,onChange:_=>{[...y.current][x.current]?.focus(),d(_)}}),v=N.useRef(j);function w(_){const I=bj(j,_);A(_,I)}function O(_){A(_,x.current)}function C(){const _=v.current[x.current];j[x.current]!==_&&h(j)}function A(_,I,{commit:T}={commit:!1}){const P=wj(s),F=jj(Math.round((_-r)/s)*s+r,P),$=sl(F,[r,i]);b((k=[])=>{const M=gj(k,$,I);if(Sj(M,l*s)){x.current=M.indexOf($);const U=String(M)!==String(k);return U&&T&&h(M),U?M:k}else return k})}return m.jsx(dj,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:x,thumbs:y.current,values:j,orientation:o,form:f,children:m.jsx(is.Provider,{scope:t.__scopeSlider,children:m.jsx(is.Slot,{scope:t.__scopeSlider,children:m.jsx(E,{"aria-disabled":a,"data-disabled":a?"":void 0,...p,ref:e,onPointerDown:Qt(p.onPointerDown,()=>{a||(v.current=j)}),min:r,max:i,inverted:g,onSlideStart:a?void 0:w,onSlideMove:a?void 0:O,onSlideEnd:a?void 0:C,onHomeKeyDown:()=>!a&&A(r,0,{commit:!0}),onEndKeyDown:()=>!a&&A(i,j.length-1,{commit:!0}),onStepKeyDown:({event:_,direction:I})=>{if(!a){const F=uu.includes(_.key)||_.shiftKey&&du.includes(_.key)?10:1,$=x.current,k=j[$],M=s*F*I;A(k+M,$,{commit:!0})}}})})})})});hu.displayName=jn;var[pu,gu]=mu(jn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),fj=N.forwardRef((t,e)=>{const{min:n,max:r,dir:i,inverted:s,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:u,...c}=t,[d,h]=N.useState(null),g=gn(e,E=>h(E)),f=N.useRef(void 0),p=Gu(i),y=p==="ltr",x=y&&!s||!y&&s;function S(E){const j=f.current||d.getBoundingClientRect(),b=[0,j.width],w=no(b,x?[n,r]:[r,n]);return f.current=j,w(E-j.left)}return m.jsx(pu,{scope:t.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:m.jsx(yu,{dir:p,"data-orientation":"horizontal",...c,ref:g,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const j=S(E.clientX);o?.(j)},onSlideMove:E=>{const j=S(E.clientX);a?.(j)},onSlideEnd:()=>{f.current=void 0,l?.()},onStepKeyDown:E=>{const b=fu[x?"from-left":"from-right"].includes(E.key);u?.({event:E,direction:b?-1:1})}})})}),mj=N.forwardRef((t,e)=>{const{min:n,max:r,inverted:i,onSlideStart:s,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...u}=t,c=N.useRef(null),d=gn(e,c),h=N.useRef(void 0),g=!i;function f(p){const y=h.current||c.current.getBoundingClientRect(),x=[0,y.height],E=no(x,g?[r,n]:[n,r]);return h.current=y,E(p-y.top)}return m.jsx(pu,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:m.jsx(yu,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const y=f(p.clientY);s?.(y)},onSlideMove:p=>{const y=f(p.clientY);o?.(y)},onSlideEnd:()=>{h.current=void 0,a?.()},onStepKeyDown:p=>{const x=fu[g?"from-bottom":"from-top"].includes(p.key);l?.({event:p,direction:x?-1:1})}})})}),yu=N.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...u}=t,c=ri(jn,n);return m.jsx(rr.span,{...u,ref:e,onKeyDown:Qt(t.onKeyDown,d=>{d.key==="Home"?(o(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):uu.concat(du).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Qt(t.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),c.thumbs.has(h)?h.focus():r(d)}),onPointerMove:Qt(t.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&i(d)}),onPointerUp:Qt(t.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),s(d))})})}),bu="SliderTrack",xu=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=ri(bu,n);return m.jsx(rr.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:e})});xu.displayName=bu;var ss="SliderRange",vu=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=ri(ss,n),s=gu(ss,n),o=N.useRef(null),a=gn(e,o),l=i.values.length,u=i.values.map(h=>ju(h,i.min,i.max)),c=l>1?Math.min(...u):0,d=100-Math.max(...u);return m.jsx(rr.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...t.style,[s.startEdge]:c+"%",[s.endEdge]:d+"%"}})});vu.displayName=ss;var os="SliderThumb",Su=N.forwardRef((t,e)=>{const n=cj(t.__scopeSlider),[r,i]=N.useState(null),s=gn(e,a=>i(a)),o=N.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return m.jsx(hj,{...t,ref:s,index:o})}),hj=N.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:i,...s}=t,o=ri(os,n),a=gu(os,n),[l,u]=N.useState(null),c=gn(e,S=>u(S)),d=l?o.form||!!l.closest("form"):!0,h=Yu(l),g=o.values[r],f=g===void 0?0:ju(g,o.min,o.max),p=yj(r,o.values.length),y=h?.[a.size],x=y?xj(y,f,a.direction):0;return N.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${f}% + ${x}px)`},children:[m.jsx(is.ItemSlot,{scope:t.__scopeSlider,children:m.jsx(rr.span,{role:"slider","aria-label":t["aria-label"]||p,"aria-valuemin":o.min,"aria-valuenow":g,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...s,ref:c,style:g===void 0?{display:"none"}:t.style,onFocus:Qt(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&m.jsx(wu,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:g},r)]})});Su.displayName=os;var pj="RadioBubbleInput",wu=N.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const i=N.useRef(null),s=gn(i,r),o=Zu(e);return N.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&c){const d=new Event("input",{bubbles:!0});c.call(a,e),a.dispatchEvent(d)}},[o,e]),m.jsx(rr.input,{style:{display:"none"},...n,ref:s,defaultValue:e})});wu.displayName=pj;function gj(t=[],e,n){const r=[...t];return r[n]=e,r.sort((i,s)=>i-s)}function ju(t,e,n){const s=100/(n-e)*(t-e);return sl(s,[0,100])}function yj(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function bj(t,e){if(t.length===1)return 0;const n=t.map(i=>Math.abs(i-e)),r=Math.min(...n);return n.indexOf(r)}function xj(t,e,n){const r=t/2,s=no([0,50],[0,r]);return(r-s(e)*n)*n}function vj(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function Sj(t,e){if(e>0){const n=vj(t);return Math.min(...n)>=e}return!0}function no(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function wj(t){return(String(t).split(".")[1]||"").length}function jj(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var Oj=hu,Ej=xu,Aj=vu,Cj=Su;function _j({className:t,defaultValue:e,value:n,min:r=0,max:i=100,...s}){const o=N.useMemo(()=>Array.isArray(n)?n:Array.isArray(e)?e:[r,i],[n,e,r,i]);return m.jsxs(Oj,{"data-slot":"slider",defaultValue:e,value:n,min:r,max:i,className:Y("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...s,children:[m.jsx(Ej,{"data-slot":"slider-track",className:Y("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:m.jsx(Aj,{"data-slot":"slider-range",className:Y("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(a,l)=>m.jsx(Cj,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},l))]})}const Ij=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Tj({value:t,readonly:e,disabled:n,options:r,schema:i,onChange:s,label:o,id:a}){const l=d=>s(d[0]),u={...Tc(i)},c={id:a,...Ls(r.props||{},Ij)};return m.jsxs(m.Fragment,{children:[m.jsx(_j,{disabled:n||e,min:u.min,max:u.max,step:u.step,value:[t],onValueChange:l,...c,"aria-describedby":Fe(a)}),t]})}const Nj=ds("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Pj({className:t,variant:e,asChild:n=!1,...r}){const i=n?tl:"span";return m.jsx(i,{"data-slot":"badge",className:Y(Nj({variant:e}),t),...r})}const Ou=N.forwardRef(({className:t,...e},n)=>m.jsx(Lt,{ref:n,"data-slot":"command",className:Y("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),Fj=N.forwardRef(({className:t,...e},n)=>m.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m.jsx(xw,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m.jsx(Lt.Input,{ref:n,className:Y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Fj.displayName=Lt.Input.displayName;function Eu({className:t,...e}){return m.jsx(Lt.List,{"data-slot":"command-list",className:Y("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function Au({className:t,...e}){return m.jsx(Lt.Group,{"data-slot":"command-group",className:Y("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function Cu({className:t,...e}){return m.jsx(Lt.Item,{"data-slot":"command-item",className:Y("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function $j({multiple:t,items:e=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:s=!1,ariaDescribedby:o,ariaPlaceholder:a,onFocus:l,onBlur:u,className:c,id:d}){const h=N.useRef(null),[g,f]=N.useState(!1),[p,y]=N.useState(""),x=N.useMemo(()=>e.filter(w=>n.some(O=>_r(w.value,O))),[e,n]),S=N.useMemo(()=>e.filter(w=>!x.some(O=>_r(O.value,w.value))),[e,x]),E=N.useCallback(w=>{if(s)return;const O=x.filter(C=>!_r(C.value,w.value));r?.(O.map(C=>C.index))},[x,r,s]),j=N.useCallback(w=>{if(!(s||!h.current||h.current.value!==""))if(w.key==="Delete"||w.key==="Backspace"){const O=x.slice(0,-1);r?.(O.map(C=>C.index))}else w.key==="Escape"&&h.current.blur()},[x,r,s]),b=N.useCallback(w=>{if(s)return;y("");const O=t?[...x,w]:[w];r?.(O.map(C=>C.index))},[t,x,r,s]),v=N.useCallback(w=>{s||f(!0),l?.(w)},[s,l]);return m.jsxs(Ou,{onKeyDown:j,className:Y("overflow-visible bg-transparent",c),autoFocus:i,"aria-disabled":s,onBlur:u,onFocus:v,"aria-describedby":o,"aria-placeholder":a,children:[m.jsx("div",{className:Y("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",s&&"opacity-50 cursor-not-allowed"),children:m.jsxs("div",{className:"flex gap-1 flex-wrap",children:[x.map(w=>m.jsxs(Pj,{variant:"secondary",children:[w.label,m.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:O=>O.key==="Enter"&&!s&&E(w),onMouseDown:O=>{O.preventDefault(),O.stopPropagation()},onClick:()=>E(w),disabled:s,children:m.jsx(su,{className:Y("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},w.value)),m.jsx(Lt.Input,{ref:h,value:p,onValueChange:y,onBlur:()=>f(!1),onFocus:()=>!s&&f(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:s,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),g&&!s&&S.length>0&&m.jsx("div",{className:"relative mt-2",children:m.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:m.jsx(Au,{className:"h-full overflow-auto",children:m.jsx(Eu,{children:S.map(w=>m.jsx(Cu,{disabled:w.disabled,onMouseDown:O=>{O.preventDefault(),O.stopPropagation()},"aria-controls":`${w.value}-command-item`,"aria-labelledby":`${w.value}-command-item`,id:`${w.value}-command-item`,onSelect:()=>b(w),className:"cursor-pointer",children:w.label},`${w.value}-command-item`))})})})})]})}function Dj({items:t,selected:e,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:s=!1,placeholder:o="Select...",ariaDescribedby:a,ariaPlaceholder:l,onFocus:u,onBlur:c,className:d}){const[h,g]=N.useState(!1),f=t?.find(S=>S.value===e),p=N.useRef(null),y=N.useRef(null);N.useEffect(()=>{h&&p.current&&requestAnimationFrame(()=>{var S;(S=p.current)===null||S===void 0||S.scrollIntoView({block:"nearest"})})},[h]);const x=S=>{y.current&&!y.current.contains(S.relatedTarget)&&g(!1),c?.(S)};return m.jsxs(Ou,{ref:y,className:Y("overflow-visible bg-transparent",d),autoFocus:r,"aria-disabled":i,onBlur:x,onFocus:u,"aria-describedby":a,"aria-placeholder":l,children:[m.jsxs("div",{role:"button",tabIndex:i?-1:0,onClick:()=>!i&&g(!h),onKeyDown:S=>(S.key==="Enter"||S.key===" ")&&!i&&g(!h),className:Y("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!f&&s&&"border-red-500",i&&"opacity-50 cursor-not-allowed",d),children:[m.jsx("span",{className:Y("flex-1 line-clamp-1",!f&&"text-muted-foreground"),children:f?.label||o}),m.jsx(ru,{className:"h-4 w-4 opacity-50"})]}),m.jsx("div",{className:"relative",children:h&&t&&t.length>0?m.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:m.jsx(Au,{className:"h-full overflow-auto",children:m.jsx(Eu,{children:t.map(S=>m.jsxs(Cu,{ref:S.value===e?p:void 0,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onSelect:()=>{S.disabled||(n?.(S.value),g(!1))},className:Y("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",S.value===e&&"font-semibold",S.disabled&&"opacity-50 cursor-not-allowed"),children:[m.jsx("span",{children:S.label}),m.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:S.value===e&&m.jsx(aw,{className:"h-4 w-4"})})]},S.value))})})}):null})]})}function Rj({id:t,options:e,required:n,disabled:r,readonly:i,value:s,multiple:o,autofocus:a,onChange:l,onBlur:u,onFocus:c,placeholder:d,rawErrors:h=[],className:g}){const{enumOptions:f,enumDisabled:p,emptyValue:y}=e,x=vn(e),S=()=>{c(t,Te(s,f,x,y))},E=()=>{u(t,Te(s,f,x,y))},j=f?.map(({value:v,label:w},O)=>({value:o?v:dr(v,O,x),label:w,index:O,disabled:Array.isArray(p)&&p.includes(v)})),b=Y({"border-destructive":h.length>0},g);return m.jsx("div",{className:"p-0.5",children:o?m.jsx($j,{id:t,autoFocus:a,disabled:r||i,multiple:!0,className:b,items:j,selected:s,onValueChange:v=>{l(Te(v.map(String),f,x,y))},onFocus:S,onBlur:E}):m.jsx(Dj,{items:j,selected:Cc(s,f,!1,x,""),onValueChange:v=>{l(Te(v,f,x,y))},autoFocus:a,disabled:r||i,required:n,placeholder:d,className:b,onFocus:S,onBlur:E,ariaDescribedby:Fe(t)})})}function kj({className:t,...e}){return m.jsx("textarea",{"data-slot":"textarea",className:Y("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function Mj({id:t,htmlName:e,placeholder:n,value:r,required:i,disabled:s,autofocus:o,readonly:a,onBlur:l,onFocus:u,onChange:c,options:d,className:h}){const g=({target:{value:y}})=>c(y===""?d.emptyValue:y),f=({target:y})=>l(t,y&&y.value),p=({target:y})=>u(t,y&&y.value);return m.jsx("div",{className:"flex p-0.5",children:m.jsx(kj,{id:t,name:e||t,placeholder:n,disabled:s,readOnly:a,value:r??"",required:i,autoFocus:o,rows:d.rows||5,onChange:g,onBlur:f,onFocus:p,"aria-describedby":Fe(t),className:h})})}function Uj(){return{CheckboxWidget:sj,CheckboxesWidget:ij,RadioWidget:lj,RangeWidget:Tj,SelectWidget:Rj,TextareaWidget:Mj}}function Lj(){return{templates:ej(),widgets:Uj()}}function Bj(){return US(Lj())}const Vj=Bj();function qj(t){const e=je.c(21),{virtualMcp:n,isSelected:r}=t,i=r&&"bg-accent";let s;e[0]!==i?(s=Ur("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",i),e[0]=i,e[1]=s):s=e[1];let o;e[2]!==n.icon||e[3]!==n.title?(o=m.jsx(il,{icon:n.icon,name:n.title,size:"sm"}),e[2]=n.icon,e[3]=n.title,e[4]=o):o=e[4];let a;e[5]!==n.title?(a=m.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[5]=n.title,e[6]=a):a=e[6];let l;e[7]!==r?(l=r&&m.jsx(Md,{size:16,className:"text-foreground shrink-0"}),e[7]=r,e[8]=l):l=e[8];let u;e[9]!==a||e[10]!==l?(u=m.jsxs("div",{className:"flex items-center justify-between",children:[a,l]}),e[9]=a,e[10]=l,e[11]=u):u=e[11];let c;e[12]!==n.description?(c=n.description&&m.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[12]=n.description,e[13]=c):c=e[13];let d;e[14]!==u||e[15]!==c?(d=m.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[u,c]}),e[14]=u,e[15]=c,e[16]=d):d=e[16];let h;return e[17]!==s||e[18]!==o||e[19]!==d?(h=m.jsxs("div",{className:s,children:[o,d]}),e[17]=s,e[18]=o,e[19]=d,e[20]=h):h=e[20],h}function zj(){const t=je.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx("div",{className:"flex items-center justify-center py-12",children:m.jsx(fs,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function Wj(t){const e=je.c(40),{selectedVirtualMcpId:n,onVirtualMcpChange:r,searchInputRef:i}=t,s=lt(),o=kd(),[a,l]=N.useState(""),u=N.useRef(null),c=i??u;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={navigateOnCreate:!0},e[0]=d):d=e[0];const{createVirtualMCP:h,isCreating:g}=Vd(d);let f,p,y,x;if(e[1]!==h||e[2]!==c||e[3]!==g||e[4]!==r||e[5]!==a||e[6]!==n||e[7]!==s||e[8]!==o){let j;e:{const P=o.filter(Hj);if(!a.trim()){j=P;break e}const F=a.toLowerCase();j=P.filter($=>$.title.toLowerCase().includes(F)||$.description?.toLowerCase().includes(F))}const b=j;let v;e[13]!==r?(v=P=>{r(P),l("")},e[13]=r,e[14]=v):v=e[14];const w=v;y="flex flex-col max-h-[min(400px,60dvh)]";let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=m.jsx(Ud,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[15]=O):O=e[15];let C;e[16]!==s?(C=s("chat.selectVirtualMcp.searchPlaceholder"),e[16]=s,e[17]=C):C=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=P=>l(P.target.value),e[18]=A):A=e[18];let _;e[19]!==c||e[20]!==a||e[21]!==C?(_=m.jsx(Id,{ref:c,type:"text",placeholder:C,value:a,onChange:A,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[19]=c,e[20]=a,e[21]=C,e[22]=_):_=e[22];let I;e[23]!==g||e[24]!==s?(I=s(g?"chat.selectVirtualMcp.creating":"chat.selectVirtualMcp.createAgent"),e[23]=g,e[24]=s,e[25]=I):I=e[25];let T;e[26]!==h||e[27]!==g||e[28]!==I?(T=m.jsx(Lr,{onClick:h,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:g,children:I}),e[26]=h,e[27]=g,e[28]=I,e[29]=T):T=e[29],e[30]!==_||e[31]!==T?(x=m.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:m.jsxs("div",{className:"relative flex items-center gap-2",children:[O,_,T]})}),e[30]=_,e[31]=T,e[32]=x):x=e[32],f="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",p=b.length>0?m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:b.map(P=>m.jsx("div",{role:"button",tabIndex:0,onClick:()=>w(P.id),onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),w(P.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:m.jsx(qj,{virtualMcp:P,isSelected:P.id===n})},P.id))}):m.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:s("chat.selectVirtualMcp.noAgentsFound")}),e[1]=h,e[2]=c,e[3]=g,e[4]=r,e[5]=a,e[6]=n,e[7]=s,e[8]=o,e[9]=f,e[10]=p,e[11]=y,e[12]=x}else f=e[9],p=e[10],y=e[11],x=e[12];let S;e[33]!==f||e[34]!==p?(S=m.jsx("div",{className:f,children:p}),e[33]=f,e[34]=p,e[35]=S):S=e[35];let E;return e[36]!==y||e[37]!==x||e[38]!==S?(E=m.jsxs("div",{className:y,children:[x,S]}),e[36]=y,e[37]=x,e[38]=S,e[39]=E):E=e[39],E}function Hj(t){return!t.id||!od(t.id)}function Kj(t){const e=je.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsx(zj,{}),e[0]=n):n=e[0];let r;return e[1]!==t?(r=m.jsx(N.Suspense,{fallback:n,children:m.jsx(Wj,{...t})}),e[1]=t,e[2]=r):r=e[2],r}function Gj(t){const e=je.c(35),{selectedVirtualMcpId:n,selectedVirtualMcp:r,onVirtualMcpChange:i,className:s,showTooltip:o,disabled:a}=t,l=o===void 0?!0:o,u=a===void 0?!1:a,c=lt(),[d,h]=N.useState(!1),g=N.useRef(null);let f;e[0]!==i?(f=$=>{i($),h(!1)},e[0]=i,e[1]=f):f=e[1];const p=f,y=Bd();let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=$=>{h($)},e[2]=x):x=e[2];const S=x;let E,j;e[3]!==y||e[4]!==d?(E=()=>{d&&!y&&setTimeout(()=>{g.current?.focus()},0)},j=[d,y],e[3]=y,e[4]=d,e[5]=E,e[6]=j):(E=e[5],j=e[6]),N.useEffect(E,j);const b=u?!1:d,v=u?void 0:S,w=u?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let O;e[7]!==s||e[8]!==w?(O=Ur("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",w,s),e[7]=s,e[8]=w,e[9]=O):O=e[9];let C;e[10]!==c?(C=c("chat.selectVirtualMcp.selectAgent"),e[10]=c,e[11]=C):C=e[11];let A;e[12]!==r?(A=r?m.jsx(il,{icon:r.icon,name:r.title,size:"sm",className:"absolute inset-0 size-full"}):m.jsxs(m.Fragment,{children:[m.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[m.jsx("defs",{children:m.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[m.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),m.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),m.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),m.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),m.jsx(Ld,{size:16})]}),e[12]=r,e[13]=A):A=e[13];let _;e[14]!==u||e[15]!==O||e[16]!==C||e[17]!==A?(_=m.jsx($d,{asChild:!0,children:m.jsx(Td,{asChild:!0,children:m.jsx("button",{type:"button",disabled:u,className:O,"aria-label":C,children:A})})}),e[14]=u,e[15]=O,e[16]=C,e[17]=A,e[18]=_):_=e[18];let I;e[19]!==d||e[20]!==r?.title||e[21]!==l||e[22]!==c?(I=l&&!d&&m.jsx(Fd,{side:"top",className:"text-xs",children:r?.title??c("chat.selectVirtualMcp.chooseAgentTooltip")}),e[19]=d,e[20]=r?.title,e[21]=l,e[22]=c,e[23]=I):I=e[23];let T;e[24]!==_||e[25]!==I?(T=m.jsx(Dd,{children:m.jsxs(Rd,{children:[_,I]})}),e[24]=_,e[25]=I,e[26]=T):T=e[26];let P;e[27]!==p||e[28]!==n?(P=m.jsx(Nd,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:m.jsx(Kj,{selectedVirtualMcpId:n,onVirtualMcpChange:p,searchInputRef:g})}),e[27]=p,e[28]=n,e[29]=P):P=e[29];let F;return e[30]!==T||e[31]!==P||e[32]!==b||e[33]!==v?(F=m.jsxs(Pd,{open:b,onOpenChange:v,children:[T,P]}),e[30]=T,e[31]=P,e[32]=b,e[33]=v,e[34]=F):F=e[34],F}function Yj(t){const e=t.properties;if(!e)return!1;const n=e.__type,r=e.__binding;return!!(n?.const||r?.const)}function Jj(t){const e=t.properties;if(!e)return{};const n=e.__type,r=e.__binding;return{bindingType:n?.const,bindingSchema:r?.const}}function Zj(t){const e=je.c(10),{bindingSchema:n,bindingType:r,currentValue:i,onValueChange:s,placeholder:o,onAddNew:a,className:l}=t;let u;e[0]!==r?(u=em(r),e[0]=r,e[1]=u):u=e[1];const d=u??(typeof n=="string"?n:n??void 0);let h;return e[2]!==r||e[3]!==l||e[4]!==i||e[5]!==a||e[6]!==s||e[7]!==o||e[8]!==d?(h=m.jsx(Xj,{value:i,onValueChange:s,placeholder:o,binding:d,bindingType:r,onAddNew:a,className:l}),e[2]=r,e[3]=l,e[4]=i,e[5]=a,e[6]=s,e[7]=o,e[8]=d,e[9]=h):h=e[9],h}function Xj({value:t,onValueChange:e,placeholder:n="Select a connection...",binding:r,bindingType:i,onAddNew:s,className:o}){const a=lt(),[l,u]=N.useState(!1),{installByBinding:c,isInstalling:d}=rm(),h=l||d,g=r?void 0:i||void 0,f=fd(r?{binding:r}:g?{filters:[{column:"app_name",value:g}]}:{}),p=md(t&&!f.some(E=>E.id===t)?t:void 0),y=p?[p,...f]:f,x=i?.startsWith("@"),S=async()=>{if(x&&i){u(!0);try{const E=await c(i);E&&e(E.id)}catch(E){const j=E instanceof Error?E.message:String(E);vr.error(a("details.mcpConfigurationForm.failedToConnectMcp",{message:j}))}finally{u(!1)}return}s?.()};return m.jsxs(Sd,{value:t,onValueChange:e,children:[m.jsx(wd,{size:"sm",className:Ur("w-[200px]",o),children:m.jsx(jd,{placeholder:n})}),m.jsxs(Od,{children:[y.length===0?m.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:a("details.mcpConfigurationForm.noConnectionsFound")}):y.map(E=>m.jsx(Ed,{value:E.id,children:m.jsxs("div",{className:"flex items-center gap-2",children:[E.icon?m.jsx("img",{src:E.icon,alt:E.title,className:"w-4 h-4 rounded"}):m.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:E.title.slice(0,1).toUpperCase()}),m.jsx("span",{children:E.title})]})},E.id)),(s||x)&&m.jsx("div",{className:"border-t border-border",children:m.jsx(Lr,{onClick:E=>{E.preventDefault(),E.stopPropagation(),S()},disabled:h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:h?m.jsxs(m.Fragment,{children:[m.jsx(fs,{size:16,className:"animate-spin"}),m.jsx("span",{children:a("details.mcpConfigurationForm.connecting")})]}):m.jsxs(m.Fragment,{children:[m.jsx(vd,{size:16}),m.jsx("span",{children:a("details.mcpConfigurationForm.customConnection")})]})})})]})]})}function Qj(t){const e=je.c(50),n=lt(),{schema:r,formData:i,title:s,description:o,registry:a}=t,l=a.formContext,u=s||"",c=s||"";if(Yj(r)){const g=r;let f;e[0]!==g?(f=Jj(g),e[0]=g,e[1]=f):f=e[1];const{bindingType:p,bindingSchema:y}=f,S=(l?.formData?.[u]?.value??i?.value)||"";let E;e[2]!==p||e[3]!==u||e[4]!==l||e[5]!==i?(E=F=>{const $={...i,value:F??"",...p&&{__type:p}};l?.onFieldChange(u,$)},e[2]=p,e[3]=u,e[4]=l,e[5]=i,e[6]=E):E=e[6];const j=E,b=tO;let v;e[7]!==c||e[8]!==u||e[9]!==s?(v=b(s||c||u),e[7]=c,e[8]=u,e[9]=s,e[10]=v):v=e[10];const w=v;if(p==="@deco/agent"){let F;e[11]!==w?(F=m.jsx("label",{className:"text-sm font-medium truncate block",children:w}),e[11]=w,e[12]=F):F=e[12];let $;e[13]!==o?($=o&&m.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o}),e[13]=o,e[14]=$):$=e[14];let k;e[15]!==F||e[16]!==$?(k=m.jsxs("div",{className:"flex-1 min-w-0",children:[F,$]}),e[15]=F,e[16]=$,e[17]=k):k=e[17];const M=S||void 0;let U;e[18]!==j||e[19]!==M?(U=m.jsx(Gj,{selectedVirtualMcpId:M,onVirtualMcpChange:j,variant:"bordered",placeholder:"Select Agent",className:"w-[200px] shrink-0"}),e[18]=j,e[19]=M,e[20]=U):U=e[20];let J;return e[21]!==k||e[22]!==U?(J=m.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[k,U]}),e[21]=k,e[22]=U,e[23]=J):J=e[23],J}let O;e[24]!==w?(O=m.jsx("label",{className:"text-sm font-medium truncate block",children:w}),e[24]=w,e[25]=O):O=e[25];let C;e[26]!==o?(C=o&&m.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o}),e[26]=o,e[27]=C):C=e[27];let A;e[28]!==O||e[29]!==C?(A=m.jsxs("div",{className:"flex-1 min-w-0",children:[O,C]}),e[28]=O,e[29]=C,e[30]=A):A=e[30];let _;e[31]!==w||e[32]!==n?(_=n("details.mcpConfigurationForm.selectPlaceholder",{title:w.toLowerCase()}),e[31]=w,e[32]=n,e[33]=_):_=e[33];let I;e[34]!==l?(I=()=>l?.onAddNew(),e[34]=l,e[35]=I):I=e[35];let T;e[36]!==y||e[37]!==p||e[38]!==S||e[39]!==j||e[40]!==_||e[41]!==I?(T=m.jsx(Zj,{bindingSchema:y,bindingType:p,currentValue:S,onValueChange:j,placeholder:_,onAddNew:I,className:"w-[200px] shrink-0"}),e[36]=y,e[37]=p,e[38]=S,e[39]=j,e[40]=_,e[41]=I,e[42]=T):T=e[42];let P;return e[43]!==A||e[44]!==T?(P=m.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[A,T]}),e[43]=A,e[44]=T,e[45]=P):P=e[45],P}let d;e[46]!==t.properties?(d=t.properties.map(eO),e[46]=t.properties,e[47]=d):d=e[47];let h;return e[48]!==d?(h=m.jsx("div",{className:"flex flex-col gap-4",children:d}),e[48]=d,e[49]=h):h=e[49],h}function eO(t){return t.content}function tO(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,nO)}function nO(t){return t.toUpperCase()}function rO(t){const e=je.c(13),{label:n,children:r,description:i,id:s,schema:o}=t;if(s.includes("__type")||s.includes("__binding"))return null;if(o.type==="object")return r;let a;e[0]!==s||e[1]!==n?(a=n&&m.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:s,children:n}),e[0]=s,e[1]=n,e[2]=a):a=e[2];let l;e[3]!==i?(l=i&&m.jsx("div",{className:"text-xs text-muted-foreground truncate",children:i}),e[3]=i,e[4]=l):l=e[4];let u;e[5]!==a||e[6]!==l?(u=m.jsxs("div",{className:"flex-1 min-w-0",children:[a,l]}),e[5]=a,e[6]=l,e[7]=u):u=e[7];let c;e[8]!==r?(c=m.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=c):c=e[9];let d;return e[10]!==u||e[11]!==c?(d=m.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[u,c]}),e[10]=u,e[11]=c,e[12]=d):d=e[12],d}const iO={ObjectFieldTemplate:Qj,FieldTemplate:rO};function sO(t){const e=je.c(19),{formKey:n,formState:r,onFormStateChange:i,stateSchema:s}=t,{org:o}=cs(),a=Xu();let l;e[0]!==i?(l=S=>{S.formData&&i(S.formData)},e[0]=i,e[1]=l):l=e[1];const u=l;let c;e[2]!==r||e[3]!==i?(c=(S,E)=>{const j={...r,[S]:E};i(j)},e[2]=r,e[3]=i,e[4]=c):c=e[4];const d=c;let h;e[5]!==a||e[6]!==o?(h=()=>{a({to:"/$org/settings/connections",params:{org:o.slug},search:{action:"create"}})},e[5]=a,e[6]=o,e[7]=h):h=e[7];const g=h;let f;e[8]!==r||e[9]!==g||e[10]!==d?(f={onFieldChange:d,formData:r,onAddNew:g},e[8]=r,e[9]=g,e[10]=d,e[11]=f):f=e[11];const p=f;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=m.jsx(m.Fragment,{}),e[12]=y):y=e[12];let x;return e[13]!==p||e[14]!==n||e[15]!==r||e[16]!==u||e[17]!==s?(x=m.jsx("div",{className:"flex flex-col h-full overflow-auto",children:m.jsx(Vj,{schema:s,validator:QS,formData:r,onChange:u,formContext:p,liveValidate:!1,showErrorList:!1,templates:iO,children:y},n)}),e[13]=p,e[14]=n,e[15]=r,e[16]=u,e[17]=s,e[18]=x):x=e[18],x}function oO(t){const e=je.c(14),{org:n}=cs();let r;e[0]!==t||e[1]!==n.id||e[2]!==n.slug?(r={connectionId:t,orgId:n.id,orgSlug:n.slug},e[0]=t,e[1]=n.id,e[2]=n.slug,e[3]=r):r=e[3];const i=ad(r);let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={},e[4]=s):s=e[4];let o;e[5]!==i?(o={client:i,toolName:"MCP_CONFIGURATION",toolArguments:s,select:aO},e[5]=i,e[6]=o):o=e[6];const{data:a}=ld(o);let l;e[7]!==a.stateSchema?(l=a.stateSchema??{type:"object",properties:{}},e[7]=a.stateSchema,e[8]=l):l=e[8];const u=l;let c;e[9]!==a.scopes?(c=a.scopes??[],e[9]=a.scopes,e[10]=c):c=e[10];const d=c;let h;return e[11]!==d||e[12]!==u?(h={stateSchema:u,scopes:d},e[11]=d,e[12]=u,e[13]=h):h=e[13],h}function aO(t){return t.structuredContent??t}function lO(t){const e=je.c(17),{onAuthenticate:n,buttonText:r}=t,i=r===void 0?"Authenticate":r,s=lt();let o;e[0]!==s?(o=s("details.settingsTab.authenticationRequired"),e[0]=s,e[1]=o):o=e[1];let a;e[2]!==o?(a=m.jsx("h3",{className:"text-sm font-semibold",children:o}),e[2]=o,e[3]=a):a=e[3];let l;e[4]!==s?(l=s("details.settingsTab.oauthAuthenticationDescription"),e[4]=s,e[5]=l):l=e[5];let u;e[6]!==l?(u=m.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:l}),e[6]=l,e[7]=u):u=e[7];let c;e[8]!==a||e[9]!==u?(c=m.jsxs("div",{className:"flex flex-col gap-2",children:[a,u]}),e[8]=a,e[9]=u,e[10]=c):c=e[10];let d;e[11]!==i||e[12]!==n?(d=m.jsx(Lr,{onClick:n,size:"default",children:i}),e[11]=i,e[12]=n,e[13]=d):d=e[13];let h;return e[14]!==c||e[15]!==d?(h=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[c,d]})}),e[14]=c,e[15]=d,e[16]=h):h=e[16],h}function cO(t){const e=je.c(19),{hasReadme:n,onViewReadme:r}=t,i=lt();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(ud,{size:36,className:"text-muted-foreground"}),e[0]=s):s=e[0];let o;e[1]!==i?(o=i("details.settingsTab.manualAuthenticationRequired"),e[1]=i,e[2]=o):o=e[2];let a;e[3]!==o?(a=m.jsx("h3",{className:"text-sm font-semibold",children:o}),e[3]=o,e[4]=a):a=e[4];let l;e[5]!==i?(l=i("details.settingsTab.manualAuthenticationDescription"),e[5]=i,e[6]=l):l=e[6];let u;e[7]!==l?(u=m.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:l}),e[7]=l,e[8]=u):u=e[8];let c;e[9]!==a||e[10]!==u?(c=m.jsxs("div",{className:"flex flex-col gap-2",children:[a,u]}),e[9]=a,e[10]=u,e[11]=c):c=e[11];let d;e[12]!==n||e[13]!==r||e[14]!==i?(d=n&&r&&m.jsxs(Lr,{onClick:r,variant:"outline",size:"lg",children:[m.jsx(cd,{size:18,className:"mr-2"}),i("details.settingsTab.viewReadme")]}),e[12]=n,e[13]=r,e[14]=i,e[15]=d):d=e[15];let h;return e[16]!==c||e[17]!==d?(h=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[s,c,d]})}),e[16]=c,e[17]=d,e[18]=h):h=e[18],h}function uO(){const t=je.c(12),e=lt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("details.settingsTab.serverError"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==r?(i=m.jsx("h3",{className:"text-lg font-semibold",children:r}),t[3]=r,t[4]=i):i=t[4];let s;t[5]!==e?(s=e("details.settingsTab.serverErrorDescription"),t[5]=e,t[6]=s):s=t[6];let o;t[7]!==s?(o=m.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:s}),t[7]=s,t[8]=o):o=t[8];let a;return t[9]!==i||t[10]!==o?(a=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[n,m.jsxs("div",{className:"flex flex-col gap-2",children:[i,o]})]})}),t[9]=i,t[10]=o,t[11]=a):a=t[11],a}function dO(t){const e=je.c(19),{connection:n,form:r}=t,i=lt(),{stateSchema:s}=oO(n.id);let o;e[0]!==r.control?(o={control:r.control,name:"configuration_state"},e[0]=r.control,e[1]=o):o=e[1];const a=ed(o);let l;e[2]!==r?(l=g=>{r.setValue("configuration_state",g,{shouldDirty:!0})},e[2]=r,e[3]=l):l=e[3];const u=l;if(!(s&&s.properties&&typeof s.properties=="object"&&Object.keys(s.properties).length>0)){let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e[4]=g):g=e[4];let f;e[5]!==i?(f=i("details.settingsTab.serverAllSet"),e[5]=i,e[6]=f):f=e[6];let p;e[7]!==i?(p=i("details.settingsTab.noAdditionalConfigurationNeeded"),e[7]=i,e[8]=p):p=e[8];let y;return e[9]!==f||e[10]!==p?(y=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsx(nl,{image:g,title:f,description:p})}),e[9]=f,e[10]=p,e[11]=y):y=e[11],y}let d;e[12]!==a?(d=a??{},e[12]=a,e[13]=d):d=e[13];let h;return e[14]!==n.id||e[15]!==u||e[16]!==s||e[17]!==d?(h=m.jsx("div",{className:"flex-1 overflow-auto",children:m.jsx(sO,{formKey:n.id,stateSchema:s,formState:d,onFormStateChange:u})}),e[14]=n.id,e[15]=u,e[16]=s,e[17]=d,e[18]=h):h=e[18],h}function fO(t){const e=je.c(18),n=lt(),{connection:r,form:i,hasMcpBinding:s,isMCPAuthenticated:o,supportsOAuth:a,isServerError:l,onAuthenticate:u,onViewReadme:c}=t,h=!!r?.metadata?.repository?.url;if(!o){if(l){let y;return e[0]===Symbol.for("react.memo_cache_sentinel")?(y=m.jsx(uO,{}),e[0]=y):y=e[0],y}if(a){let y;return e[1]!==u?(y=m.jsx(lO,{onAuthenticate:u}),e[1]=u,e[2]=y):y=e[2],y}let p;return e[3]!==h||e[4]!==c?(p=m.jsx(cO,{hasReadme:h,onViewReadme:c}),e[3]=h,e[4]=c,e[5]=p):p=e[5],p}if(!s){let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e[6]=p):p=e[6];let y;e[7]!==n?(y=n("details.settingsTab.serverAllSet"),e[7]=n,e[8]=y):y=e[8];let x;e[9]!==n?(x=n("details.settingsTab.noAdditionalConfigurationNeeded"),e[9]=n,e[10]=x):x=e[10];let S;return e[11]!==y||e[12]!==x?(S=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsx(nl,{image:p,title:y,description:x})}),e[11]=y,e[12]=x,e[13]=S):S=e[13],S}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx("div",{className:"flex-1 flex items-center justify-center",children:m.jsx(fs,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=g):g=e[14];let f;return e[15]!==r||e[16]!==i?(f=m.jsx(Qu,{children:m.jsx(N.Suspense,{fallback:g,children:m.jsx(dO,{connection:r,form:i})})}),e[15]=r,e[16]=i,e[17]=f):f=e[17],f}function WO(t){const e=je.c(2);let n;return e[0]!==t?(n=m.jsx("div",{className:"flex-1 flex h-full",children:m.jsx(fO,{...t})}),e[0]=t,e[1]=n):n=e[1],n}export{cO as M,lO as O,WO as S,qO as V,VO as a,BO as b,LO as c};