zudoku 0.3.0-dev.3 → 0.3.0-dev.31

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 (417) hide show
  1. package/dist/app/demo.d.ts +2 -0
  2. package/dist/app/demo.js +27 -0
  3. package/dist/app/demo.js.map +1 -0
  4. package/dist/app/main.d.ts +2 -1
  5. package/dist/app/main.js +31 -10
  6. package/dist/app/main.js.map +1 -1
  7. package/dist/app/standalone.d.ts +2 -0
  8. package/dist/app/standalone.js +32 -0
  9. package/dist/app/standalone.js.map +1 -0
  10. package/dist/app/tailwind.d.ts +1 -1
  11. package/dist/app/tailwind.js +0 -9
  12. package/dist/app/tailwind.js.map +1 -1
  13. package/dist/config/config.d.ts +10 -16
  14. package/dist/lib/authentication/Callback.js +1 -1
  15. package/dist/lib/authentication/Callback.js.map +1 -1
  16. package/dist/lib/authentication/authentication.d.ts +2 -2
  17. package/dist/lib/authentication/hook.d.ts +1 -0
  18. package/dist/lib/authentication/hook.js +1 -0
  19. package/dist/lib/authentication/hook.js.map +1 -1
  20. package/dist/lib/authentication/providers/auth0.js +1 -0
  21. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  22. package/dist/lib/authentication/providers/clerk.js +2 -0
  23. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  24. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  25. package/dist/lib/authentication/providers/openid.js +2 -0
  26. package/dist/lib/authentication/providers/openid.js.map +1 -1
  27. package/dist/lib/authentication/state.d.ts +1 -0
  28. package/dist/lib/authentication/state.js +1 -0
  29. package/dist/lib/authentication/state.js.map +1 -1
  30. package/dist/lib/components/DevPortal.d.ts +5 -20
  31. package/dist/lib/components/DevPortal.js +20 -11
  32. package/dist/lib/components/DevPortal.js.map +1 -1
  33. package/dist/lib/components/Header.js +3 -3
  34. package/dist/lib/components/Header.js.map +1 -1
  35. package/dist/lib/components/Heading.d.ts +9 -4
  36. package/dist/lib/components/Heading.js +17 -2
  37. package/dist/lib/components/Heading.js.map +1 -1
  38. package/dist/lib/components/Layout.js +2 -2
  39. package/dist/lib/components/Layout.js.map +1 -1
  40. package/dist/lib/components/Router.js +2 -1
  41. package/dist/lib/components/Router.js.map +1 -1
  42. package/dist/lib/components/SyntaxHighlight.js +5 -1
  43. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  44. package/dist/lib/components/TopNavigation.d.ts +1 -1
  45. package/dist/lib/components/TopNavigation.js +4 -0
  46. package/dist/lib/components/TopNavigation.js.map +1 -1
  47. package/dist/lib/components/context/DevPortalProvider.d.ts +1 -1
  48. package/dist/lib/components/context/DevPortalProvider.js +2 -2
  49. package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
  50. package/dist/lib/components/index.d.ts +13 -3
  51. package/dist/lib/components/index.js +8 -3
  52. package/dist/lib/components/index.js.map +1 -1
  53. package/dist/lib/core/DevPortalContext.d.ts +33 -3
  54. package/dist/lib/core/DevPortalContext.js +8 -4
  55. package/dist/lib/core/DevPortalContext.js.map +1 -1
  56. package/dist/lib/core/plugins.d.ts +7 -4
  57. package/dist/lib/core/plugins.js +1 -0
  58. package/dist/lib/core/plugins.js.map +1 -1
  59. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  60. package/dist/lib/errors/ErrorAlert.js +8 -0
  61. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  62. package/dist/lib/errors/RouterError.d.ts +1 -0
  63. package/dist/lib/errors/RouterError.js +9 -0
  64. package/dist/lib/errors/RouterError.js.map +1 -0
  65. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  66. package/dist/lib/errors/TopLevelError.js +7 -0
  67. package/dist/lib/errors/TopLevelError.js.map +1 -0
  68. package/dist/lib/oas/graphql/index.js +1 -1
  69. package/dist/lib/oas/graphql/index.js.map +1 -1
  70. package/dist/lib/oas/parser/index.js +3 -1
  71. package/dist/lib/oas/parser/index.js.map +1 -1
  72. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +4 -0
  73. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +1 -1
  74. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  75. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +4 -0
  76. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +38 -0
  77. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  78. package/dist/lib/plugins/{api-key → api-keys}/index.js +37 -9
  79. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  80. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  81. package/dist/lib/plugins/markdown/MdxPage.js +7 -6
  82. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  83. package/dist/lib/plugins/markdown/Toc.js +1 -1
  84. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  85. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  86. package/dist/lib/plugins/markdown/generateRoutes.js +4 -4
  87. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  88. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  89. package/dist/lib/plugins/markdown/index.js +2 -2
  90. package/dist/lib/plugins/markdown/index.js.map +1 -1
  91. package/dist/lib/plugins/openapi/OperationList.js +5 -4
  92. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  93. package/dist/lib/plugins/openapi/OperationListItem.js +8 -4
  94. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  95. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  96. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  97. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  98. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  99. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +1 -1
  100. package/dist/lib/plugins/openapi/{MakeRequest.js → PlaygroundDialogWrapper.js} +5 -5
  101. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  102. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +1 -9
  103. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  104. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  105. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  106. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  107. package/dist/lib/plugins/openapi/Route.js +8 -0
  108. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  109. package/dist/lib/plugins/openapi/SchemaListView.js +4 -26
  110. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  111. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +7 -0
  112. package/dist/lib/plugins/openapi/SchemaListViewItem.js +16 -0
  113. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  114. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  115. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  116. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  117. package/dist/lib/plugins/openapi/Sidecar.js +10 -8
  118. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  119. package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
  120. package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
  121. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
  122. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  123. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  124. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  125. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  126. package/dist/lib/plugins/openapi/client/createServer.js +30 -0
  127. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  128. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  129. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +11 -2
  130. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  131. package/dist/lib/plugins/openapi/client/interfaces.d.ts +2 -0
  132. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  133. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  134. package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
  135. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  136. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  137. package/dist/lib/plugins/openapi/context.js +11 -0
  138. package/dist/lib/plugins/openapi/context.js.map +1 -0
  139. package/dist/lib/plugins/openapi/index.d.ts +1 -19
  140. package/dist/lib/plugins/openapi/index.js +27 -20
  141. package/dist/lib/plugins/openapi/index.js.map +1 -1
  142. package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
  143. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  144. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  145. package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -3
  146. package/dist/lib/plugins/openapi/playground/Headers.js +16 -6
  147. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  148. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +1 -1
  149. package/dist/lib/plugins/openapi/playground/Playground.d.ts +4 -3
  150. package/dist/lib/plugins/openapi/playground/Playground.js +8 -12
  151. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  152. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +3 -0
  153. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +10 -0
  154. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  155. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  156. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  157. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  158. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  159. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  160. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  161. package/dist/lib/plugins/openapi-worker.js +1 -1
  162. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  163. package/dist/lib/ui/Callout.js +1 -1
  164. package/dist/lib/ui/Callout.js.map +1 -1
  165. package/dist/lib/ui/button-variants.d.ts +1 -1
  166. package/dist/lib/util/MdxComponents.js +1 -1
  167. package/dist/lib/util/MdxComponents.js.map +1 -1
  168. package/dist/lib/util/logInit.d.ts +1 -0
  169. package/dist/lib/util/logInit.js +9 -0
  170. package/dist/lib/util/logInit.js.map +1 -0
  171. package/dist/lib/util/objectEntries.d.ts +4 -0
  172. package/dist/lib/util/objectEntries.js +2 -0
  173. package/dist/lib/util/objectEntries.js.map +1 -0
  174. package/dist/lib/util/renderIf.d.ts +1 -0
  175. package/dist/lib/util/renderIf.js +2 -0
  176. package/dist/lib/util/renderIf.js.map +1 -0
  177. package/dist/vite/build.js +4 -1
  178. package/dist/vite/build.js.map +1 -1
  179. package/dist/vite/config.d.ts +11 -8
  180. package/dist/vite/config.js +58 -50
  181. package/dist/vite/config.js.map +1 -1
  182. package/dist/vite/config.test.js +7 -4
  183. package/dist/vite/config.test.js.map +1 -1
  184. package/dist/vite/dev-server.js +4 -4
  185. package/dist/vite/dev-server.js.map +1 -1
  186. package/dist/vite/html.js +0 -1
  187. package/dist/vite/html.js.map +1 -1
  188. package/dist/vite/plugin-api-keys.js +7 -8
  189. package/dist/vite/plugin-api-keys.js.map +1 -1
  190. package/dist/vite/plugin-api.js +7 -11
  191. package/dist/vite/plugin-api.js.map +1 -1
  192. package/dist/vite/plugin-auth.js +5 -6
  193. package/dist/vite/plugin-auth.js.map +1 -1
  194. package/dist/vite/plugin-component.js +1 -1
  195. package/dist/vite/plugin-component.js.map +1 -1
  196. package/dist/vite/plugin-config.d.ts +0 -1
  197. package/dist/vite/plugin-config.js +13 -7
  198. package/dist/vite/plugin-config.js.map +1 -1
  199. package/dist/vite/plugin-docs.js +9 -8
  200. package/dist/vite/plugin-docs.js.map +1 -1
  201. package/dist/vite/plugin-docs.test.js +1 -1
  202. package/dist/vite/plugin-docs.test.js.map +1 -1
  203. package/dist/vite/plugin-html.js +1 -9
  204. package/dist/vite/plugin-html.js.map +1 -1
  205. package/dist/vite/plugin-mdx.d.ts +3 -1
  206. package/dist/vite/plugin-mdx.js +4 -4
  207. package/dist/vite/plugin-mdx.js.map +1 -1
  208. package/dist/vite/plugin-openapi-worker.js +11 -3
  209. package/dist/vite/plugin-openapi-worker.js.map +1 -1
  210. package/dist/vite/plugin-redirect.js +9 -9
  211. package/dist/vite/plugin-redirect.js.map +1 -1
  212. package/dist/vite/plugin.js +1 -1
  213. package/dist/vite/plugin.js.map +1 -1
  214. package/lib/AnchorLink-ptdQk87q.js +706 -0
  215. package/lib/AnchorLink-ptdQk87q.js.map +1 -0
  216. package/lib/DevPortalProvider-BMk-RCE0.js +1081 -0
  217. package/lib/DevPortalProvider-BMk-RCE0.js.map +1 -0
  218. package/lib/Markdown-DDmW47R9.js +8621 -0
  219. package/lib/Markdown-DDmW47R9.js.map +1 -0
  220. package/lib/MdxComponents-C0R6zobS.js +3019 -0
  221. package/lib/MdxComponents-C0R6zobS.js.map +1 -0
  222. package/lib/MdxPage-DyJAHF9y.js +217 -0
  223. package/lib/MdxPage-DyJAHF9y.js.map +1 -0
  224. package/lib/OperationList-Dz9rHM9r.js +5546 -0
  225. package/lib/OperationList-Dz9rHM9r.js.map +1 -0
  226. package/lib/Route-CN_7-e5r.js +14 -0
  227. package/lib/Route-CN_7-e5r.js.map +1 -0
  228. package/lib/Select-D-Jtx53Q.js +4572 -0
  229. package/lib/Select-D-Jtx53Q.js.map +1 -0
  230. package/lib/Spinner-BG1JnYy0.js +182 -0
  231. package/lib/Spinner-BG1JnYy0.js.map +1 -0
  232. package/lib/_commonjsHelpers-BkfeUUK-.js +1 -0
  233. package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
  234. package/lib/assets/index-BPdJm2ty.js +1 -0
  235. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  236. package/lib/assets/{worker-BCcpCNJ7.js → worker-BXS8hiSM.js} +9844 -9800
  237. package/lib/assets/worker-BXS8hiSM.js.map +1 -0
  238. package/lib/cn-DpqTslo9.js +2342 -0
  239. package/lib/cn-DpqTslo9.js.map +1 -0
  240. package/lib/context-_fYfJFgk.js +14 -0
  241. package/lib/context-_fYfJFgk.js.map +1 -0
  242. package/lib/hook-BzBeIPL4.js +25 -0
  243. package/lib/hook-BzBeIPL4.js.map +1 -0
  244. package/lib/index-BaOOUFsA.js +412 -0
  245. package/lib/index-BaOOUFsA.js.map +1 -0
  246. package/lib/index-CPvRaBBB.js +713 -0
  247. package/lib/index-CPvRaBBB.js.map +1 -0
  248. package/lib/index-Cpdpun6t.js +710 -0
  249. package/lib/index-Cpdpun6t.js.map +1 -0
  250. package/lib/index-DLS6fPwU.js +464 -0
  251. package/lib/index-DLS6fPwU.js.map +1 -0
  252. package/lib/jsx-runtime-SV6hXQua.js +3009 -0
  253. package/lib/jsx-runtime-SV6hXQua.js.map +1 -0
  254. package/lib/loglevel-CA34MiFn.js +153 -0
  255. package/lib/loglevel-CA34MiFn.js.map +1 -0
  256. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  257. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  258. package/lib/prism-csharp.min-Yizuc34Y.js +35 -0
  259. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  260. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  261. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  262. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  263. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  264. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  265. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  266. package/lib/prism-objectivec.min-BXSWqpJJ.js +2 -0
  267. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  268. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  269. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  270. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  271. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  272. package/lib/{state-oycsxkHz.js → state-Ds_OxRHP.js} +20 -18
  273. package/lib/state-Ds_OxRHP.js.map +1 -0
  274. package/lib/urql-DMlBWUKL.js +1 -0
  275. package/lib/urql-DMlBWUKL.js.map +1 -0
  276. package/lib/util-CCWvaWo7.js +41 -0
  277. package/lib/util-CCWvaWo7.js.map +1 -0
  278. package/lib/zudoku.auth-auth0.js +3 -1
  279. package/lib/zudoku.auth-auth0.js.map +1 -0
  280. package/lib/zudoku.auth-clerk.js +11 -8
  281. package/lib/zudoku.auth-clerk.js.map +1 -0
  282. package/lib/zudoku.auth-openid.js +444 -588
  283. package/lib/zudoku.auth-openid.js.map +1 -0
  284. package/lib/zudoku.components.js +429 -334
  285. package/lib/zudoku.components.js.map +1 -0
  286. package/lib/zudoku.openapi-worker.js +16 -13
  287. package/lib/zudoku.openapi-worker.js.map +1 -0
  288. package/lib/zudoku.plugin-api-keys.js +296 -0
  289. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  290. package/lib/zudoku.plugin-markdown.js +52 -0
  291. package/lib/zudoku.plugin-markdown.js.map +1 -0
  292. package/lib/zudoku.plugin-openapi.js +8 -0
  293. package/lib/zudoku.plugin-openapi.js.map +1 -0
  294. package/lib/zudoku.plugin-redirect.js +12 -0
  295. package/lib/zudoku.plugin-redirect.js.map +1 -0
  296. package/package.json +21 -6
  297. package/src/app/demo-cdn.html +26 -0
  298. package/src/app/demo.html +18 -0
  299. package/src/app/demo.tsx +40 -0
  300. package/src/app/main.css +74 -0
  301. package/src/app/main.tsx +42 -9
  302. package/src/app/standalone.html +20 -0
  303. package/src/app/standalone.tsx +46 -0
  304. package/src/app/tailwind.ts +1 -11
  305. package/src/lib/authentication/Callback.tsx +1 -1
  306. package/src/lib/authentication/authentication.ts +2 -5
  307. package/src/lib/authentication/hook.ts +1 -0
  308. package/src/lib/authentication/providers/auth0.tsx +1 -0
  309. package/src/lib/authentication/providers/clerk.tsx +2 -0
  310. package/src/lib/authentication/providers/openid.tsx +3 -1
  311. package/src/lib/authentication/state.ts +2 -0
  312. package/src/lib/components/DevPortal.tsx +23 -30
  313. package/src/lib/components/Header.tsx +7 -7
  314. package/src/lib/components/Heading.tsx +26 -7
  315. package/src/lib/components/Layout.tsx +3 -4
  316. package/src/lib/components/Router.tsx +3 -7
  317. package/src/lib/components/SyntaxHighlight.tsx +5 -1
  318. package/src/lib/components/TopNavigation.tsx +5 -0
  319. package/src/lib/components/context/DevPortalProvider.ts +2 -2
  320. package/src/lib/components/index.ts +9 -3
  321. package/src/lib/core/DevPortalContext.ts +42 -12
  322. package/src/lib/core/plugins.ts +10 -5
  323. package/src/lib/errors/ErrorAlert.tsx +21 -0
  324. package/src/lib/errors/RouterError.tsx +12 -0
  325. package/src/lib/errors/TopLevelError.tsx +8 -0
  326. package/src/lib/oas/graphql/index.ts +2 -2
  327. package/src/lib/oas/parser/index.ts +3 -1
  328. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +2 -8
  329. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +21 -14
  330. package/src/lib/plugins/{api-key → api-keys}/index.tsx +54 -8
  331. package/src/lib/plugins/markdown/MdxPage.tsx +52 -35
  332. package/src/lib/plugins/markdown/Toc.tsx +1 -1
  333. package/src/lib/plugins/markdown/generateRoutes.tsx +15 -5
  334. package/src/lib/plugins/markdown/index.tsx +8 -1
  335. package/src/lib/plugins/openapi/OperationList.tsx +10 -4
  336. package/src/lib/plugins/openapi/OperationListItem.tsx +66 -41
  337. package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
  338. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  339. package/src/lib/plugins/openapi/{MakeRequest.tsx → PlaygroundDialogWrapper.tsx} +4 -4
  340. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -16
  341. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -1
  342. package/src/lib/plugins/openapi/Route.tsx +21 -0
  343. package/src/lib/plugins/openapi/SchemaListView.tsx +15 -182
  344. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +110 -0
  345. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  346. package/src/lib/plugins/openapi/Sidecar.tsx +15 -10
  347. package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
  348. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  349. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  350. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +13 -1
  351. package/src/lib/plugins/openapi/client/interfaces.ts +3 -0
  352. package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
  353. package/src/lib/plugins/openapi/context.tsx +16 -0
  354. package/src/lib/plugins/openapi/index.tsx +37 -51
  355. package/src/lib/plugins/openapi/interfaces.ts +9 -0
  356. package/src/lib/plugins/openapi/playground/Headers.tsx +60 -33
  357. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  358. package/src/lib/plugins/openapi/playground/Playground.tsx +158 -193
  359. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +34 -0
  360. package/src/lib/plugins/openapi/playground/QueryParams.tsx +1 -1
  361. package/src/lib/plugins/openapi/playground/createUrl.ts +1 -1
  362. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  363. package/src/lib/plugins/openapi-worker.ts +1 -1
  364. package/src/lib/ui/Callout.tsx +2 -2
  365. package/src/lib/util/MdxComponents.tsx +1 -2
  366. package/src/lib/util/logInit.ts +9 -0
  367. package/src/lib/util/objectEntries.ts +5 -0
  368. package/src/lib/util/renderIf.ts +4 -0
  369. package/dist/app/App.d.ts +0 -2
  370. package/dist/app/App.js +0 -29
  371. package/dist/app/App.js.map +0 -1
  372. package/dist/lib/components/Link.d.ts +0 -1
  373. package/dist/lib/components/Link.js +0 -2
  374. package/dist/lib/components/Link.js.map +0 -1
  375. package/dist/lib/core/helmet.d.ts +0 -4
  376. package/dist/lib/core/helmet.js +0 -5
  377. package/dist/lib/core/helmet.js.map +0 -1
  378. package/dist/lib/core/icons.d.ts +0 -1
  379. package/dist/lib/core/icons.js +0 -2
  380. package/dist/lib/core/icons.js.map +0 -1
  381. package/dist/lib/core/router.d.ts +0 -1
  382. package/dist/lib/core/router.js +0 -2
  383. package/dist/lib/core/router.js.map +0 -1
  384. package/dist/lib/plugins/api-key/CreateApiKey.d.ts +0 -5
  385. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  386. package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +0 -5
  387. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  388. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  389. package/dist/lib/plugins/api-key/index.js.map +0 -1
  390. package/dist/lib/plugins/index.d.ts +0 -4
  391. package/dist/lib/plugins/index.js +0 -5
  392. package/dist/lib/plugins/index.js.map +0 -1
  393. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  394. package/dist/lib/plugins/openapi/Select.js +0 -5
  395. package/dist/lib/plugins/openapi/Select.js.map +0 -1
  396. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  397. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  398. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  399. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  400. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  401. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  402. package/dist/vite/common.d.ts +0 -1
  403. package/dist/vite/common.js +0 -5
  404. package/dist/vite/common.js.map +0 -1
  405. package/lib/Spinner-7LezPqGn.js +0 -8393
  406. package/lib/clerk-Wslx_mPo.js +0 -19685
  407. package/lib/index-DNx3xWa2.js +0 -3461
  408. package/lib/zudoku.plugins.js +0 -19863
  409. package/src/app/App.tsx +0 -40
  410. package/src/lib/components/Link.tsx +0 -1
  411. package/src/lib/core/helmet.ts +0 -5
  412. package/src/lib/core/icons.tsx +0 -1
  413. package/src/lib/core/router.tsx +0 -1
  414. package/src/lib/plugins/index.ts +0 -4
  415. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  416. /package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +0 -0
  417. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
@@ -0,0 +1,706 @@
1
+ var re = Object.defineProperty;
2
+ var ne = (e, t, r) => t in e ? re(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var T = (e, t, r) => ne(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import d, { Component as L } from "react";
5
+ import { g as F } from "./_commonjsHelpers-BkfeUUK-.js";
6
+ import { j as se } from "./jsx-runtime-SV6hXQua.js";
7
+ import { L as oe } from "./index-CPvRaBBB.js";
8
+ import { u as ie } from "./index-DLS6fPwU.js";
9
+ const k = {}, X = d.createContext(k);
10
+ function ae(e) {
11
+ const t = d.useContext(X);
12
+ return d.useMemo(
13
+ function() {
14
+ return typeof e == "function" ? e(t) : { ...t, ...e };
15
+ },
16
+ [t, e]
17
+ );
18
+ }
19
+ function ze(e) {
20
+ let t;
21
+ return e.disableParentContext ? t = typeof e.components == "function" ? e.components(k) : e.components || k : t = ae(e.components), d.createElement(
22
+ X.Provider,
23
+ { value: t },
24
+ e.children
25
+ );
26
+ }
27
+ var le = typeof Element < "u", ce = typeof Map == "function", ue = typeof Set == "function", fe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
28
+ function x(e, t) {
29
+ if (e === t) return !0;
30
+ if (e && t && typeof e == "object" && typeof t == "object") {
31
+ if (e.constructor !== t.constructor) return !1;
32
+ var r, n, s;
33
+ if (Array.isArray(e)) {
34
+ if (r = e.length, r != t.length) return !1;
35
+ for (n = r; n-- !== 0; )
36
+ if (!x(e[n], t[n])) return !1;
37
+ return !0;
38
+ }
39
+ var o;
40
+ if (ce && e instanceof Map && t instanceof Map) {
41
+ if (e.size !== t.size) return !1;
42
+ for (o = e.entries(); !(n = o.next()).done; )
43
+ if (!t.has(n.value[0])) return !1;
44
+ for (o = e.entries(); !(n = o.next()).done; )
45
+ if (!x(n.value[1], t.get(n.value[0]))) return !1;
46
+ return !0;
47
+ }
48
+ if (ue && e instanceof Set && t instanceof Set) {
49
+ if (e.size !== t.size) return !1;
50
+ for (o = e.entries(); !(n = o.next()).done; )
51
+ if (!t.has(n.value[0])) return !1;
52
+ return !0;
53
+ }
54
+ if (fe && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
55
+ if (r = e.length, r != t.length) return !1;
56
+ for (n = r; n-- !== 0; )
57
+ if (e[n] !== t[n]) return !1;
58
+ return !0;
59
+ }
60
+ if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
61
+ if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function") return e.valueOf() === t.valueOf();
62
+ if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function") return e.toString() === t.toString();
63
+ if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
64
+ for (n = r; n-- !== 0; )
65
+ if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
66
+ if (le && e instanceof Element) return !1;
67
+ for (n = r; n-- !== 0; )
68
+ if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !x(e[s[n]], t[s[n]]))
69
+ return !1;
70
+ return !0;
71
+ }
72
+ return e !== e && t !== t;
73
+ }
74
+ var pe = function(t, r) {
75
+ try {
76
+ return x(t, r);
77
+ } catch (n) {
78
+ if ((n.message || "").match(/stack|recursion/i))
79
+ return console.warn("react-fast-compare cannot handle circular refs"), !1;
80
+ throw n;
81
+ }
82
+ };
83
+ const me = /* @__PURE__ */ F(pe);
84
+ var de = function(e, t, r, n, s, o, c, i) {
85
+ if (process.env.NODE_ENV !== "production" && t === void 0)
86
+ throw new Error("invariant requires an error message argument");
87
+ if (!e) {
88
+ var l;
89
+ if (t === void 0)
90
+ l = new Error(
91
+ "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
92
+ );
93
+ else {
94
+ var a = [r, n, s, o, c, i], u = 0;
95
+ l = new Error(
96
+ t.replace(/%s/g, function() {
97
+ return a[u++];
98
+ })
99
+ ), l.name = "Invariant Violation";
100
+ }
101
+ throw l.framesToPop = 1, l;
102
+ }
103
+ }, he = de;
104
+ const z = /* @__PURE__ */ F(he);
105
+ var ye = function(t, r, n, s) {
106
+ var o = n ? n.call(s, t, r) : void 0;
107
+ if (o !== void 0)
108
+ return !!o;
109
+ if (t === r)
110
+ return !0;
111
+ if (typeof t != "object" || !t || typeof r != "object" || !r)
112
+ return !1;
113
+ var c = Object.keys(t), i = Object.keys(r);
114
+ if (c.length !== i.length)
115
+ return !1;
116
+ for (var l = Object.prototype.hasOwnProperty.bind(r), a = 0; a < c.length; a++) {
117
+ var u = c[a];
118
+ if (!l(u))
119
+ return !1;
120
+ var f = t[u], h = r[u];
121
+ if (o = n ? n.call(s, f, h, u) : void 0, o === !1 || o === void 0 && f !== h)
122
+ return !1;
123
+ }
124
+ return !0;
125
+ };
126
+ const Te = /* @__PURE__ */ F(ye);
127
+ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(W || {}), I = {
128
+ link: { rel: ["amphtml", "canonical", "alternate"] },
129
+ script: { type: ["application/ld+json"] },
130
+ meta: {
131
+ charset: "",
132
+ name: ["generator", "robots", "description"],
133
+ property: [
134
+ "og:type",
135
+ "og:title",
136
+ "og:url",
137
+ "og:image",
138
+ "og:image:alt",
139
+ "og:description",
140
+ "twitter:url",
141
+ "twitter:title",
142
+ "twitter:description",
143
+ "twitter:image",
144
+ "twitter:image:alt",
145
+ "twitter:card",
146
+ "twitter:site"
147
+ ]
148
+ }
149
+ }, N = Object.values(W), U = {
150
+ accesskey: "accessKey",
151
+ charset: "charSet",
152
+ class: "className",
153
+ contenteditable: "contentEditable",
154
+ contextmenu: "contextMenu",
155
+ "http-equiv": "httpEquiv",
156
+ itemprop: "itemProp",
157
+ tabindex: "tabIndex"
158
+ }, ge = Object.entries(U).reduce(
159
+ (e, [t, r]) => (e[r] = t, e),
160
+ {}
161
+ ), y = "data-rh", C = {
162
+ DEFAULT_TITLE: "defaultTitle",
163
+ DEFER: "defer",
164
+ ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
165
+ ON_CHANGE_CLIENT_STATE: "onChangeClientState",
166
+ TITLE_TEMPLATE: "titleTemplate",
167
+ PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
168
+ }, E = (e, t) => {
169
+ for (let r = e.length - 1; r >= 0; r -= 1) {
170
+ const n = e[r];
171
+ if (Object.prototype.hasOwnProperty.call(n, t))
172
+ return n[t];
173
+ }
174
+ return null;
175
+ }, ve = (e) => {
176
+ let t = E(
177
+ e,
178
+ "title"
179
+ /* TITLE */
180
+ );
181
+ const r = E(e, C.TITLE_TEMPLATE);
182
+ if (Array.isArray(t) && (t = t.join("")), r && t)
183
+ return r.replace(/%s/g, () => t);
184
+ const n = E(e, C.DEFAULT_TITLE);
185
+ return t || n || void 0;
186
+ }, Ae = (e) => E(e, C.ON_CHANGE_CLIENT_STATE) || (() => {
187
+ }), $ = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), Ce = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
188
+ if (!r.length) {
189
+ const s = Object.keys(n);
190
+ for (let o = 0; o < s.length; o += 1) {
191
+ const i = s[o].toLowerCase();
192
+ if (e.indexOf(i) !== -1 && n[i])
193
+ return r.concat(n);
194
+ }
195
+ }
196
+ return r;
197
+ }, []), Ee = (e) => console && typeof console.warn == "function" && console.warn(e), b = (e, t, r) => {
198
+ const n = {};
199
+ return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && Ee(
200
+ `Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
201
+ ), !1)).map((s) => s[e]).reverse().reduce((s, o) => {
202
+ const c = {};
203
+ o.filter((l) => {
204
+ let a;
205
+ const u = Object.keys(l);
206
+ for (let h = 0; h < u.length; h += 1) {
207
+ const p = u[h], g = p.toLowerCase();
208
+ t.indexOf(g) !== -1 && !(a === "rel" && l[a].toLowerCase() === "canonical") && !(g === "rel" && l[g].toLowerCase() === "stylesheet") && (a = g), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (a = p);
209
+ }
210
+ if (!a || !l[a])
211
+ return !1;
212
+ const f = l[a].toLowerCase();
213
+ return n[a] || (n[a] = {}), c[a] || (c[a] = {}), n[a][f] ? !1 : (c[a][f] = !0, !0);
214
+ }).reverse().forEach((l) => s.push(l));
215
+ const i = Object.keys(c);
216
+ for (let l = 0; l < i.length; l += 1) {
217
+ const a = i[l], u = {
218
+ ...n[a],
219
+ ...c[a]
220
+ };
221
+ n[a] = u;
222
+ }
223
+ return s;
224
+ }, []).reverse();
225
+ }, be = (e, t) => {
226
+ if (Array.isArray(e) && e.length) {
227
+ for (let r = 0; r < e.length; r += 1)
228
+ if (e[r][t])
229
+ return !0;
230
+ }
231
+ return !1;
232
+ }, Oe = (e) => ({
233
+ baseTag: Ce([
234
+ "href"
235
+ /* HREF */
236
+ ], e),
237
+ bodyAttributes: $("bodyAttributes", e),
238
+ defer: E(e, C.DEFER),
239
+ encode: E(e, C.ENCODE_SPECIAL_CHARACTERS),
240
+ htmlAttributes: $("htmlAttributes", e),
241
+ linkTags: b(
242
+ "link",
243
+ [
244
+ "rel",
245
+ "href"
246
+ /* HREF */
247
+ ],
248
+ e
249
+ ),
250
+ metaTags: b(
251
+ "meta",
252
+ [
253
+ "name",
254
+ "charset",
255
+ "http-equiv",
256
+ "property",
257
+ "itemprop"
258
+ /* ITEM_PROP */
259
+ ],
260
+ e
261
+ ),
262
+ noscriptTags: b("noscript", [
263
+ "innerHTML"
264
+ /* INNER_HTML */
265
+ ], e),
266
+ onChangeClientState: Ae(e),
267
+ scriptTags: b(
268
+ "script",
269
+ [
270
+ "src",
271
+ "innerHTML"
272
+ /* INNER_HTML */
273
+ ],
274
+ e
275
+ ),
276
+ styleTags: b("style", [
277
+ "cssText"
278
+ /* CSS_TEXT */
279
+ ], e),
280
+ title: ve(e),
281
+ titleAttributes: $("titleAttributes", e),
282
+ prioritizeSeoTags: be(e, C.PRIORITIZE_SEO_TAGS)
283
+ }), Z = (e) => Array.isArray(e) ? e.join("") : e, Se = (e, t) => {
284
+ const r = Object.keys(e);
285
+ for (let n = 0; n < r.length; n += 1)
286
+ if (t[r[n]] && t[r[n]].includes(e[r[n]]))
287
+ return !0;
288
+ return !1;
289
+ }, D = (e, t) => Array.isArray(e) ? e.reduce(
290
+ (r, n) => (Se(n, t) ? r.priority.push(n) : r.default.push(n), r),
291
+ { priority: [], default: [] }
292
+ ) : { default: e, priority: [] }, V = (e, t) => ({
293
+ ...e,
294
+ [t]: void 0
295
+ }), we = [
296
+ "noscript",
297
+ "script",
298
+ "style"
299
+ /* STYLE */
300
+ ], H = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), G = (e) => Object.keys(e).reduce((t, r) => {
301
+ const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
302
+ return t ? `${t} ${n}` : n;
303
+ }, ""), xe = (e, t, r, n) => {
304
+ const s = G(r), o = Z(t);
305
+ return s ? `<${e} ${y}="true" ${s}>${H(
306
+ o,
307
+ n
308
+ )}</${e}>` : `<${e} ${y}="true">${H(
309
+ o,
310
+ n
311
+ )}</${e}>`;
312
+ }, Pe = (e, t, r = !0) => t.reduce((n, s) => {
313
+ const o = s, c = Object.keys(o).filter(
314
+ (a) => !(a === "innerHTML" || a === "cssText")
315
+ ).reduce((a, u) => {
316
+ const f = typeof o[u] > "u" ? u : `${u}="${H(o[u], r)}"`;
317
+ return a ? `${a} ${f}` : f;
318
+ }, ""), i = o.innerHTML || o.cssText || "", l = we.indexOf(e) === -1;
319
+ return `${n}<${e} ${y}="true" ${c}${l ? "/>" : `>${i}</${e}>`}`;
320
+ }, ""), J = (e, t = {}) => Object.keys(e).reduce((r, n) => {
321
+ const s = U[n];
322
+ return r[s || n] = e[n], r;
323
+ }, t), Ie = (e, t, r) => {
324
+ const n = {
325
+ key: t,
326
+ [y]: !0
327
+ }, s = J(r, n);
328
+ return [d.createElement("title", s, t)];
329
+ }, P = (e, t) => t.map((r, n) => {
330
+ const s = {
331
+ key: n,
332
+ [y]: !0
333
+ };
334
+ return Object.keys(r).forEach((o) => {
335
+ const i = U[o] || o;
336
+ if (i === "innerHTML" || i === "cssText") {
337
+ const l = r.innerHTML || r.cssText;
338
+ s.dangerouslySetInnerHTML = { __html: l };
339
+ } else
340
+ s[i] = r[o];
341
+ }), d.createElement(e, s);
342
+ }), m = (e, t, r = !0) => {
343
+ switch (e) {
344
+ case "title":
345
+ return {
346
+ toComponent: () => Ie(e, t.title, t.titleAttributes),
347
+ toString: () => xe(e, t.title, t.titleAttributes, r)
348
+ };
349
+ case "bodyAttributes":
350
+ case "htmlAttributes":
351
+ return {
352
+ toComponent: () => J(t),
353
+ toString: () => G(t)
354
+ };
355
+ default:
356
+ return {
357
+ toComponent: () => P(e, t),
358
+ toString: () => Pe(e, t, r)
359
+ };
360
+ }
361
+ }, $e = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
362
+ const s = D(e, I.meta), o = D(t, I.link), c = D(r, I.script);
363
+ return {
364
+ priorityMethods: {
365
+ toComponent: () => [
366
+ ...P("meta", s.priority),
367
+ ...P("link", o.priority),
368
+ ...P("script", c.priority)
369
+ ],
370
+ toString: () => (
371
+ // generate all the tags as strings and concatenate them
372
+ `${m("meta", s.priority, n)} ${m(
373
+ "link",
374
+ o.priority,
375
+ n
376
+ )} ${m("script", c.priority, n)}`
377
+ )
378
+ },
379
+ metaTags: s.default,
380
+ linkTags: o.default,
381
+ scriptTags: c.default
382
+ };
383
+ }, De = (e) => {
384
+ const {
385
+ baseTag: t,
386
+ bodyAttributes: r,
387
+ encode: n = !0,
388
+ htmlAttributes: s,
389
+ noscriptTags: o,
390
+ styleTags: c,
391
+ title: i = "",
392
+ titleAttributes: l,
393
+ prioritizeSeoTags: a
394
+ } = e;
395
+ let { linkTags: u, metaTags: f, scriptTags: h } = e, p = {
396
+ toComponent: () => {
397
+ },
398
+ toString: () => ""
399
+ };
400
+ return a && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: h } = $e(e)), {
401
+ priority: p,
402
+ base: m("base", t, n),
403
+ bodyAttributes: m("bodyAttributes", r, n),
404
+ htmlAttributes: m("htmlAttributes", s, n),
405
+ link: m("link", u, n),
406
+ meta: m("meta", f, n),
407
+ noscript: m("noscript", o, n),
408
+ script: m("script", h, n),
409
+ style: m("style", c, n),
410
+ title: m("title", { title: i, titleAttributes: l }, n)
411
+ };
412
+ }, _ = De, w = [], Q = !!(typeof window < "u" && window.document && window.document.createElement), R = class {
413
+ constructor(e, t) {
414
+ T(this, "instances", []);
415
+ T(this, "canUseDOM", Q);
416
+ T(this, "context");
417
+ T(this, "value", {
418
+ setHelmet: (e) => {
419
+ this.context.helmet = e;
420
+ },
421
+ helmetInstances: {
422
+ get: () => this.canUseDOM ? w : this.instances,
423
+ add: (e) => {
424
+ (this.canUseDOM ? w : this.instances).push(e);
425
+ },
426
+ remove: (e) => {
427
+ const t = (this.canUseDOM ? w : this.instances).indexOf(e);
428
+ (this.canUseDOM ? w : this.instances).splice(t, 1);
429
+ }
430
+ }
431
+ });
432
+ this.context = e, this.canUseDOM = t || !1, t || (e.helmet = _({
433
+ baseTag: [],
434
+ bodyAttributes: {},
435
+ encodeSpecialCharacters: !0,
436
+ htmlAttributes: {},
437
+ linkTags: [],
438
+ metaTags: [],
439
+ noscriptTags: [],
440
+ scriptTags: [],
441
+ styleTags: [],
442
+ title: "",
443
+ titleAttributes: {}
444
+ }));
445
+ }
446
+ }, Me = {}, ee = d.createContext(Me), v, ke = (v = class extends L {
447
+ constructor(r) {
448
+ super(r);
449
+ T(this, "helmetData");
450
+ this.helmetData = new R(this.props.context || {}, v.canUseDOM);
451
+ }
452
+ render() {
453
+ return /* @__PURE__ */ d.createElement(ee.Provider, { value: this.helmetData.value }, this.props.children);
454
+ }
455
+ }, T(v, "canUseDOM", Q), v), A = (e, t) => {
456
+ const r = document.head || document.querySelector(
457
+ "head"
458
+ /* HEAD */
459
+ ), n = r.querySelectorAll(`${e}[${y}]`), s = [].slice.call(n), o = [];
460
+ let c;
461
+ return t && t.length && t.forEach((i) => {
462
+ const l = document.createElement(e);
463
+ for (const a in i)
464
+ if (Object.prototype.hasOwnProperty.call(i, a))
465
+ if (a === "innerHTML")
466
+ l.innerHTML = i.innerHTML;
467
+ else if (a === "cssText")
468
+ l.styleSheet ? l.styleSheet.cssText = i.cssText : l.appendChild(document.createTextNode(i.cssText));
469
+ else {
470
+ const u = a, f = typeof i[u] > "u" ? "" : i[u];
471
+ l.setAttribute(a, f);
472
+ }
473
+ l.setAttribute(y, "true"), s.some((a, u) => (c = u, l.isEqualNode(a))) ? s.splice(c, 1) : o.push(l);
474
+ }), s.forEach((i) => {
475
+ var l;
476
+ return (l = i.parentNode) == null ? void 0 : l.removeChild(i);
477
+ }), o.forEach((i) => r.appendChild(i)), {
478
+ oldTags: s,
479
+ newTags: o
480
+ };
481
+ }, j = (e, t) => {
482
+ const r = document.getElementsByTagName(e)[0];
483
+ if (!r)
484
+ return;
485
+ const n = r.getAttribute(y), s = n ? n.split(",") : [], o = [...s], c = Object.keys(t);
486
+ for (const i of c) {
487
+ const l = t[i] || "";
488
+ r.getAttribute(i) !== l && r.setAttribute(i, l), s.indexOf(i) === -1 && s.push(i);
489
+ const a = o.indexOf(i);
490
+ a !== -1 && o.splice(a, 1);
491
+ }
492
+ for (let i = o.length - 1; i >= 0; i -= 1)
493
+ r.removeAttribute(o[i]);
494
+ s.length === o.length ? r.removeAttribute(y) : r.getAttribute(y) !== c.join(",") && r.setAttribute(y, c.join(","));
495
+ }, He = (e, t) => {
496
+ typeof e < "u" && document.title !== e && (document.title = Z(e)), j("title", t);
497
+ }, Y = (e, t) => {
498
+ const {
499
+ baseTag: r,
500
+ bodyAttributes: n,
501
+ htmlAttributes: s,
502
+ linkTags: o,
503
+ metaTags: c,
504
+ noscriptTags: i,
505
+ onChangeClientState: l,
506
+ scriptTags: a,
507
+ styleTags: u,
508
+ title: f,
509
+ titleAttributes: h
510
+ } = e;
511
+ j("body", n), j("html", s), He(f, h);
512
+ const p = {
513
+ baseTag: A("base", r),
514
+ linkTags: A("link", o),
515
+ metaTags: A("meta", c),
516
+ noscriptTags: A("noscript", i),
517
+ scriptTags: A("script", a),
518
+ styleTags: A("style", u)
519
+ }, g = {}, q = {};
520
+ Object.keys(p).forEach((S) => {
521
+ const { newTags: K, oldTags: te } = p[S];
522
+ K.length && (g[S] = K), te.length && (q[S] = p[S].oldTags);
523
+ }), t && t(), l(e, g, q);
524
+ }, O = null, _e = (e) => {
525
+ O && cancelAnimationFrame(O), e.defer ? O = requestAnimationFrame(() => {
526
+ Y(e, () => {
527
+ O = null;
528
+ });
529
+ }) : (Y(e), O = null);
530
+ }, Re = _e, B = class extends L {
531
+ constructor() {
532
+ super(...arguments);
533
+ T(this, "rendered", !1);
534
+ }
535
+ shouldComponentUpdate(t) {
536
+ return !Te(t, this.props);
537
+ }
538
+ componentDidUpdate() {
539
+ this.emitChange();
540
+ }
541
+ componentWillUnmount() {
542
+ const { helmetInstances: t } = this.props.context;
543
+ t.remove(this), this.emitChange();
544
+ }
545
+ emitChange() {
546
+ const { helmetInstances: t, setHelmet: r } = this.props.context;
547
+ let n = null;
548
+ const s = Oe(
549
+ t.get().map((o) => {
550
+ const c = { ...o.props };
551
+ return delete c.context, c;
552
+ })
553
+ );
554
+ ke.canUseDOM ? Re(s) : _ && (n = _(s)), r(n);
555
+ }
556
+ // componentWillMount will be deprecated
557
+ // for SSR, initialize on first render
558
+ // constructor is also unsafe in StrictMode
559
+ init() {
560
+ if (this.rendered)
561
+ return;
562
+ this.rendered = !0;
563
+ const { helmetInstances: t } = this.props.context;
564
+ t.add(this), this.emitChange();
565
+ }
566
+ render() {
567
+ return this.init(), null;
568
+ }
569
+ }, M, Ne = (M = class extends L {
570
+ shouldComponentUpdate(e) {
571
+ return !me(V(this.props, "helmetData"), V(e, "helmetData"));
572
+ }
573
+ mapNestedChildrenToProps(e, t) {
574
+ if (!t)
575
+ return null;
576
+ switch (e.type) {
577
+ case "script":
578
+ case "noscript":
579
+ return {
580
+ innerHTML: t
581
+ };
582
+ case "style":
583
+ return {
584
+ cssText: t
585
+ };
586
+ default:
587
+ throw new Error(
588
+ `<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
589
+ );
590
+ }
591
+ }
592
+ flattenArrayTypeChildren(e, t, r, n) {
593
+ return {
594
+ ...t,
595
+ [e.type]: [
596
+ ...t[e.type] || [],
597
+ {
598
+ ...r,
599
+ ...this.mapNestedChildrenToProps(e, n)
600
+ }
601
+ ]
602
+ };
603
+ }
604
+ mapObjectTypeChildren(e, t, r, n) {
605
+ switch (e.type) {
606
+ case "title":
607
+ return {
608
+ ...t,
609
+ [e.type]: n,
610
+ titleAttributes: { ...r }
611
+ };
612
+ case "body":
613
+ return {
614
+ ...t,
615
+ bodyAttributes: { ...r }
616
+ };
617
+ case "html":
618
+ return {
619
+ ...t,
620
+ htmlAttributes: { ...r }
621
+ };
622
+ default:
623
+ return {
624
+ ...t,
625
+ [e.type]: { ...r }
626
+ };
627
+ }
628
+ }
629
+ mapArrayTypeChildrenToProps(e, t) {
630
+ let r = { ...t };
631
+ return Object.keys(e).forEach((n) => {
632
+ r = {
633
+ ...r,
634
+ [n]: e[n]
635
+ };
636
+ }), r;
637
+ }
638
+ warnOnInvalidChildren(e, t) {
639
+ return z(
640
+ N.some((r) => e.type === r),
641
+ typeof e.type == "function" ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : `Only elements types ${N.join(
642
+ ", "
643
+ )} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
644
+ ), z(
645
+ !t || typeof t == "string" || Array.isArray(t) && !t.some((r) => typeof r != "string"),
646
+ `Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`
647
+ ), !0;
648
+ }
649
+ mapChildrenToProps(e, t) {
650
+ let r = {};
651
+ return d.Children.forEach(e, (n) => {
652
+ if (!n || !n.props)
653
+ return;
654
+ const { children: s, ...o } = n.props, c = Object.keys(o).reduce((l, a) => (l[ge[a] || a] = o[a], l), {});
655
+ let { type: i } = n;
656
+ switch (typeof i == "symbol" ? i = i.toString() : this.warnOnInvalidChildren(n, s), i) {
657
+ case "Symbol(react.fragment)":
658
+ t = this.mapChildrenToProps(s, t);
659
+ break;
660
+ case "link":
661
+ case "meta":
662
+ case "noscript":
663
+ case "script":
664
+ case "style":
665
+ r = this.flattenArrayTypeChildren(
666
+ n,
667
+ r,
668
+ c,
669
+ s
670
+ );
671
+ break;
672
+ default:
673
+ t = this.mapObjectTypeChildren(n, t, c, s);
674
+ break;
675
+ }
676
+ }), this.mapArrayTypeChildrenToProps(r, t);
677
+ }
678
+ render() {
679
+ const { children: e, ...t } = this.props;
680
+ let r = { ...t }, { helmetData: n } = t;
681
+ if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof R)) {
682
+ const s = n;
683
+ n = new R(s.context, !0), delete r.helmetData;
684
+ }
685
+ return n ? /* @__PURE__ */ d.createElement(B, { ...r, context: n.value }) : /* @__PURE__ */ d.createElement(ee.Consumer, null, (s) => /* @__PURE__ */ d.createElement(B, { ...r, context: s }));
686
+ }
687
+ }, T(M, "defaultProps", {
688
+ defer: !0,
689
+ encodeSpecialCharacters: !0,
690
+ prioritizeSeoTags: !1
691
+ }), M);
692
+ const Ve = (e) => {
693
+ const t = ie(), r = typeof e.to == "string" ? e.to : e.to.hash, n = (s) => {
694
+ var o;
695
+ !(r != null && r.startsWith("#")) || r !== t.hash || (s.preventDefault(), (o = document.getElementById(r.slice(1))) == null || o.scrollIntoView());
696
+ };
697
+ return /* @__PURE__ */ se.jsx(oe, { onClick: n, ...e });
698
+ };
699
+ export {
700
+ Ve as A,
701
+ Ne as H,
702
+ ze as M,
703
+ ke as a,
704
+ ae as u
705
+ };
706
+ //# sourceMappingURL=AnchorLink-ptdQk87q.js.map