@cartanova/qgrid-cli 2.10.9 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dist/_virtual/_rolldown/runtime.js +1 -10
- package/bundle/dist/application/monit/log-buffer.js +12 -6
- package/bundle/dist/application/monit/monit.frame.js +11 -3
- package/bundle/dist/application/monit/monit.types.js +1 -1
- package/bundle/dist/application/qgrid/conv-routing.js +9 -6
- package/bundle/dist/application/qgrid/expired-token-reminder.js +2 -2
- package/bundle/dist/application/qgrid/oauth.js +31 -4
- package/bundle/dist/application/qgrid/qgrid-image-generation.js +1 -1
- package/bundle/dist/application/qgrid/qgrid-response-format.js +22 -20
- package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +43 -34
- package/bundle/dist/application/qgrid/qgrid.dispatcher.js +128 -93
- package/bundle/dist/application/qgrid/qgrid.frame.js +930 -49
- package/bundle/dist/application/qgrid/qgrid.types.js +212 -5
- package/bundle/dist/application/qgrid/schema-prompt.js +75 -48
- package/bundle/dist/application/qgrid/slack-user-map.js +1 -1
- package/bundle/dist/application/qgrid/token-death.js +1 -1
- package/bundle/dist/application/qgrid/token-subscriber.js +83 -30
- package/bundle/dist/application/qgrid/token-trigger-setup.js +1 -1
- package/bundle/dist/application/qgrid/token-window-keepalive.js +8 -6
- package/bundle/dist/application/qgrid/tool-emulation-schema.js +13 -13
- package/bundle/dist/application/qgrid/tool-emulation.js +19 -15
- package/bundle/dist/application/request-log/json-schema-type-text.js +29 -12
- package/bundle/dist/application/request-log/request-log.model.js +83 -69
- package/bundle/dist/application/request-log/request-log.types.js +8 -2
- package/bundle/dist/application/request-log/zod-code-format.js +1 -1
- package/bundle/dist/application/request-log-step/request-log-step.model.js +1 -1
- package/bundle/dist/application/request-log-step/request-log-step.types.js +1 -1
- package/bundle/dist/application/setting/setting.constant.js +1 -1
- package/bundle/dist/application/setting/setting.model.js +2 -2
- package/bundle/dist/application/setting/setting.store.js +2 -2
- package/bundle/dist/application/setting/setting.types.js +1 -1
- package/bundle/dist/application/sonamu.generated.js +40 -16
- package/bundle/dist/application/sonamu.generated.sso.js +2 -1
- package/bundle/dist/application/token/token.model.js +26 -9
- package/bundle/dist/application/token/token.types.js +20 -3
- package/bundle/dist/i18n/en.js +15 -1
- package/bundle/dist/i18n/ko.js +15 -1
- package/bundle/dist/i18n/sd.generated.js +2 -1
- package/bundle/dist/migrations/20260807133553_manual__backfill_request_log_cost.js +8 -6
- package/bundle/dist/migrations/20261018215031_alter_request_logs_add1_alter1.js +15 -0
- package/bundle/dist/server-bootstrap.js +4 -2
- package/bundle/dist/server-error-handler.js +1 -1
- package/bundle/dist/sonamu.config.js +37 -8
- package/bundle/dist/startup-migrations.js +17 -7
- package/bundle/dist/testing/global.js +1 -1
- package/bundle/dist/testing/schema-bench.js +0 -0
- package/bundle/dist/testing/test-database-name.js +1 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-constants.js +1 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +11 -5
- package/bundle/dist/utils/providers/anthropic/anthropic-quota.js +4 -4
- package/bundle/dist/utils/providers/anthropic/anthropic-thinking.js +1 -1
- package/bundle/dist/utils/providers/anthropic/claude-session.js +20 -19
- package/bundle/dist/utils/providers/anthropic/fence-strip.js +1 -1
- package/bundle/dist/utils/providers/anthropic/stream-json-adapter.js +49 -23
- package/bundle/dist/utils/providers/common/credentials.js +5 -1
- package/bundle/dist/utils/providers/common/effort.js +3 -3
- package/bundle/dist/utils/providers/common/model-cost.js +69 -14
- package/bundle/dist/utils/providers/common/provider-types.js +29 -1
- package/bundle/dist/utils/providers/common/schema-validation.js +78 -40
- package/bundle/dist/utils/providers/common/smooth-weighted-round-robin.js +1 -1
- package/bundle/dist/utils/providers/common/strictifier.js +62 -43
- package/bundle/dist/utils/providers/common/thinking.js +3 -2
- package/bundle/dist/utils/providers/common/ttft.js +1 -1
- package/bundle/dist/utils/providers/grok/grok-backend-protocol.js +427 -0
- package/bundle/dist/utils/providers/grok/grok-constants.js +55 -0
- package/bundle/dist/utils/providers/grok/grok-direct-client.js +196 -0
- package/bundle/dist/utils/providers/grok/grok-dispatcher.js +1313 -0
- package/bundle/dist/utils/providers/grok/grok-headers.js +118 -0
- package/bundle/dist/utils/providers/grok/grok-media-client.js +420 -0
- package/bundle/dist/utils/providers/grok/grok-models.js +114 -0
- package/bundle/dist/utils/providers/grok/grok-oauth.js +455 -0
- package/bundle/dist/utils/providers/grok/grok-quota.js +119 -0
- package/bundle/dist/utils/providers/grok/grok-refresh.js +192 -0
- package/bundle/dist/utils/providers/grok/grok-types.js +186 -0
- package/bundle/dist/utils/providers/grok/grok-voice-client.js +199 -0
- package/bundle/dist/utils/providers/grok/index.js +11 -0
- package/bundle/dist/utils/providers/openai/openai-backend-protocol.js +111 -83
- package/bundle/dist/utils/providers/openai/openai-callback-relay.js +3 -2
- package/bundle/dist/utils/providers/openai/openai-constants.js +1 -1
- package/bundle/dist/utils/providers/openai/openai-direct-client.js +23 -7
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +143 -106
- package/bundle/dist/utils/providers/openai/openai-image-generation.js +48 -33
- package/bundle/dist/utils/providers/openai/openai-oauth.js +28 -13
- package/bundle/dist/utils/providers/openai/openai-quota.js +38 -27
- package/bundle/dist/utils/providers/openai/openai-refresh.js +17 -9
- package/bundle/dist/utils/providers/openai/openai-sse.js +1 -1
- package/bundle/dist/utils/providers/openai/openai-transport-config.js +1 -1
- package/bundle/dist/utils/quiet-hours.js +1 -1
- package/bundle/dist/utils/slack-notify.js +14 -8
- package/bundle/dist/utils/subset-loaders.js +4 -5
- package/bundle/src/application/monit/log-buffer.ts +23 -9
- package/bundle/src/application/monit/monit.frame.ts +22 -5
- package/bundle/src/application/monit/monit.types.ts +6 -0
- package/bundle/src/application/qgrid/conv-routing.test.ts +76 -4
- package/bundle/src/application/qgrid/conv-routing.ts +35 -9
- package/bundle/src/application/qgrid/expired-token-reminder.ts +9 -1
- package/bundle/src/application/qgrid/oauth.ts +51 -15
- package/bundle/src/application/qgrid/qgrid-image-generation.ts +9 -0
- package/bundle/src/application/qgrid/qgrid-response-format.ts +50 -25
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.test.ts +33 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +87 -40
- package/bundle/src/application/qgrid/qgrid.dispatcher.test.ts +97 -0
- package/bundle/src/application/qgrid/qgrid.dispatcher.ts +274 -126
- package/bundle/src/application/qgrid/qgrid.frame.test.ts +1013 -3
- package/bundle/src/application/qgrid/qgrid.frame.ts +1415 -60
- package/bundle/src/application/qgrid/qgrid.types.ts +335 -0
- package/bundle/src/application/qgrid/schema-prompt.ts +105 -41
- package/bundle/src/application/qgrid/slack-user-map.ts +5 -0
- package/bundle/src/application/qgrid/token-death.ts +4 -0
- package/bundle/src/application/qgrid/token-subscriber.test.ts +21 -19
- package/bundle/src/application/qgrid/token-subscriber.ts +186 -53
- package/bundle/src/application/qgrid/token-trigger-setup.ts +2 -0
- package/bundle/src/application/qgrid/token-window-keepalive.ts +49 -6
- package/bundle/src/application/qgrid/tool-emulation-schema.ts +33 -29
- package/bundle/src/application/qgrid/tool-emulation.ts +52 -27
- package/bundle/src/application/request-log/json-schema-type-text.test.ts +5 -5
- package/bundle/src/application/request-log/json-schema-type-text.ts +81 -26
- package/bundle/src/application/request-log/request-log.entity.json +8 -0
- package/bundle/src/application/request-log/request-log.model.test.ts +111 -4
- package/bundle/src/application/request-log/request-log.model.ts +279 -145
- package/bundle/src/application/request-log/request-log.types.ts +17 -0
- package/bundle/src/application/request-log/zod-code-format.ts +11 -0
- package/bundle/src/application/request-log-step/request-log-step.model.ts +1 -0
- package/bundle/src/application/request-log-step/request-log-step.types.ts +2 -0
- package/bundle/src/application/setting/setting.constant.ts +9 -0
- package/bundle/src/application/setting/setting.model.ts +12 -2
- package/bundle/src/application/setting/setting.store.ts +5 -1
- package/bundle/src/application/setting/setting.types.ts +8 -0
- package/bundle/src/application/sonamu.generated.http +135 -0
- package/bundle/src/application/sonamu.generated.sso.ts +3 -0
- package/bundle/src/application/sonamu.generated.ts +29 -0
- package/bundle/src/application/token/token.identity.test.ts +20 -0
- package/bundle/src/application/token/token.model.ts +66 -7
- package/bundle/src/application/token/token.types.ts +24 -1
- package/bundle/src/i18n/en.ts +19 -0
- package/bundle/src/i18n/ko.ts +21 -0
- package/bundle/src/i18n/sd.generated.ts +24 -2
- package/bundle/src/migrations/20260807133553_manual__backfill_request_log_cost.ts +16 -8
- package/bundle/src/migrations/20261018215031_alter_request_logs_add1_alter1.ts +15 -0
- package/bundle/src/server-bootstrap.ts +4 -2
- package/bundle/src/server-error-handler.ts +1 -0
- package/bundle/src/sonamu.config.ts +69 -7
- package/bundle/src/startup-migrations.ts +27 -9
- package/bundle/src/testing/global.ts +20 -0
- package/bundle/src/testing/schema-bench.ts +105 -30
- package/bundle/src/testing/test-database-name.ts +2 -0
- package/bundle/src/utils/providers/anthropic/anthropic-constants.ts +8 -0
- package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.ts +41 -6
- package/bundle/src/utils/providers/anthropic/anthropic-quota.ts +7 -3
- package/bundle/src/utils/providers/anthropic/anthropic-thinking.ts +6 -0
- package/bundle/src/utils/providers/anthropic/claude-session.ts +58 -24
- package/bundle/src/utils/providers/anthropic/fence-strip.ts +11 -0
- package/bundle/src/utils/providers/anthropic/stream-json-adapter.ts +110 -45
- package/bundle/src/utils/providers/common/credentials.ts +8 -0
- package/bundle/src/utils/providers/common/effort.ts +9 -2
- package/bundle/src/utils/providers/common/model-cost.test.ts +48 -1
- package/bundle/src/utils/providers/common/model-cost.ts +259 -158
- package/bundle/src/utils/providers/common/provider-dispatcher.ts +98 -2
- package/bundle/src/utils/providers/common/provider-types.ts +46 -3
- package/bundle/src/utils/providers/common/schema-validation.test.ts +5 -1
- package/bundle/src/utils/providers/common/schema-validation.ts +124 -56
- package/bundle/src/utils/providers/common/smooth-weighted-round-robin.ts +4 -0
- package/bundle/src/utils/providers/common/strictifier.ts +185 -59
- package/bundle/src/utils/providers/common/thinking.ts +2 -2
- package/bundle/src/utils/providers/common/ttft.ts +4 -2
- package/bundle/src/utils/providers/grok/__fixtures__/golden-responses-1.0.60.json +164 -0
- package/bundle/src/utils/providers/grok/grok-backend-protocol.test.ts +325 -0
- package/bundle/src/utils/providers/grok/grok-backend-protocol.ts +721 -0
- package/bundle/src/utils/providers/grok/grok-constants.ts +105 -0
- package/bundle/src/utils/providers/grok/grok-direct-client.test.ts +179 -0
- package/bundle/src/utils/providers/grok/grok-direct-client.ts +313 -0
- package/bundle/src/utils/providers/grok/grok-dispatcher.test.ts +1395 -0
- package/bundle/src/utils/providers/grok/grok-dispatcher.ts +2105 -0
- package/bundle/src/utils/providers/grok/grok-headers.test.ts +149 -0
- package/bundle/src/utils/providers/grok/grok-headers.ts +199 -0
- package/bundle/src/utils/providers/grok/grok-media-client.test.ts +446 -0
- package/bundle/src/utils/providers/grok/grok-media-client.ts +703 -0
- package/bundle/src/utils/providers/grok/grok-models.test.ts +96 -0
- package/bundle/src/utils/providers/grok/grok-models.ts +161 -0
- package/bundle/src/utils/providers/grok/grok-oauth.test.ts +406 -0
- package/bundle/src/utils/providers/grok/grok-oauth.ts +771 -0
- package/bundle/src/utils/providers/grok/grok-quota.test.ts +142 -0
- package/bundle/src/utils/providers/grok/grok-quota.ts +198 -0
- package/bundle/src/utils/providers/grok/grok-refresh.test.ts +239 -0
- package/bundle/src/utils/providers/grok/grok-refresh.ts +325 -0
- package/bundle/src/utils/providers/grok/grok-types.test.ts +252 -0
- package/bundle/src/utils/providers/grok/grok-types.ts +374 -0
- package/bundle/src/utils/providers/grok/grok-voice-client.test.ts +321 -0
- package/bundle/src/utils/providers/grok/grok-voice-client.ts +284 -0
- package/bundle/src/utils/providers/grok/index.ts +20 -0
- package/bundle/src/utils/providers/openai/openai-backend-protocol.ts +221 -137
- package/bundle/src/utils/providers/openai/openai-callback-relay.ts +12 -1
- package/bundle/src/utils/providers/openai/openai-constants.ts +2 -0
- package/bundle/src/utils/providers/openai/openai-direct-client.ts +111 -21
- package/bundle/src/utils/providers/openai/openai-dispatcher.ts +322 -169
- package/bundle/src/utils/providers/openai/openai-image-generation.ts +116 -36
- package/bundle/src/utils/providers/openai/openai-oauth.ts +48 -20
- package/bundle/src/utils/providers/openai/openai-quota.ts +77 -46
- package/bundle/src/utils/providers/openai/openai-refresh.ts +42 -18
- package/bundle/src/utils/providers/openai/openai-sse.ts +27 -3
- package/bundle/src/utils/providers/openai/openai-transport-config.ts +2 -0
- package/bundle/src/utils/quiet-hours.ts +12 -1
- package/bundle/src/utils/slack-notify.ts +44 -13
- package/bundle/src/utils/subset-loaders.ts +7 -7
- package/bundle/web-dist/client/assets/clsx-5XM_pHvN.js +1 -0
- package/bundle/web-dist/client/assets/index-BA7uQ-6c.js +31 -0
- package/bundle/web-dist/client/assets/index-Be2qCZmI.css +1 -0
- package/bundle/web-dist/client/assets/logs-C47OJGEI.js +1 -0
- package/bundle/web-dist/client/assets/monit-BS9no0dU.js +4 -0
- package/bundle/web-dist/client/assets/plus-sdACTfH0.js +1 -0
- package/bundle/web-dist/client/assets/refresh-cw-CY8o_1cT.js +1 -0
- package/bundle/web-dist/client/assets/request-model-BRtFuZvj.js +1 -0
- package/bundle/web-dist/client/assets/routes-kqgkUxE8.js +5 -0
- package/bundle/web-dist/client/assets/{services.generated-BsieU37H.js → services.generated-CefiDXEv.js} +5 -5
- package/bundle/web-dist/client/assets/settings-DNDvFGSw.js +1 -0
- package/bundle/web-dist/client/assets/show-u8Np69q3.js +2 -0
- package/bundle/web-dist/client/assets/tokens-QvP410NW.js +1 -0
- package/bundle/web-dist/client/assets/total-cost-MnfKU8IN.js +1 -0
- package/bundle/web-dist/client/assets/use-oauth-login-flow-Bzdh28Ws.js +1 -0
- package/bundle/web-dist/client/assets/use-update-token-mutation-CfJKaxmR.js +1 -0
- package/bundle/web-dist/client/assets/vendor-react-CUFFrVN9.js +244 -0
- package/bundle/web-dist/client/assets/vendor-tanstack-Bf_jag9G.js +1 -0
- package/bundle/web-dist/client/index.html +6 -6
- package/bundle/web-dist/server/assets/clsx-D_N5PN_2.js +16 -0
- package/bundle/web-dist/server/assets/{lazyRouteComponent-Dtd0NR4r.js → lazyRouteComponent-D8iTIHyn.js} +129 -2
- package/bundle/web-dist/server/assets/logs-B3OTd9hy.js +825 -0
- package/bundle/web-dist/server/assets/{monit-DvzribSE.js → monit-B2hqorPe.js} +385 -126
- package/bundle/web-dist/server/assets/plus-DwG7h9kq.js +28 -0
- package/bundle/web-dist/server/assets/{react-dom-B4a6-uuR.js → react-dom-BIYQzBqG.js} +2 -129
- package/bundle/web-dist/server/assets/refresh-cw-mMBkwOq0.js +44 -0
- package/bundle/web-dist/server/assets/{request-model-CbqfnQOJ.js → request-model-I6OdODSH.js} +15 -6
- package/bundle/web-dist/server/assets/{routes-BAPWTizT.js → routes-B95YlUv2.js} +760 -213
- package/bundle/web-dist/server/assets/{services.generated-CEbGjsI0.js → services.generated-DQATJ6qf.js} +12821 -12194
- package/bundle/web-dist/server/assets/settings-C3gbGk0m.js +830 -0
- package/bundle/web-dist/server/assets/{show-CxVZTAdv.js → show-Bxaj3rhH.js} +1355 -419
- package/bundle/web-dist/server/assets/tokens-CZjH3cB7.js +1038 -0
- package/bundle/web-dist/server/assets/total-cost-fTE9Xy82.js +18 -0
- package/bundle/web-dist/server/assets/use-oauth-login-flow-CKDHgc3U.js +2379 -0
- package/bundle/web-dist/server/assets/{use-update-token-mutation-CfYmk_4_.js → use-update-token-mutation-BEbgOzaa.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +4303 -22810
- package/dist/cli.js +9 -9
- package/package.json +4 -11
- package/postinstall.mjs +12 -0
- package/skills/qgrid/SKILL.md +1 -0
- package/skills/qgrid/references/cli-env-and-server-boot.md +4 -1
- package/skills/qgrid/references/decision-rationale.md +24 -1
- package/skills/qgrid/references/grok-runtime.md +89 -0
- package/skills/qgrid/references/provider-runtime-differences.md +30 -29
- package/skills/qgrid/references/repo-map.md +10 -0
- package/skills/qgrid/references/request-log-run-lifecycle.md +1 -1
- package/skills/qgrid/references/sonamu-api-web-flow.md +1 -1
- package/skills/qgrid/references/token-auth-quota-lifecycle.md +56 -3
- package/bundle/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +0 -406
- package/bundle/dist/node_modules/.pnpm/@vitest_expect@4.1.10/node_modules/@vitest/expect/dist/index.js +0 -1507
- package/bundle/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.10/node_modules/@vitest/pretty-format/dist/index.js +0 -887
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/chunk-artifact.js +0 -2756
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/index.js +0 -8
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/utils.js +0 -8
- package/bundle/dist/node_modules/.pnpm/@vitest_snapshot@4.1.10/node_modules/@vitest/snapshot/dist/index.js +0 -922
- package/bundle/dist/node_modules/.pnpm/@vitest_spy@4.1.10/node_modules/@vitest/spy/dist/index.js +0 -386
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +0 -121
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/constants.js +0 -51
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/diff.js +0 -1317
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/display.js +0 -561
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/error.js +0 -40
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/helpers.js +0 -272
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/offset.js +0 -27
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/serialize.js +0 -77
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/source-map.js +0 -381
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/timers.js +0 -51
- package/bundle/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.js +0 -2986
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.js +0 -109
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.js +0 -10
- package/bundle/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +0 -1126
- package/bundle/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +0 -21
- package/bundle/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +0 -432
- package/bundle/dist/node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.js +0 -517
- package/bundle/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.js +0 -101
- package/bundle/dist/node_modules/.pnpm/vite@8.0.3_@emnapi_core@1.11.2_@emnapi_runtime@1.11.2_@types_node@25.0.7_esbuild@0.27.4_5b35fc1fb85d2af4d105e0d74f940f50/node_modules/vite/dist/node/module-runner.js +0 -1265
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +0 -9
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/benchmark.CX_oY03V.js +0 -41
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/evaluatedModules.Dg1zASAC.js +0 -19
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/index.Chj8NDwU.js +0 -202
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/index.DdgEv5B1.js +0 -46
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js +0 -119
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/test.DNmyFkvJ.js +0 -3044
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js +0 -59
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/index.js +0 -28
- package/bundle/dist/testing/setup-mocks.js +0 -16
- package/bundle/src/testing/setup-mocks.ts +0 -44
- package/bundle/web-dist/client/assets/index-Bw2s88Ot.css +0 -1
- package/bundle/web-dist/client/assets/index-CrXKu_J8.js +0 -106
- package/bundle/web-dist/client/assets/logs-B2SmWJXA.js +0 -1
- package/bundle/web-dist/client/assets/monit-D-JwXXoA.js +0 -1
- package/bundle/web-dist/client/assets/plus-B62CuqT8.js +0 -1
- package/bundle/web-dist/client/assets/refresh-cw-NNcU0Cmq.js +0 -1
- package/bundle/web-dist/client/assets/request-model-CojtinqK.js +0 -1
- package/bundle/web-dist/client/assets/routes-C5r4gTvY.js +0 -5
- package/bundle/web-dist/client/assets/settings-D3tDSAck.js +0 -1
- package/bundle/web-dist/client/assets/show-Cah_kUKC.js +0 -2
- package/bundle/web-dist/client/assets/tokens-DU2Iyxxd.js +0 -1
- package/bundle/web-dist/client/assets/use-oauth-login-flow-D0UaR9_e.js +0 -1
- package/bundle/web-dist/client/assets/use-update-token-mutation-DAq0F8p-.js +0 -1
- package/bundle/web-dist/client/assets/vendor-react-DH4kUfK2.js +0 -9
- package/bundle/web-dist/client/assets/vendor-tanstack-DJRQAbrY.js +0 -1
- package/bundle/web-dist/server/assets/logs-l91avYif.js +0 -509
- package/bundle/web-dist/server/assets/plus-KZrECewT.js +0 -19
- package/bundle/web-dist/server/assets/refresh-cw-BND93JrF.js +0 -23
- package/bundle/web-dist/server/assets/settings-BZR5HSAL.js +0 -461
- package/bundle/web-dist/server/assets/tokens-D1hb4eKk.js +0 -448
- package/bundle/web-dist/server/assets/use-oauth-login-flow-Cvdy0zF8.js +0 -178
- package/dist/cli.d.ts +0 -10
- /package/bundle/web-dist/client/assets/{cost-DH2jZbrw.js → cost-DB3HbU7T.js} +0 -0
- /package/bundle/web-dist/client/assets/{preload-helper-ca-nBW7U.js → preload-helper-DWTEM3RW.js} +0 -0
- /package/bundle/web-dist/server/assets/{cost-eEHeTRT5.js → cost-BC9yzyA9.js} +0 -0
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tokens-DU2Iyxxd.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-tanstack-DJRQAbrY.js","assets/vendor-react-DH4kUfK2.js","assets/services.generated-BsieU37H.js","assets/use-oauth-login-flow-D0UaR9_e.js","assets/use-update-token-mutation-DAq0F8p-.js","assets/plus-B62CuqT8.js","assets/settings-D3tDSAck.js","assets/monit-D-JwXXoA.js","assets/cost-DH2jZbrw.js","assets/refresh-cw-NNcU0Cmq.js","assets/logs-B2SmWJXA.js","assets/request-model-CojtinqK.js","assets/routes-C5r4gTvY.js","assets/show-Cah_kUKC.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-Dw2cE7zH.js";import{A as r,C as i,D as a,E as o,F as s,I as c,M as l,N as u,O as d,P as f,S as p,T as m,a as h,b as g,c as _,d as v,f as y,i as b,j as x,k as S,l as C,n as w,o as T,r as E,s as D,t as O,v as k,w as A,x as j}from"./vendor-tanstack-DJRQAbrY.js";import{i as M,n as N,r as P,t as ee}from"./vendor-react-DH4kUfK2.js";import{C as F,S as I,T as te,_ as ne,b as L,c as R,d as re,f as ie,g as ae,h as z,l as oe,m as se,n as B,o as ce,p as le,s as ue,v as de,w as fe,x as pe,y as me}from"./services.generated-BsieU37H.js";import{t as he}from"./preload-helper-ca-nBW7U.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function ge(e){return e}function _e(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??ge,o=t.mutations||[],s=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),s.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l})=>{let u=c?m(c):void 0,d=r.data===void 0?u?.data:r.data,f=d===void 0?d:a(d),p=i.get(o),h=p?.state.status===`pending`,g=p?.state.fetchStatus===`fetching`;if(p){let e=u&&l!==void 0&&l>p.state.dataUpdatedAt;if(r.dataUpdatedAt>p.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;p.setState({...t,data:f})}}else p=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s},{...r,data:f,fetchStatus:`idle`,status:f===void 0?r.status:`success`});c&&!h&&!g&&(l===void 0||l>p.state.dataUpdatedAt)&&p.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(x)})}var ve=class extends c{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new g({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ye(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ye(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ye(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ye(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){A.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>S(t,e))}findAll(e={}){return this.getAll().filter(t=>S(e,t))}notify(e){A.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return A.batch(()=>Promise.all(e.map(e=>e.continue().catch(x))))}};function ye(e){return e.options.scope?.id}var be=class extends c{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??d(r,t),a=this.get(i);return a||(a=new p({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){A.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>r(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>r(e,t)):t}notify(e){A.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){A.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){A.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},xe=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new be,this.#t=e.mutationCache||new ve,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=s.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=i.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(u(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=o(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return A.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;A.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return A.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=A.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(x).catch(x)}invalidateQueries(e,t={}){return A.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=A.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(x)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(x)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(u(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(x).catch(x)}fetchInfiniteQuery(e){return e.behavior=j(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(x).catch(x)}ensureInfiniteQueryData(e){return e.behavior=j(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return i.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(a(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{l(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(a(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{l(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=d(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===f&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Se=t(ee(),1),V=t(M()),H=P(),Ce=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}),(0,H.jsx)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8`})]})}),we=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}),(0,H.jsx)(`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`})]})}),Te=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`}),(0,H.jsx)(`circle`,{cx:16.5,cy:7.5,r:.5,fill:`currentColor`})]})}),Ee=[{label:`Overview`,items:[{title:`Dashboard`,path:`/`,icon:we}]},{label:`Manage`,items:[{title:`Tokens`,path:`/tokens`,icon:Te},{title:`Request Logs`,shortTitle:`Logs`,path:`/logs`,icon:Ce},{title:`Server Logs`,shortTitle:`Server`,path:`/monit`,icon:e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 19h8M4 17l6-6l-6-6`})})},{title:`Settings`,path:`/settings`,icon:e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}),(0,H.jsx)(`circle`,{cx:12,cy:12,r:3})]})})}]}],De=Ee.flatMap(e=>e.items);function Oe(e,t){return e===`/`?t===`/`||t===``:t.startsWith(e)}function ke(){let e=v({select:e=>e.location.pathname});return(0,H.jsx)(`nav`,{className:`md:hidden shrink-0 border-t border-sand-200/60 bg-sand-50/95 backdrop-blur-sm pb-[env(safe-area-inset-bottom)]`,children:(0,H.jsx)(`div`,{className:`flex`,children:De.map(t=>{let n=Oe(t.path,e);return(0,H.jsxs)(C,{to:t.path,className:`flex-1 flex flex-col items-center gap-0.5 py-2 no-underline transition-colors duration-150 ${n?`text-sienna-600`:`text-sand-500`}`,children:[(0,H.jsx)(t.icon,{className:`size-5 ${n?`text-sienna-500`:`text-sand-400`}`}),(0,H.jsx)(`span`,{className:`text-[10px] ${n?`font-medium`:``}`,children:t.shortTitle??t.title})]},t.path)})})})}function Ae(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var je=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Me=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ne={};function Pe(e,t){return((t||Ne).jsx?Me:je).test(e)}var Fe=/[ \t\n\f\r]/g;function Ie(e){return typeof e==`object`?e.type===`text`?Le(e.value):!1:Le(e)}function Le(e){return e.replace(Fe,``)===``}var Re=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Re.prototype.normal={},Re.prototype.property={},Re.prototype.space=void 0;function ze(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Re(n,r,t)}function Be(e){return e.toLowerCase()}var Ve=class{constructor(e,t){this.attribute=t,this.property=e}};Ve.prototype.attribute=``,Ve.prototype.booleanish=!1,Ve.prototype.boolean=!1,Ve.prototype.commaOrSpaceSeparated=!1,Ve.prototype.commaSeparated=!1,Ve.prototype.defined=!1,Ve.prototype.mustUseProperty=!1,Ve.prototype.number=!1,Ve.prototype.overloadedBoolean=!1,Ve.prototype.property=``,Ve.prototype.spaceSeparated=!1,Ve.prototype.space=void 0;var He=e({boolean:()=>U,booleanish:()=>We,commaOrSpaceSeparated:()=>Je,commaSeparated:()=>qe,number:()=>W,overloadedBoolean:()=>Ge,spaceSeparated:()=>Ke}),Ue=0,U=Ye(),We=Ye(),Ge=Ye(),W=Ye(),Ke=Ye(),qe=Ye(),Je=Ye();function Ye(){return 2**++Ue}var Xe=Object.keys(He),Ze=class extends Ve{constructor(e,t,n,r){let i=-1;if(super(e,t),Qe(this,`space`,r),typeof n==`number`)for(;++i<Xe.length;){let e=Xe[i];Qe(this,Xe[i],(n&He[e])===He[e])}}};Ze.prototype.defined=!0;function Qe(e,t,n){n&&(e[t]=n)}function $e(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ze(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Be(r)]=r,n[Be(a.attribute)]=r}return new Re(t,n,e.space)}var et=$e({properties:{ariaActiveDescendant:null,ariaAtomic:We,ariaAutoComplete:null,ariaBusy:We,ariaChecked:We,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:Ke,ariaCurrent:null,ariaDescribedBy:Ke,ariaDetails:null,ariaDisabled:We,ariaDropEffect:Ke,ariaErrorMessage:null,ariaExpanded:We,ariaFlowTo:Ke,ariaGrabbed:We,ariaHasPopup:null,ariaHidden:We,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ke,ariaLevel:W,ariaLive:null,ariaModal:We,ariaMultiLine:We,ariaMultiSelectable:We,ariaOrientation:null,ariaOwns:Ke,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:We,ariaReadOnly:We,ariaRelevant:null,ariaRequired:We,ariaRoleDescription:Ke,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:We,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function tt(e,t){return t in e?e[t]:t}function nt(e,t){return tt(e,t.toLowerCase())}var rt=$e({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:qe,acceptCharset:Ke,accessKey:Ke,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:Ke,autoFocus:U,autoPlay:U,blocking:Ke,capture:null,charSet:null,checked:U,cite:null,className:Ke,cols:W,colSpan:null,content:null,contentEditable:We,controls:U,controlsList:Ke,coords:W|qe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:Ge,draggable:We,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:Ke,height:W,hidden:Ge,high:W,href:null,hrefLang:null,htmlFor:Ke,httpEquiv:Ke,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:Ke,itemRef:Ke,itemScope:U,itemType:Ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:W,pattern:null,ping:Ke,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:Ke,required:U,reversed:U,rows:W,rowSpan:W,sandbox:Ke,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:We,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:We,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ke,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:We,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:W,security:null,unselectable:null},space:`html`,transform:nt}),it=$e({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Je,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:Ke,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qe,g2:qe,glyphName:qe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:Je,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Je,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Je,rev:Je,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Je,requiredFeatures:Je,requiredFonts:Je,requiredFormats:Je,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:Je,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Je,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Je,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:tt}),at=$e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ot=$e({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:nt}),st=$e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ct={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},lt=/[A-Z]/g,ut=/-[a-z]/g,dt=/^data[-\w.:]+$/i;function ft(e,t){let n=Be(t),r=t,i=Ve;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&dt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ut,mt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ut.test(e)){let n=e.replace(lt,pt);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ze}return new i(r,t)}function pt(e){return`-`+e.toLowerCase()}function mt(e){return e.charAt(1).toUpperCase()}var ht=ze([et,rt,at,ot,st],`html`),gt=ze([et,it,at,ot,st],`svg`);function _t(e){return e.join(` `).trim()}var vt=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
3
|
-
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),yt=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(vt());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),bt=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),xt=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(yt()),r=bt();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),St=wt(`end`),Ct=wt(`start`);function wt(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Tt(e){let t=Ct(e),n=St(e);if(t&&n)return{start:t,end:n}}function Et(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Ot(e.position):`start`in e||`end`in e?Ot(e):`line`in e||`column`in e?Dt(e):``}function Dt(e){return kt(e&&e.line)+`:`+kt(e&&e.column)}function Ot(e){return Dt(e&&e.start)+`-`+Dt(e&&e.end)}function kt(e){return e&&typeof e==`number`?e:1}var At=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Et(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};At.prototype.file=``,At.prototype.name=``,At.prototype.reason=``,At.prototype.message=``,At.prototype.stack=``,At.prototype.column=void 0,At.prototype.line=void 0,At.prototype.ancestors=void 0,At.prototype.cause=void 0,At.prototype.fatal=void 0,At.prototype.place=void 0,At.prototype.ruleId=void 0,At.prototype.source=void 0;var jt=t(xt(),1),Mt={}.hasOwnProperty,Nt=new Map,Pt=/[A-Z]/g,Ft=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),It=new Set([`td`,`th`]),Lt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Rt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Yt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Jt(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?gt:ht,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=zt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function zt(e,t,n){if(t.type===`element`)return Bt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Vt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Ut(e,t,n);if(t.type===`mdxjsEsm`)return Ht(e,t);if(t.type===`root`)return Wt(e,t,n);if(t.type===`text`)return Gt(e,t)}function Bt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=gt,e.schema=i),e.ancestors.push(t);let a=tn(e,t.tagName,!1),o=Xt(e,t),s=Qt(e,t);return Ft.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Ie(e):!0})),Kt(e,o,a,t),qt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Vt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}nn(e,t.position)}function Ht(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nn(e,t.position)}function Ut(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=gt,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:tn(e,t.name,!0),o=Zt(e,t),s=Qt(e,t);return Kt(e,o,a,t),qt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Wt(e,t,n){let r={};return qt(r,Qt(e,t)),e.create(t,e.Fragment,r,n)}function Gt(e,t){return t.value}function Kt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function qt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Jt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Yt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Ct(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Xt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Mt.call(t.properties,i)){let a=$t(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&It.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Zt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else nn(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else nn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Qt(e,t){let n=[],r=-1,i=e.passKeys?new Map:Nt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=zt(e,a,o);s!==void 0&&n.push(s)}return n}function $t(e,t,n){let r=ft(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ae(n):_t(n)),r.property===`style`){let t=typeof n==`object`?n:en(e,String(n));return e.stylePropertyNameCase===`css`&&(t=rn(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ct[r.property]||r.property:r.attribute,n]}}function en(e,t){try{return(0,jt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new At("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Lt+`#cannot-parse-style-attribute`,r}}function tn(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Pe(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Pe(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Mt.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);nn(e)}function nn(e,t){let n=new At("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Lt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function rn(e){let t={},n;for(n in e)Mt.call(e,n)&&(t[an(n)]=e[n]);return t}function an(e){let t=e.replace(Pt,on);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function on(e){return`-`+e.toLowerCase()}var sn={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},cn={};function ln(e,t){let n=t||cn;return un(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function un(e,t,n){if(fn(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return dn(e.children,t,n)}return Array.isArray(e)?dn(e,t,n):``}function dn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=un(e[i],t,n);return r.join(``)}function fn(e){return!!(e&&typeof e==`object`)}var pn=document.createElement(`i`);function mn(e){let t=`&`+e+`;`;pn.innerHTML=t;let n=pn.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function hn(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function gn(e,t){return e.length>0?(hn(e,e.length,0,t),e):t}var _n={}.hasOwnProperty;function vn(e){let t={},n=-1;for(;++n<e.length;)yn(t,e[n]);return t}function yn(e,t){let n;for(n in t){let r=(_n.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){_n.call(r,a)||(r[a]=[]);let e=i[a];bn(r[a],Array.isArray(e)?e:e?[e]:[])}}}function bn(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);hn(e,0,0,r)}function xn(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Sn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Cn=Pn(/[A-Za-z]/),wn=Pn(/[\dA-Za-z]/),Tn=Pn(/[#-'*+\--9=?A-Z^-~]/);function En(e){return e!==null&&(e<32||e===127)}var Dn=Pn(/\d/),On=Pn(/[\dA-Fa-f]/),kn=Pn(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function An(e){return e!==null&&(e<0||e===32)}function jn(e){return e===-2||e===-1||e===32}var Mn=Pn(/\p{P}|\p{S}/u),Nn=Pn(/\s/);function Pn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Fn(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&wn(e.charCodeAt(n+1))&&wn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function In(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return jn(r)?(e.enter(n),s(r)):t(r)}function s(r){return jn(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Ln={tokenize:Rn};function Rn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),In(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return G(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var zn={tokenize:Vn},Bn={tokenize:Hn};function Vn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return hn(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bn,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Bn,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return G(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;hn(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hn(e,t,n){return In(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Un(e){if(e===null||An(e)||Nn(e))return 1;if(Mn(e))return 2}function Wn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Gn={name:`attention`,resolveAll:Kn,tokenize:qn};function Kn(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Jn(d,-c),Jn(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=gn(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=gn(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=gn(l,Wn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=gn(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=gn(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,hn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function qn(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Un(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Un(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Jn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Yn={name:`autolink`,tokenize:Xn};function Xn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Cn(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||wn(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||wn(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||En(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Tn(t)?(e.consume(t),l):n(t)}function u(e){return wn(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||wn(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Zn={partial:!0,tokenize:Qn};function Qn(e,t,n){return r;function r(t){return jn(t)?In(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||G(e)?t(e):n(e)}}var $n={continuation:{tokenize:tr},exit:nr,name:`blockQuote`,tokenize:er};function er(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return jn(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function tr(e,t,n){let r=this;return i;function i(t){return jn(t)?In(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt($n,t,n)(r)}}function nr(e){e.exit(`blockQuote`)}var rr={name:`characterEscape`,tokenize:ir};function ir(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return kn(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var ar={name:`characterReference`,tokenize:or};function or(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=wn,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=On,u):(e.enter(`characterReferenceValue`),a=7,o=Dn,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===wn&&!mn(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var sr={partial:!0,tokenize:ur},cr={concrete:!0,name:`codeFenced`,tokenize:lr};function lr(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),jn(t)?In(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||G(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(sr,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):jn(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),In(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||G(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&jn(t)?In(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||G(t)?e.check(sr,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||G(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),jn(t)?In(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),jn(t)?In(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||G(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ur(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var dr={name:`codeIndented`,tokenize:pr},fr={partial:!0,tokenize:mr};function pr(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),In(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):G(t)?e.attempt(fr,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||G(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function mr(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):In(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):G(e)?i(e):n(e)}}var hr={name:`codeText`,previous:_r,resolve:gr,tokenize:vr};function gr(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function _r(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function vr(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||G(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var yr=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&br(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),br(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),br(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);br(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);br(this.left,t.reverse())}}};function br(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function xr(e){let t={},n=-1,r,i,a,o,s,c,l,u=new yr(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Sr(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return hn(e,0,1/0,u.slice(0)),!l}function Sr(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Cr={resolve:Tr,tokenize:Er},wr={partial:!0,tokenize:Dr};function Tr(e){return xr(e),e}function Er(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):G(t)?e.check(wr,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Dr(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),In(e,a,`linePrefix`)}function a(i){if(i===null||G(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Or(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||En(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||G(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||An(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||En(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function kr(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):G(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||G(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!jn(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Ar(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),In(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||G(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function jr(e,t){let n;return r;function r(i){return G(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):jn(i)?In(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Mr={name:`definition`,tokenize:Pr},Nr={partial:!0,tokenize:Fr};function Pr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return kr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Sn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return An(t)?jr(e,l)(t):l(t)}function l(t){return Or(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Nr,d,d)(t)}function d(t){return jn(t)?In(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||G(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Fr(e,t,n){return r;function r(t){return An(t)?jr(e,i)(t):n(t)}function i(t){return Ar(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return jn(t)?In(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||G(e)?t(e):n(e)}}var Ir={name:`hardBreakEscape`,tokenize:Lr};function Lr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return G(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Rr={name:`headingAtx`,resolve:zr,tokenize:Br};function zr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},hn(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Br(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||An(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||G(n)?(e.exit(`atxHeading`),t(n)):jn(n)?In(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||An(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Vr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Hr=[`pre`,`script`,`style`,`textarea`],Ur={concrete:!0,name:`htmlFlow`,resolveTo:Kr,tokenize:qr},Wr={partial:!0,tokenize:Yr},Gr={partial:!0,tokenize:Jr};function Kr(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function qr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):Cn(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Cn(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Cn(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||An(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Hr.includes(l)?(i=1,r.interrupt?t(s):O(s)):Vr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||wn(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return jn(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Cn(t)?(e.consume(t),b):jn(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||wn(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):jn(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):jn(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||G(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||An(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||jn(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||G(t)?O(t):jn(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):G(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Wr,te,k)(t)):t===null||G(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Gr,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||G(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Hr.includes(n)?(e.consume(t),I):O(t)}return Cn(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||G(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function Jr(e,t,n){let r=this;return i;function i(t){return G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Yr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Zn,t,n)}}var Xr={name:`htmlText`,tokenize:Zr};function Zr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Cn(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Cn(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):G(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):G(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):G(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):G(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Cn(t)?(e.consume(t),S):n(t)}function S(t){return t===45||wn(t)?(e.consume(t),S):C(t)}function C(t){return G(t)?(o=C,N(t)):jn(t)?(e.consume(t),C):M(t)}function w(t){return t===45||wn(t)?(e.consume(t),w):t===47||t===62||An(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Cn(t)?(e.consume(t),E):G(t)?(o=T,N(t)):jn(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||wn(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):G(t)?(o=D,N(t)):jn(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):G(t)?(o=O,N(t)):jn(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):G(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||An(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||An(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return jn(t)?In(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var Qr={name:`labelEnd`,resolveAll:ni,resolveTo:ri,tokenize:ii},$r={tokenize:ai},ei={tokenize:oi},ti={tokenize:si};function ni(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&hn(e,0,e.length,n),e}function ri(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=gn(s,e.slice(a+1,a+r+3)),s=gn(s,[[`enter`,u,t]]),s=gn(s,Wn(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=gn(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=gn(s,e.slice(o+1)),s=gn(s,[[`exit`,c,t]]),hn(e,a,e.length,s),e}function ii(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Sn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt($r,u,o?u:d)(t):t===91?e.attempt(ei,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ti,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function ai(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return An(t)?jr(e,a)(t):a(t)}function a(t){return t===41?u(t):Or(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return An(t)?jr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Ar(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return An(t)?jr(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function oi(e,t,n){let r=this;return i;function i(t){return kr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Sn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function si(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var ci={name:`labelStartImage`,resolveAll:Qr.resolveAll,tokenize:li};function li(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ui={name:`labelStartLink`,resolveAll:Qr.resolveAll,tokenize:di};function di(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var fi={name:`lineEnding`,tokenize:pi};function pi(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),In(e,t,`linePrefix`)}}var mi={name:`thematicBreak`,tokenize:hi};function hi(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||G(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),jn(t)?In(e,s,`whitespace`)(t):s(t))}}var gi={continuation:{tokenize:bi},exit:Si,name:`list`,tokenize:yi},_i={partial:!0,tokenize:Ci},vi={partial:!0,tokenize:xi};function yi(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Dn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(mi,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Dn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Zn,r.interrupt?n:u,e.attempt(_i,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return jn(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function bi(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Zn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,In(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!jn(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(vi,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,In(e,e.attempt(gi,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function xi(e,t,n){let r=this;return In(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Si(e){e.exit(this.containerState.type)}function Ci(e,t,n){let r=this;return In(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!jn(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var wi={name:`setextUnderline`,resolveTo:Ti,tokenize:Ei};function Ti(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Ei(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),jn(t)?In(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||G(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Di={tokenize:Oi};function Oi(e){let t=this,n=e.attempt(Zn,r,e.attempt(this.parser.constructs.flowInitial,i,In(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Cr,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ki={resolveAll:Ni()},Ai=Mi(`string`),ji=Mi(`text`);function Mi(e){return{resolveAll:Ni(e===`text`?Pi:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Ni(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Pi(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Fi=e({attentionMarkers:()=>Ui,contentInitial:()=>Li,disable:()=>Wi,document:()=>Ii,flow:()=>zi,flowInitial:()=>Ri,insideSpan:()=>Hi,string:()=>Bi,text:()=>Vi}),Ii={42:gi,43:gi,45:gi,48:gi,49:gi,50:gi,51:gi,52:gi,53:gi,54:gi,55:gi,56:gi,57:gi,62:$n},Li={91:Mr},Ri={[-2]:dr,[-1]:dr,32:dr},zi={35:Rr,42:mi,45:[wi,mi],60:Ur,61:wi,95:mi,96:cr,126:cr},Bi={38:ar,92:rr},Vi={[-5]:fi,[-4]:fi,[-3]:fi,33:ci,38:ar,42:Gn,60:[Yn,Xr],91:ui,92:[Ir,rr],93:Qr,95:Gn,96:hr},Hi={null:[Gn,ki]},Ui={null:[42,95]},Wi={null:[]};function Gi(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=gn(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Wn(a,l.events,l),l.events):[]}function f(e,t){return qi(p(e),t)}function p(e){return Ki(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){G(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&hn(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ki(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function qi(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
4
|
-
`;break;case-3:o=`\r
|
|
5
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Ji(e){let t={constructs:vn([Fi,...(e||{}).extensions||[]]),content:n(Ln),defined:[],document:n(zn),flow:n(Di),lazy:{},string:n(Ai),text:n(ji)};return t;function n(e){return n;function n(n){return Gi(t,e,n)}}}function Yi(e){for(;!xr(e););return e}var Xi=/[\0\t\n\r]/g;function Zi(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Xi.lastIndex=u,c=Xi.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Qi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $i(e){return e.replace(Qi,ea)}function ea(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return xn(n.slice(t?2:1),t?16:10)}return mn(n)||e}var ta={}.hasOwnProperty;function na(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ra(n)(Yi(Ji(n).document().write(Zi()(e,t,!0))))}function ra(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(me),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ue),blockQuote:a(oe),characterEscape:T,characterReference:T,codeFenced:a(se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(se,o),codeText:a(B,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(le),hardBreakEscape:a(de),hardBreakTrailing:a(de),htmlFlow:a(fe,o),htmlFlowData:T,htmlText:a(fe,o),htmlTextData:T,image:a(pe),label:o,link:a(me),listItem:a(ge),listItemValue:f,listOrdered:a(he,d),listUnordered:a(he),paragraph:a(_e),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ue),strong:a(ve),thematicBreak:a(be)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:z,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:R,characterReferenceMarkerNumeric:R,characterReferenceValue:re,characterReference:ie,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:ee,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:L,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};aa(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];ta.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||sa).call(a,void 0,e[0])}for(r.position={start:ia(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ia(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ia(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||sa).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Et({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ia(e.end)}function u(){return ln(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Sn(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ye(),n.position={start:ia(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ia(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ia(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=$i(t),n.identifier=Sn(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function L(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Sn(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function R(e){this.data.characterReferenceType=e.type}function re(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=xn(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=mn(t);let i=this.stack[this.stack.length-1];i.value+=r}function ie(e){let t=this.stack.pop();t.position.end=ia(e.end)}function ae(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function z(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function oe(){return{type:`blockquote`,children:[]}}function se(){return{type:`code`,lang:null,meta:null,value:``}}function B(){return{type:`inlineCode`,value:``}}function ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function le(){return{type:`emphasis`,children:[]}}function ue(){return{type:`heading`,depth:0,children:[]}}function de(){return{type:`break`}}function fe(){return{type:`html`,value:``}}function pe(){return{type:`image`,title:null,url:``,alt:null}}function me(){return{type:`link`,title:null,url:``,children:[]}}function he(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ge(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function _e(){return{type:`paragraph`,children:[]}}function ve(){return{type:`strong`,children:[]}}function ye(){return{type:`text`,value:``}}function be(){return{type:`thematicBreak`}}}function ia(e){return{line:e.line,column:e.column,offset:e.offset}}function aa(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?aa(e,r):oa(e,r)}}function oa(e,t){let n;for(n in t)if(ta.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function sa(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Et({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Et({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Et({start:t.start,end:t.end})+`) is still open`)}function ca(e){let t=this;t.parser=n;function n(n){return na(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function la(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ua(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
6
|
-
`}]}function da(e,t){let n=t.value?t.value+`
|
|
7
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function fa(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pa(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ma(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Fn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function ha(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ga(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function _a(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function va(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _a(e,t);let i={src:Fn(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function ya(e,t){let n={src:Fn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ba(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function xa(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _a(e,t);let i={href:Fn(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Sa(e,t){let n={href:Fn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ca(e,t,n){let r=e.all(t),i=n?wa(n):Ta(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
9
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function wa(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Ta(n[r])}return t}function Ta(e){return e.spread??e.children.length>1}function Ea(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Da(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oa(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ka(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Aa(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Ct(t.children[1]),o=St(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function ja(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Ma(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Na=9,Pa=32;function Fa(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Ia(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ia(t.slice(i),i>0,!1)),a.join(``)}function Ia(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Na||t===Pa;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Na||t===Pa;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function La(e,t){let n={type:`text`,value:Fa(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ra(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var za={blockquote:la,break:ua,code:da,delete:fa,emphasis:pa,footnoteReference:ma,heading:ha,html:ga,imageReference:va,image:ya,inlineCode:ba,linkReference:xa,link:Sa,listItem:Ca,list:Ea,paragraph:Da,root:Oa,strong:ka,table:Aa,tableCell:Ma,tableRow:ja,text:La,thematicBreak:Ra,toml:Ba,yaml:Ba,definition:Ba,footnoteDefinition:Ba};function Ba(){}var Va=typeof self==`object`?self:globalThis,Ha=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Va[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Va[a](o),i)};return r},Ua=e=>Ha(new Map,e)(0),Wa=``,{toString:Ga}={},{keys:Ka}=Object,qa=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Ga.call(e).slice(8,-1);switch(n){case`Array`:return[1,Wa];case`Object`:return[2,Wa];case`Date`:return[3,Wa];case`RegExp`:return[4,Wa];case`Map`:return[5,Wa];case`Set`:return[6,Wa];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Ja=([e,t])=>e===0&&(t===`function`||t===`symbol`),Ya=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=qa(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Ka(r))(e||!Ja(qa(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Ja(qa(n))||Ja(qa(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Ja(qa(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Xa=(e,{json:t,lossy:n}={})=>{let r=[];return Ya(!(t||n),!!t,new Map,r)(e),r},Za=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Ua(Xa(e,t)):structuredClone(e):(e,t)=>Ua(Xa(e,t));function Qa(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function $a(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function eo(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Qa,r=e.options.footnoteBackLabel||$a,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Fn(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Za(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
10
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
11
|
-
`}]}}var to=(function(e){if(e==null)return oo;if(typeof e==`function`)return ao(e);if(typeof e==`object`)return Array.isArray(e)?no(e):ro(e);if(typeof e==`string`)return io(e);throw Error(`Expected function, string, or object as test`)});function no(e){let t=[],n=-1;for(;++n<e.length;)t[n]=to(e[n]);return ao(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ro(e){let t=e;return ao(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function io(e){return ao(t);function t(t){return t&&t.type===e}}function ao(e){return t;function t(t,n,r){return!!(so(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function oo(){return!0}function so(e){return typeof e==`object`&&!!e&&`type`in e}function co(e){return e}var lo=[];function uo(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=to(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+co(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=lo,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=fo(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function fo(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?lo:[e]}function po(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),uo(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var mo={}.hasOwnProperty,ho={};function go(e,t){let n=t||ho,r=new Map,i=new Map,a={all:s,applyData:vo,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...za,...n.handlers},one:o,options:n,patch:_o,wrap:bo};return po(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(mo.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Za(n);return r.children=a.all(e),r}return Za(e)}return(a.options.unknownHandler||yo)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=xo(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=xo(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function _o(e,t){e.position&&(t.position=Tt(e))}function vo(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Za(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function yo(e,t){let n=t.data||{},r=`value`in t&&!(mo.call(n,`hProperties`)||mo.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bo(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
12
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
13
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
14
|
-
`}),n}function xo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function So(e,t){let n=go(e,t),r=n.one(e,void 0),i=eo(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
15
|
-
`},i)),a}function Co(e,t){return e&&`run`in e?async function(n,r){let i=So(n,{file:r,...t});await e.run(i,r)}:function(n,r){return So(n,{file:r,...e||t})}}function wo(e){if(e)throw e}var To=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Eo(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Do(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Oo(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Oo(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var ko={basename:Ao,dirname:jo,extname:Mo,join:No,sep:`/`};function Ao(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Io(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function jo(e){if(Io(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Mo(e){Io(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function No(...e){let t=-1,n;for(;++t<e.length;)Io(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Po(n)}function Po(e){Io(e);let t=e.codePointAt(0)===47,n=Fo(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Fo(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Io(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Lo={cwd:Ro};function Ro(){return`/`}function zo(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Bo(e){if(typeof e==`string`)e=new URL(e);else if(!zo(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Vo(e)}function Vo(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Ho=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Uo=class{constructor(e){let t;t=e?zo(e)?{path:e}:typeof e==`string`||qo(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Lo.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Ho.length;){let e=Ho[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Ho.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?ko.basename(this.path):void 0}set basename(e){Go(e,`basename`),Wo(e,`basename`),this.path=ko.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?ko.dirname(this.path):void 0}set dirname(e){Ko(this.basename,`dirname`),this.path=ko.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?ko.extname(this.path):void 0}set extname(e){if(Wo(e,`extname`),Ko(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=ko.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){zo(e)&&(e=Bo(e)),Go(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?ko.basename(this.path,this.extname):void 0}set stem(e){Go(e,`stem`),Wo(e,`stem`),this.path=ko.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new At(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Wo(e,t){if(e&&e.includes(ko.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+ko.sep+"`")}function Go(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Ko(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function qo(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Jo=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Yo=t(To(),1),Xo={}.hasOwnProperty,Zo=new class e extends Jo{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Do()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Yo.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(es(`data`,this.frozen),this.namespace[e]=t,this):Xo.call(this.namespace,e)&&this.namespace[e]||void 0:e?(es(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=rs(e),n=this.parser||this.Parser;return Qo(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Qo(`process`,this.parser||this.Parser),$o(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=rs(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);as(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Qo(`processSync`,this.parser||this.Parser),$o(`processSync`,this.compiler||this.Compiler),this.process(e,r),ns(`processSync`,`process`,t),n;function r(e,r){t=!0,wo(e),n=r}}run(e,t,n){ts(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=rs(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),ns(`runSync`,`run`,n),r;function i(e,t){wo(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=rs(t),r=this.compiler||this.Compiler;return $o(`stringify`,r),ts(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(es(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Yo.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Eo(o)&&Eo(r)&&(r=(0,Yo.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Qo(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function $o(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function es(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ts(e){if(!Eo(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function ns(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function rs(e){return is(e)?e:new Uo(e)}function is(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function as(e){return typeof e==`string`||os(e)}function os(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ss=[],cs={allowDangerousHtml:!0},ls=/^(https?|ircs?|mailto|xmpp)$/i,us=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function ds(e){let t=fs(e),n=ps(e);return ms(t.runSync(t.parse(n),n),e)}function fs(e){let t=e.rehypePlugins||ss,n=e.remarkPlugins||ss,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cs}:cs;return Zo().use(ca).use(n).use(Co,r).use(t)}function ps(e){let t=e.children||``,n=new Uo;return typeof t==`string`?n.value=t:``+t,n}function ms(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||hs;for(let e of us)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),po(e,l),Rt(e,{Fragment:H.Fragment,components:i,ignoreInvalidStyle:!0,jsx:H.jsx,jsxs:H.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in sn)if(Object.hasOwn(sn,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=sn[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function hs(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ls.test(e.slice(0,t))?e:``}function gs(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function _s(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function vs(e,t,n){let r=to((n||{}).ignore||[]),i=ys(t),a=-1;for(;++a<i.length;)uo(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function ys(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([bs(e[0]),xs(e[1])])}return t}function bs(e){return typeof e==`string`?new RegExp(_s(e),`g`):e}function xs(e){return typeof e==`function`?e:function(){return e}}var Ss=`phrasing`,Cs=[`autolink`,`link`,`image`,`label`];function ws(){return{transforms:[Ms],enter:{literalAutolink:Es,literalAutolinkEmail:Ds,literalAutolinkHttp:Ds,literalAutolinkWww:Ds},exit:{literalAutolink:js,literalAutolinkEmail:As,literalAutolinkHttp:Os,literalAutolinkWww:ks}}}function Ts(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Ss,notInConstruct:Cs},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Ss,notInConstruct:Cs},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Ss,notInConstruct:Cs}]}}function Es(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Ds(e){this.config.enter.autolinkProtocol.call(this,e)}function Os(e){this.config.exit.autolinkProtocol.call(this,e)}function ks(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function As(e){this.config.exit.autolinkEmail.call(this,e)}function js(e){this.exit(e)}function Ms(e){vs(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ns],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ps]],{ignore:[`link`,`linkReference`]})}function Ns(e,t,n,r,i){let a=``;if(!Ls(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Fs(n)))return!1;let o=Is(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Ps(e,t,n,r){return!Ls(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Fs(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Is(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=gs(e,`(`),a=gs(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Ls(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Nn(n)||Mn(n))&&(!t||n!==47)}qs.peek=Ks;function Rs(){this.buffer()}function zs(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Bs(){this.buffer()}function Vs(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Hs(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Sn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Us(e){this.exit(e)}function Ws(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Sn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Gs(e){this.exit(e)}function Ks(){return`[`}function qs(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Js(){return{enter:{gfmFootnoteCallString:Rs,gfmFootnoteCall:zs,gfmFootnoteDefinitionLabelString:Bs,gfmFootnoteDefinition:Vs},exit:{gfmFootnoteCallString:Hs,gfmFootnoteCall:Us,gfmFootnoteDefinitionLabelString:Ws,gfmFootnoteDefinition:Gs}}}function Ys(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:qs},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
16
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Zs:Xs))),s(),o}}function Xs(e,t,n){return t===0?e:Zs(e,t,n)}function Zs(e,t,n){return(n?``:` `)+e}var Qs=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];rc.peek=ic;function $s(){return{canContainEols:[`delete`],enter:{strikethrough:tc},exit:{strikethrough:nc}}}function ec(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Qs}],handlers:{delete:rc}}}function tc(e){this.enter({type:`delete`,children:[]},e)}function nc(e){this.exit(e)}function rc(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function ic(){return`~`}function ac(e){return e.length}function oc(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ac,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=sc(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=cc(r[d]);else{let e=cc(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
17
|
-
`)}function sc(e){return e==null?``:String(e)}function cc(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function lc(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),uc);return i(),o}function uc(e,t,n){return`>`+(n?``:` `)+e}function dc(e,t){return fc(e,t.inConstruct,!0)&&!fc(e,t.notInConstruct,!1)}function fc(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function pc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
18
|
-
`&&dc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
19
|
-
`}function mc(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function hc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function gc(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function _c(e,t,n,r){let i=gc(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(hc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,vc);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(mc(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
20
|
-
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
21
|
-
`),a&&(u+=s.move(a+`
|
|
22
|
-
`)),u+=s.move(c),l(),u}function vc(e,t,n){return(n?``:` `)+e}function yc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function bc(e,t,n,r){let i=yc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
23
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function xc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Sc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Cc(e,t,n){let r=Un(e),i=Un(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}wc.peek=Tc;function wc(e,t,n,r){let i=xc(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Cc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Sc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Cc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Sc(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Tc(e,t,n){return n.options.emphasis||`*`}function Ec(e,t){let n=!1;return po(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ln(e)&&(t.options.setext||n))}function Dc(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Ec(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
24
|
-
`,after:`
|
|
25
|
-
`});return r(),t(),o+`
|
|
26
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
27
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
28
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=Sc(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Oc.peek=kc;function Oc(e){return e.value||``}function kc(){return`<`}Ac.peek=jc;function Ac(e,t,n,r){let i=yc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function jc(){return`!`}Mc.peek=Nc;function Mc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Nc(){return`!`}Pc.peek=Fc;function Pc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Fc(){return"`"}function Ic(e,t){let n=ln(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Lc.peek=Rc;function Lc(e,t,n,r){let i=yc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Ic(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Rc(e,t,n){return Ic(e,n)?`<`:`[`}zc.peek=Bc;function zc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Bc(){return`[`}function Vc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Hc(e){let t=Vc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Uc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Wc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Gc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Uc(n):Vc(n),s=e.ordered?o===`.`?`)`:`.`:Hc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Wc(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Kc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function qc(e,t,n,r){let i=Kc(n),a=n.bulletCurrent||Vc(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Jc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Yc=to([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Xc(e,t,n,r){return(e.children.some(function(e){return Yc(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Zc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Qc.peek=$c;function Qc(e,t,n,r){let i=Zc(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Cc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Sc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Cc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Sc(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function $c(e,t,n){return n.options.strong||`*`}function el(e,t,n,r){return n.safe(e.value,r)}function tl(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function nl(e,t,n){let r=(Wc(n)+(n.options.ruleSpaces?` `:``)).repeat(tl(n));return n.options.ruleSpaces?r.slice(0,-1):r}var rl={blockquote:lc,break:pc,code:_c,definition:bc,emphasis:wc,hardBreak:pc,heading:Dc,html:Oc,image:Ac,imageReference:Mc,inlineCode:Pc,link:Lc,linkReference:zc,list:Gc,listItem:qc,paragraph:Jc,root:Xc,strong:Qc,text:el,thematicBreak:nl};function il(){return{enter:{table:al,tableData:ll,tableHeader:ll,tableRow:sl},exit:{codeText:ul,table:ol,tableData:cl,tableHeader:cl,tableRow:cl}}}function al(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function ol(e){this.exit(e),this.data.inTable=void 0}function sl(e){this.enter({type:`tableRow`,children:[]},e)}function cl(e){this.exit(e)}function ll(e){this.enter({type:`tableCell`,children:[]},e)}function ul(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,dl));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function dl(e,t){return t===`|`?t:e}function fl(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
29
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
30
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return oc(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=rl.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function pl(){return{exit:{taskListCheckValueChecked:hl,taskListCheckValueUnchecked:hl,paragraph:gl}}}function ml(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:_l}}}function hl(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function gl(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function _l(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=rl.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function vl(){return[ws(),Js(),$s(),il(),pl()]}function yl(e){return{extensions:[Ts(),Ys(e),ec(),fl(e),ml()]}}var bl={tokenize:Pl,partial:!0},xl={tokenize:Fl,partial:!0},Sl={tokenize:Il,partial:!0},Cl={tokenize:Ll,partial:!0},wl={tokenize:Rl,partial:!0},Tl={name:`wwwAutolink`,tokenize:Ml,previous:zl},El={name:`protocolAutolink`,tokenize:Nl,previous:Bl},Dl={name:`emailAutolink`,tokenize:jl,previous:Vl},Ol={};function kl(){return{text:Ol}}for(var Al=48;Al<123;)Ol[Al]=Dl,Al++,Al===58?Al=65:Al===91&&(Al=97);Ol[43]=Dl,Ol[45]=Dl,Ol[46]=Dl,Ol[95]=Dl,Ol[72]=[Dl,El],Ol[104]=[Dl,El],Ol[87]=[Dl,Tl],Ol[119]=[Dl,Tl];function jl(e,t,n){let r=this,i,a;return o;function o(t){return!Hl(t)||!Vl.call(r,r.previous)||Ul(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Hl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(wl,u,l)(t):t===45||t===95||wn(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Cn(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Ml(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!zl.call(r,r.previous)||Ul(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(bl,e.attempt(xl,e.attempt(Sl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Nl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Bl.call(r,r.previous)&&!Ul(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Cn(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||En(t)||An(t)||Nn(t)||Mn(t)?n(t):e.attempt(xl,e.attempt(Sl,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Pl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Fl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Cl,c,s)(t):t===null||An(t)||Nn(t)||t!==45&&Mn(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Il(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Cl,t,a)(o):o===null||An(o)||Nn(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Ll(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||An(o)||Nn(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||An(e)||Nn(e)?t(e):r(e)}function a(e){return Cn(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Cn(t)?(e.consume(t),o):n(t)}}function Rl(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return wn(e)?n(e):t(e)}}function zl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||An(e)}function Bl(e){return!Cn(e)}function Vl(e){return!(e===47||Hl(e))}function Hl(e){return e===43||e===45||e===46||e===95||wn(e)}function Ul(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Wl={tokenize:Ql,partial:!0};function Gl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Yl,continuation:{tokenize:Xl},exit:Zl}},text:{91:{name:`gfmFootnoteCall`,tokenize:Jl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Kl,resolveTo:ql}}}}function Kl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Sn(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function ql(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Jl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||An(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Sn(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return An(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Yl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||An(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Sn(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return An(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),In(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Xl(e,t,n){return e.check(Zn,t,e.attempt(Wl,t,n))}function Zl(e){e.exit(`gfmFootnoteDefinition`)}function Ql(e,t,n){let r=this;return In(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function $l(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&hn(o,o.length,0,Wn(s,e.slice(r+1,n),t)),hn(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),hn(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Un(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Un(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var eu=class{constructor(){this.map=[]}add(e,t,n){tu(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function tu(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function nu(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ru(){return{flow:{null:{name:`table`,tokenize:iu,resolveAll:au}}}}function iu(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):G(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):jn(t)?In(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||An(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,jn(t)?In(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return jn(t)?In(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||G(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return jn(t)?In(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||G(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||G(n)?(e.exit(`tableRow`),t(n)):jn(n)?In(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||An(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function au(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new eu;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(su(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=ou(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=ou(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=ou(f,t,o,i,n,d)):(o[0]=o[1],d=ou(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&su(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=nu(t.events,n))}return e}function ou(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},cu(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=cu(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=cu(t.events,n[2]),a=cu(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},cu(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function su(e,t,n,r,i){let a=[],o=cu(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function cu(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var lu={name:`tasklistCheck`,tokenize:du};function uu(){return{text:{91:lu}}}function du(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return An(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return G(r)?t(r):jn(r)?e.check({tokenize:fu},t,n)(r):n(r)}}function fu(e,t,n){return In(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function pu(e){return vn([kl(),Gl(),$l(e),ru(),uu()])}var mu={};function hu(e){let t=this,n=e||mu,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(pu(n)),a.push(vl()),o.push(yl(n))}var gu=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m5 12l7-7l7 7m-7 7V5`})}),_u=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`rect`,{width:18,height:18,x:3,y:3,rx:2,ry:2}),(0,H.jsx)(`circle`,{cx:9,cy:9,r:2}),(0,H.jsx)(`path`,{d:`m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21`})]})}),vu=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,H.jsx)(`path`,{d:`M3 3v5h5`})]})}),yu=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M10 5H3m9 14H3M14 3v4m2 10v4m5-9h-9m9 7h-5m5-14h-7m-6 5v4m0-2H3`})}),bu=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`rect`,{width:18,height:18,x:3,y:3,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,rx:2})}),xu=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 6L6 18M6 6l12 12`})}),Su=`/assets/chat-icon-JYfue7fB.png`;function Cu(e,t){return e.flatMap(e=>{let n=t?e.images??[]:[];return e.role===`user`?[{type:`message`,role:`user`,content:[{type:`input_text`,text:e.text},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[...e.text?[{type:`message`,role:`assistant`,content:[{type:`output_text`,text:e.text}]}]:[],...n.length?[{type:`message`,role:`user`,content:[{type:`input_text`,text:`Previously generated assistant images (reference for follow-up edits):`},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[]]})}function wu(e){return e.flatMap(e=>e.type===`image`?[`data:${e.mediaType??`image/png`};base64,${e.data}`]:[])}function Tu(e,t){return e.filter(e=>e.active&&e.provider===t).toSorted((e,t)=>e.ord-t.ord||e.name.localeCompare(t.name))}function Eu(e,t){return t!==void 0&&!e.some(e=>e.active&&e.provider===t)}function Du(e,t,n){return!e||!n||t.some(t=>t.name===e)?e:``}function Ou(e,t){return e.model!==t.model||e.system!==t.system||e.tokenName!==t.tokenName}function ku(e){return e?{tokenName:e}:{}}var Au=t(N(),1);function ju(e){let t=e.indexOf(`,`),n=e.slice(0,t).match(/^data:image\/(png|jpeg|webp);base64$/)?.[1];if(!n)return{extension:`—`,bytes:0};let r=e.endsWith(`==`)?2:e.endsWith(`=`)?1:0;return{extension:n===`jpeg`?`jpg`:n,bytes:Math.max(0,Math.floor((e.length-t-1)*3/4)-r)}}function Mu(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}function Nu({url:e,onClose:t}){let n=(0,V.useRef)(null),[r,i]=(0,V.useState)(null),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(!1),l=ju(e);return(0,V.useEffect)(()=>{let e=n.current;return e?.showModal(),()=>e?.close()},[]),(0,Au.createPortal)((0,H.jsxs)(`dialog`,{ref:n,"aria-labelledby":`chat-image-preview-title`,onCancel:e=>{e.preventDefault(),t()},onClick:e=>{if(e.target!==e.currentTarget)return;let n=e.currentTarget.getBoundingClientRect();(e.clientX<n.left||e.clientX>n.right||e.clientY<n.top||e.clientY>n.bottom)&&t()},className:`m-auto w-[min(1100px,calc(100vw-2rem))] max-w-none max-h-[calc(100dvh-2rem)] overflow-hidden rounded-2xl bg-white p-0 text-sand-900 shadow-xl backdrop:bg-black/65`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-sand-100 px-4 py-3`,children:[(0,H.jsx)(`h2`,{id:`chat-image-preview-title`,className:`text-sm font-semibold`,children:`이미지 미리보기`}),(0,H.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`이미지 미리보기 닫기`,className:`grid size-8 place-items-center rounded-full hover:bg-sand-100`,children:(0,H.jsx)(xu,{className:`size-4`})})]}),(0,H.jsx)(`div`,{className:`max-h-[calc(100dvh-13rem)] overflow-auto bg-sand-100 p-3`,style:{backgroundImage:`conic-gradient(#e8e4df 25%, #fff 0 50%, #e8e4df 0 75%, #fff 0)`,backgroundSize:`20px 20px`},children:s?(0,H.jsx)(`p`,{role:`alert`,className:`p-8 text-center text-danger-500`,children:`이미지를 불러올 수 없습니다.`}):(0,H.jsx)(`img`,{src:e,alt:`확대된 채팅 이미지`,onLoad:e=>i({width:e.currentTarget.naturalWidth,height:e.currentTarget.naturalHeight}),onError:()=>c(!0),className:a?`block max-w-none`:`mx-auto block max-h-[calc(100dvh-15rem)] max-w-full object-contain`})}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-sand-100 px-4 py-3`,children:[(0,H.jsxs)(`dl`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-xs tabular-nums`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`dt`,{className:`text-sand-400`,children:`확장자`}),(0,H.jsx)(`dd`,{className:`mt-1 uppercase`,children:l.extension})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`dt`,{className:`text-sand-400`,children:`파일 용량`}),(0,H.jsx)(`dd`,{className:`mt-1`,children:Mu(l.bytes)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`dt`,{className:`text-sand-400`,children:`해상도`}),(0,H.jsx)(`dd`,{className:`mt-1`,children:r?`${r.width} × ${r.height} px`:`—`})]})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 text-xs`,children:[(0,H.jsx)(`button`,{type:`button`,disabled:!r||s,onClick:()=>o(e=>!e),className:`text-sand-600 hover:underline disabled:opacity-40`,children:a?`화면에 맞추기`:`원본 크기`}),(0,H.jsx)(`a`,{href:e,download:`qgrid-image.${l.extension}`,className:`text-sienna-500 hover:underline`,children:`다운로드`})]})]})]}),document.body)}var Pu=`qgrid_chat`,Fu=`anthropic/claude-fable-5-1`,Iu=[{label:`OpenAI`,models:[`openai/gpt-6-astra`,`openai/gpt-6.1-sol`,`openai/gpt-6-sol`,`openai/gpt-6-luna`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-sol`,`openai/gpt-5.6-luna`]},{label:`Anthropic`,models:[`anthropic/claude-fable-5-1`,`anthropic/claude-fable-5`,`anthropic/claude-opus-5-5`,`anthropic/claude-opus-5`,`anthropic/claude-sonnet-5-5`,`anthropic/claude-sonnet-5`,`anthropic/claude-haiku-5-5`,`anthropic/claude-opus-4-8`,`anthropic/claude-opus-4-7`,`anthropic/claude-opus-4-6`,`anthropic/claude-opus-4-5`,`anthropic/claude-sonnet-4-6`,`anthropic/claude-haiku-4-5`]}],Lu=[`low`,`medium`,`high`];function Ru(e){return e instanceof Error?e.message:String(e)}var zu={openai:`OpenAI`,anthropic:`Anthropic`};function Bu(e,t,n){let r=n!==void 0&&Eu(n,t);return/NO_OPENAI_WORKERS|no ready openai workers|no anthropic tokens available/i.test(e)||r&&/기동 중입니다/.test(e)?`사용 가능한 ${t?zu[t]??t:``} 토큰이 없습니다. Tokens 페이지에서 토큰을 추가해주세요.`:e}function Vu(e){return e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}var Hu=4,Uu=1536;async function Wu(e){let t=await createImageBitmap(e),n=Math.min(1,Uu/Math.max(t.width,t.height)),r=document.createElement(`canvas`);return r.width=Math.max(1,Math.round(t.width*n)),r.height=Math.max(1,Math.round(t.height*n)),r.getContext(`2d`).drawImage(t,0,0,r.width,r.height),t.close(),r.toDataURL(`image/jpeg`,.85)}function Gu(){let[e,t]=(0,V.useState)(!1),[n,r]=(0,V.useState)(!1),[i,a]=(0,V.useState)([]),[o,s]=(0,V.useState)(``),[c,l]=(0,V.useState)(Fu),[u,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(``),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(!1),[v,y]=(0,V.useState)(null),[b,x]=(0,V.useState)(!1),[S,w]=(0,V.useState)([]),[T,E]=(0,V.useState)(null),D=(0,V.useRef)(null);(0,V.useEffect)(()=>()=>D.current?.abort(),[]);let O=(0,V.useRef)(void 0),k=(0,V.useRef)(void 0),A=(0,V.useRef)(null),j=(0,V.useRef)(null),M=(0,V.useRef)(null),N=c.split(`/`)[0],P=N===`openai`,{data:ee}=ce.useTokens(`A`,{orderBy:`ord-asc`},{enabled:e}),F=(0,V.useMemo)(()=>Tu(ee?.rows??[],N),[N,ee?.rows]),I=ee?.rows!==void 0,te=(0,V.useRef)(void 0);(0,V.useEffect)(()=>{te.current=ee?.rows},[ee?.rows]);let ne=ee?.rows!==void 0&&Eu(ee.rows,N);(0,V.useEffect)(()=>{P||w([])},[P]),(0,V.useEffect)(()=>{d(e=>Du(e,F,I))},[I,F]);let L=async e=>{if(!e)return;let t=Hu-S.length,n=await Promise.all([...e].slice(0,t).map(e=>Wu(e).catch(()=>null)));w(e=>[...e,...n.filter(e=>e!==null)].slice(0,Hu))},R=e=>{a(t=>{let n=t[t.length-1];return!n||n.role!==`assistant`?t:[...t.slice(0,-1),e(n)]})},re=e=>{let t=Bu(e,k.current?.model.split(`/`)[0],te.current);R(e=>e.status===`streaming`?{...e,status:`error`,error:t}:e),y(null),x(!1)},ie=B.useQueryStream({streamId:v??``},{delta:({text:e})=>{R(t=>t.status===`streaming`?{...t,text:t.text+e}:t)},toolCall:()=>{re(`tool call 응답은 채팅에서 지원하지 않습니다`)},done:e=>{O.current=e.runContext?.threadCoord,R(t=>({...t,text:e.text||t.text,images:wu(Array.isArray(e.content)?e.content:[e.content]),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}}))},error:({message:e})=>{re(e)},end:()=>{R(e=>e.status===`streaming`?{...e,status:`error`,error:`응답 완료 전에 스트림이 종료되었습니다`}:e),y(null),x(!1)}},{enabled:v!==null,retry:0});(0,V.useEffect)(()=>{v!==null&&ie.error&&re(ie.error)},[ie.error]),(0,V.useEffect)(()=>{A.current?.scrollTo({top:A.current.scrollHeight})},[i,e]),(0,V.useEffect)(()=>{e&&j.current?.focus()},[e]);let ae=async()=>{let e=o.trim();if(!e||b)return;let t=m.trim(),n=Du(u,F,I),r={model:c,system:t,tokenName:n};k.current&&Ou(k.current,r)&&(O.current=void 0),k.current=r;let l=P?S:[],d=Cu(i,P),p=new AbortController;D.current=p,a(t=>[...t,{role:`user`,text:e,...l.length>0?{images:l}:{}},{role:`assistant`,text:``,status:`streaming`}]),s(``),w([]),x(!0);try{let r={prompt:e,model:c,projectName:Pu,...ku(n),...t?{system:t}:{},...f?{effort:f}:{},...l.length>0?{input:l.map(e=>({type:`image`,url:e}))}:{},...d.length>0?{history:JSON.stringify(d)}:{},...O.current?{runContext:{threadCoord:O.current}}:{}};if(P){let e=await oe({method:`POST`,url:`/api/qgrid/query`,data:{args:{...r,imageGeneration:`auto`}},signal:p.signal});if(D.current!==p||p.signal.aborted)return;O.current=e.runContext?.threadCoord,R(t=>({...t,text:e.text,images:wu(e.content),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}})),x(!1),D.current=null;return}let{streamId:i}=await B.prepareStream(r);if(D.current!==p||p.signal.aborted)return;y(i)}catch(e){if(D.current!==p||p.signal.aborted)return;re(Ru(e)),D.current=null}},z=()=>{D.current?.abort(),D.current=null,R(e=>e.status===`streaming`?{...e,status:`aborted`}:e),y(null),x(!1)};return(0,H.jsxs)(`div`,{className:`fixed bottom-5 right-5 z-40`,children:[T&&(0,H.jsx)(Nu,{url:T,onClose:()=>E(null)},T),e?(0,H.jsxs)(`div`,{onAnimationEnd:()=>{n&&(t(!1),r(!1))},className:`flex flex-col w-[min(400px,calc(100vw-2.5rem))] h-[min(640px,calc(100dvh-7rem))] bg-white rounded-2xl shadow-[0_16px_48px_rgba(44,36,24,0.18),0_0_0_1px_rgba(227,218,204,0.6)] overflow-hidden origin-bottom-right ${n?`chat-panel-pop-out`:`chat-panel-pop`}`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 px-4 py-2.5 border-b border-sand-100 shrink-0`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`p`,{className:`text-[14px] font-semibold text-sand-900 leading-tight`,children:`채팅`}),(0,H.jsxs)(`p`,{className:`text-[11px] text-sand-400 truncate leading-tight`,children:[c,f?` · ${f}`:``,u?` · ${u}`:``]})]}),(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-0.5`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>_(e=>!e),title:`모델·토큰·effort·system prompt 설정`,className:`size-8 grid place-items-center rounded-full transition-colors duration-150 ${g?`text-sienna-500 bg-sienna-50`:`text-sand-500 hover:text-sand-700 hover:bg-sand-100`}`,children:(0,H.jsx)(yu,{className:`size-4`})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>{b&&z(),a([]),O.current=void 0,k.current=void 0},disabled:i.length===0,title:`새 대화`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,H.jsx)(vu,{className:`size-4`})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>{if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){t(!1);return}r(!0)},title:`닫기`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 transition-colors duration-150`,children:(0,H.jsx)(xu,{className:`size-4.5`})})]})]}),g&&(0,H.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand-100 bg-sand-50/60 shrink-0 flex flex-col gap-1.5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(`select`,{value:c,onChange:e=>l(e.target.value),disabled:b,className:`min-w-0 flex-1 rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-800 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:Iu.map(e=>(0,H.jsx)(`optgroup`,{label:e.label,children:e.models.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e))},e.label))}),(0,H.jsxs)(`select`,{value:f,onChange:e=>p(e.target.value),disabled:b,className:`rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-600 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,H.jsx)(`option`,{value:``,children:`effort 기본`}),Lu.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e))]})]}),(0,H.jsxs)(`select`,{value:u,onChange:e=>d(e.target.value),disabled:b,"aria-label":`요청 토큰`,className:`w-full rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-700 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,H.jsx)(`option`,{value:``,children:`토큰 자동 분배`}),F.map(e=>(0,H.jsx)(`option`,{value:e.name,children:e.name},e.name))]}),(0,H.jsx)(`textarea`,{value:m,onChange:e=>h(e.target.value),disabled:b,placeholder:`system prompt (선택)`,rows:2,className:`w-full resize-none rounded-xl border border-sand-200/80 bg-white px-2.5 py-1.5 text-[12px] text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 disabled:opacity-50`})]}),(0,H.jsx)(`div`,{ref:A,className:`flex-1 overflow-y-auto main-scroll px-3.5 py-3`,children:i.length===0?(0,H.jsx)(`div`,{className:`h-full grid place-items-center`,children:(0,H.jsxs)(`div`,{className:`text-center px-4`,children:[(0,H.jsx)(`img`,{src:Su,alt:``,className:`mx-auto mb-2.5 size-14 rounded-[35%] object-cover`}),(0,H.jsx)(`p`,{className:`text-[13px] text-sand-600`,children:`가용 토큰에게 바로 물어보세요.`}),(0,H.jsxs)(`p`,{className:`mt-1 text-[11px] text-sand-400`,children:[`대화는 저장되지 않고, 요청은`,` `,(0,H.jsx)(C,{to:`/logs`,search:{project:Pu,page:1},className:`text-sienna-500 hover:underline`,children:`request log`}),`에 기록됩니다.`]})]})}):(0,H.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:i.map((e,t)=>e.role===`user`?(0,H.jsxs)(`div`,{className:`self-end max-w-[80%] flex flex-col items-end gap-1`,children:[e.images&&(0,H.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1`,children:e.images.map((e,t)=>(0,H.jsx)(`button`,{type:`button`,onClick:()=>E(e),"aria-label":`첨부 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,H.jsx)(`img`,{src:e,alt:``,className:`size-24 rounded-xl object-cover`})},t))}),(0,H.jsx)(`div`,{className:`rounded-[18px] rounded-br-[5px] bg-sienna-600 px-3.5 py-2 text-[13px] leading-relaxed text-white whitespace-pre-wrap break-words`,children:e.text})]},t):(0,H.jsxs)(`div`,{className:`self-start max-w-[88%] min-w-0`,children:[(0,H.jsxs)(`div`,{className:`rounded-[18px] rounded-bl-[5px] bg-sand-100 px-3.5 py-2`,children:[e.images?.map((e,t)=>(0,H.jsxs)(`div`,{className:`my-1.5`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>E(e),"aria-label":`생성된 이미지 ${t+1} 크게 보기`,className:`block w-full cursor-zoom-in rounded-xl`,children:(0,H.jsx)(`img`,{src:e,alt:`생성된 이미지 ${t+1}`,onLoad:()=>A.current?.scrollTo({top:A.current.scrollHeight}),className:`w-full rounded-xl object-contain bg-white`})}),(0,H.jsx)(`a`,{href:e,download:`qgrid-image-${t+1}.${e.startsWith(`data:image/jpeg;`)?`jpg`:e.startsWith(`data:image/webp;`)?`webp`:`png`}`,className:`mt-1 inline-block text-[11px] text-sienna-500 hover:underline`,children:`이미지 다운로드`})]},t)),e.text?(0,H.jsx)(`div`,{className:`prose prose-sm prose-qgrid max-w-none text-[13px] leading-relaxed break-words`,children:(0,H.jsx)(ds,{remarkPlugins:[hu],children:e.text})}):e.status===`streaming`?(0,H.jsxs)(`span`,{className:`inline-flex gap-1 py-1.5 px-0.5`,"aria-label":`응답 대기 중`,children:[(0,H.jsx)(`span`,{className:`chat-typing-dot`}),(0,H.jsx)(`span`,{className:`chat-typing-dot [animation-delay:150ms]`}),(0,H.jsx)(`span`,{className:`chat-typing-dot [animation-delay:300ms]`})]}):null,e.status===`aborted`&&(0,H.jsx)(`p`,{className:`mt-1 text-[10px] text-sand-400`,children:`중단됨`}),e.status===`error`&&(0,H.jsx)(`p`,{className:`mt-1 text-[12px] text-danger-500 break-words`,children:e.error})]}),e.meta&&(0,H.jsxs)(C,{to:e.meta.requestLogId===void 0?`/logs`:`/requests/show`,search:e.meta.requestLogId===void 0?{project:Pu,page:1}:{id:e.meta.requestLogId},className:`mt-1 ml-1.5 inline-block text-[10px] tabular-nums text-sand-400 hover:text-sienna-500 transition-colors duration-150`,title:`request log 보기`,children:[e.meta.model,e.meta.fallback&&` (폴백)`,e.meta.tokenName?` · ${e.meta.tokenName}`:``,` · ${(e.meta.durationMs/1e3).toFixed(1)}s · ${Vu(e.meta.costUsd)}`]})]},t))})}),ne&&(0,H.jsxs)(`div`,{className:`px-4 py-1.5 border-t border-caution-400/30 bg-caution-400/10 text-[11px] text-caution-500 shrink-0`,children:[zu[N]??N,` 토큰이 등록되어 있지 않습니다.`,` `,(0,H.jsx)(C,{to:`/tokens`,className:`font-medium underline hover:text-caution-400`,children:`Tokens 페이지`}),`에서 추가해주세요.`]}),(0,H.jsxs)(`div`,{className:`px-3 py-2.5 border-t border-sand-100 shrink-0`,children:[S.length>0&&(0,H.jsx)(`div`,{className:`flex gap-1.5 pb-2`,children:S.map((e,t)=>(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>E(e),"aria-label":`첨부할 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,H.jsx)(`img`,{src:e,alt:``,className:`size-12 rounded-xl object-cover`})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>w(e=>e.filter((e,n)=>n!==t)),title:`첨부 제거`,className:`absolute -top-1.5 -right-1.5 size-4.5 grid place-items-center rounded-full bg-sand-800 text-white hover:bg-sand-700`,children:(0,H.jsx)(xu,{className:`size-2.5`})})]},t))}),(0,H.jsxs)(`div`,{className:`flex items-end gap-1.5`,children:[P&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{ref:M,type:`file`,accept:`image/*`,multiple:!0,hidden:!0,onChange:e=>{L(e.target.files),e.target.value=``}}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>M.current?.click(),disabled:b||S.length>=Hu,title:`이미지 첨부`,className:`size-9 shrink-0 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,H.jsx)(_u,{className:`size-4.5`})})]}),(0,H.jsx)(`textarea`,{ref:j,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ae())},placeholder:`메시지 입력...`,rows:1,className:`min-w-0 flex-1 resize-none [field-sizing:content] max-h-28 rounded-[20px] border border-sand-200/80 bg-sand-50/60 px-4 py-2 text-[13px] leading-relaxed text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 focus:bg-white transition-colors duration-150`}),b?(0,H.jsx)(`button`,{type:`button`,onClick:z,title:`응답 중단`,className:`size-9 shrink-0 grid place-items-center rounded-full border border-sand-200/80 text-sand-600 hover:bg-sand-100 active:scale-[0.96] transition-all duration-150`,children:(0,H.jsx)(bu,{className:`size-3.5`})}):(0,H.jsx)(`button`,{type:`button`,onClick:()=>void ae(),disabled:!o.trim(),title:`전송`,className:`size-9 shrink-0 grid place-items-center rounded-full bg-sienna-600 text-white hover:bg-sienna-700 disabled:opacity-40 active:scale-[0.96] transition-all duration-150`,children:(0,H.jsx)(gu,{className:`size-4.5`})})]})]})]}):(0,H.jsx)(`button`,{type:`button`,onClick:()=>t(!0),title:`채팅 열기`,className:`block size-15 rounded-[35%] overflow-hidden shadow-[0_6px_20px_rgba(44,36,24,0.25)] hover:scale-105 active:scale-[0.96] transition-transform duration-150`,children:(0,H.jsx)(`img`,{src:Su,alt:``,className:`size-full object-cover`})})]})}var Ku=`2.10.9`;function qu({className:e}){let t=v({select:e=>e.location.pathname});return(0,H.jsxs)(`aside`,{className:`hidden md:flex w-[200px] bg-sand-50 flex-col shrink-0 border-r border-sand-200/40 ${e??``}`,children:[(0,H.jsx)(`div`,{className:`h-11 flex items-center px-4 border-b border-sand-200/30`,children:(0,H.jsx)(`span`,{className:`text-[13px] font-semibold text-sand-800 tracking-tight`,children:`Qgrid`})}),(0,H.jsx)(`nav`,{className:`flex-1 px-2.5 py-3 space-y-4 overflow-y-auto`,children:Ee.map(e=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`px-2 pb-1.5`,children:(0,H.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.08em] text-sand-400 font-medium`,children:e.label})}),(0,H.jsx)(`div`,{className:`space-y-0.5`,children:e.items.map(e=>{let n=Oe(e.path,t);return(0,H.jsxs)(C,{to:e.path,className:`flex items-center gap-2 px-2 py-[6px] rounded-[7px] text-[13px] no-underline transition-all duration-150 ${n?`bg-sand-200/60 text-sand-900 font-medium`:`text-sand-500 hover:bg-sand-100 hover:text-sand-700`}`,style:n?{boxShadow:`0 0.5px 1px rgba(0,0,0,0.04), inset 0 0.5px 0 rgba(255,255,255,0.6)`}:void 0,children:[(0,H.jsx)(e.icon,{className:`size-[15px] shrink-0 ${n?`text-sienna-500`:`text-sand-400`}`}),(0,H.jsx)(`span`,{children:e.title})]},e.path)})})]},e.label))}),(0,H.jsx)(`div`,{className:`px-4 py-3 border-t border-sand-200/30`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`div`,{className:`size-1.5 rounded-full bg-sage-400`}),(0,H.jsxs)(`span`,{className:`text-[10px] text-sand-400`,children:[`v`,Ku]})]})})]})}var Ju={"/":`Dashboard`,"/tokens":`Tokens`,"/logs":`Request Logs`,"/monit":`Server Logs`};function Yu(e){return e.startsWith(`/requests/show`)?{parent:`Request Logs`,parentPath:`/logs`,current:`Detail`}:{current:Ju[e]??e}}function Xu(){let e=Yu(v({select:e=>e.location.pathname}));return(0,H.jsx)(`div`,{className:`toolbar-glass h-11 shrink-0 flex items-center px-5`,children:(0,H.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-[13px]`,children:[e.parent&&e.parentPath&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(C,{to:e.parentPath,className:`text-sand-400 hover:text-sand-600 transition-colors no-underline`,children:e.parent}),(0,H.jsx)(`span`,{className:`text-sand-300 select-none`,children:`/`})]}),(0,H.jsx)(`span`,{className:`font-medium text-sand-800`,children:e.current})]})})}var Zu=[`/login`,`/signup`];function Qu({children:e}){(0,V.useEffect)(()=>{let e=navigator.language.split(`-`)[0];le.includes(e)&&se(e)},[]);let t=v({select:e=>e.location.pathname}),n=!Zu.includes(t);return(0,H.jsxs)(`div`,{className:`flex h-screen w-full bg-sand-100 overflow-hidden font-sans`,children:[n&&(0,H.jsx)(qu,{}),(0,H.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden min-w-0`,children:[n&&(0,H.jsx)(Xu,{}),(0,H.jsx)(`main`,{className:`flex-1 overflow-y-auto main-scroll content-inset`,children:(0,H.jsx)(`div`,{className:`px-3 py-4 sm:px-6 sm:py-5 md:px-8`,children:(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(`div`,{className:`text-sand-400 text-center py-8 text-sm`,children:`로딩 중...`}),children:e})})}),n&&(0,H.jsx)(ke,{})]}),n&&(0,H.jsx)(Gu,{})]})}function $u(e,t){let n=V.createContext(t),r=e=>{let{children:t,...r}=e,i=V.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=V.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function ed(e,t=[]){let n=[];function r(t,r){let i=V.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=V.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=V.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>V.createContext(e));return function(n){let r=n?.[e]||t;return V.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,td(i,...t)]}function td(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return V.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function nd(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function rd(...e){return t=>{let n=!1,r=e.map(e=>{let r=nd(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():nd(e[t],null)}}}}function K(...e){return V.useCallback(rd(...e),e)}function id(e){let t=ad(e),n=V.forwardRef((e,n)=>{let{children:r,...i}=e,a=V.Children.toArray(r),o=a.find(cd);if(o){let e=o.props.children,r=a.map(t=>t===o?V.Children.count(e)>1?V.Children.only(null):V.isValidElement(e)?e.props.children:null:t);return(0,H.jsx)(t,{...i,ref:n,children:V.isValidElement(e)?V.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ad(e){let t=V.forwardRef((e,t)=>{let{children:n,...r}=e;if(V.isValidElement(n)){let e=ud(n),i=ld(r,n.props);return n.type!==V.Fragment&&(i.ref=t?rd(t,e):e),V.cloneElement(n,i)}return V.Children.count(n)>1?V.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var od=Symbol(`radix.slottable`);function sd(e){let t=({children:e})=>(0,H.jsx)(H.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=od,t}function cd(e){return V.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===od}function ld(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ud(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dd(e){let t=e+`CollectionProvider`,[n,r]=ed(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=V.useRef(null),a=V.useRef(new Map).current;return(0,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=id(s),l=V.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,H.jsx)(c,{ref:K(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=id(u),p=V.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=V.useRef(null),s=K(t,o),c=a(u,n);return V.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return V.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}typeof window<`u`&&window.document&&window.document.createElement;function q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var fd=globalThis?.document?V.useLayoutEffect:()=>{},pd=V.useInsertionEffect||fd;function md({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=hd({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=V.useRef(e!==void 0);V.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,V.useCallback(t=>{if(s){let n=gd(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function hd({defaultProp:e,onChange:t}){let[n,r]=V.useState(e),i=V.useRef(n),a=V.useRef(t);return pd(()=>{a.current=t},[t]),V.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function gd(e){return typeof e==`function`}var J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=id(`Primitive.${t}`),r=V.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _d(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}function vd(e,t){return V.useReducer((e,n)=>t[e][n]??e,e)}var yd=e=>{let{present:t,children:n}=e,r=bd(t),i=typeof n==`function`?n({present:r.isPresent}):V.Children.only(n),a=K(r.ref,Sd(i));return typeof n==`function`||r.isPresent?V.cloneElement(i,{ref:a}):null};yd.displayName=`Presence`;function bd(e){let[t,n]=V.useState(),r=V.useRef(null),i=V.useRef(e),a=V.useRef(`none`),[o,s]=vd(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return V.useEffect(()=>{let e=xd(r.current);a.current=o===`mounted`?e:`none`},[o]),fd(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=xd(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),fd(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=xd(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=xd(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:V.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function xd(e){return e?.animationName||`none`}function Sd(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cd=V.useId||(()=>void 0),wd=0;function Td(e){let[t,n]=V.useState(Cd());return fd(()=>{e||n(e=>e??String(wd++))},[e]),e||(t?`radix-${t}`:``)}var Ed=`Collapsible`,[Dd,Od]=ed(Ed),[kd,Ad]=Dd(Ed),jd=V.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=md({prop:r,defaultProp:i??!1,onChange:o,caller:Ed});return(0,H.jsx)(kd,{scope:n,disabled:a,contentId:Td(),open:c,onOpenToggle:V.useCallback(()=>l(e=>!e),[l]),children:(0,H.jsx)(J.div,{"data-state":Ld(c),"data-disabled":a?``:void 0,...s,ref:t})})});jd.displayName=Ed;var Md=`CollapsibleTrigger`,Nd=V.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Ad(Md,n);return(0,H.jsx)(J.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Ld(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:q(e.onClick,i.onOpenToggle)})});Nd.displayName=Md;var Pd=`CollapsibleContent`,Fd=V.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Ad(Pd,e.__scopeCollapsible);return(0,H.jsx)(yd,{present:n||i.open,children:({present:e})=>(0,H.jsx)(Id,{...r,ref:t,present:e})})});Fd.displayName=Pd;var Id=V.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Ad(Pd,n),[s,c]=V.useState(r),l=V.useRef(null),u=K(t,l),d=V.useRef(0),f=d.current,p=V.useRef(0),m=p.current,h=o.open||s,g=V.useRef(h),_=V.useRef(void 0);return V.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),fd(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,H.jsx)(J.div,{"data-state":Ld(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function Ld(e){return e?`open`:`closed`}var Rd=jd,zd=Nd,Bd=Fd,Vd=V.createContext(void 0);function Hd(e){let t=V.useContext(Vd);return e||t||`ltr`}var Ud=`Accordion`,Wd=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[Gd,Kd,qd]=dd(Ud),[Jd,Yd]=ed(Ud,[qd,Od]),Xd=Od(),Zd=V.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,H.jsx)(Gd.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,H.jsx)(rf,{...a,ref:t}):(0,H.jsx)(nf,{...i,ref:t})})});Zd.displayName=Ud;var[Qd,$d]=Jd(Ud),[ef,tf]=Jd(Ud,{collapsible:!1}),nf=V.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=md({prop:n,defaultProp:r??``,onChange:i,caller:Ud});return(0,H.jsx)(Qd,{scope:e.__scopeAccordion,value:V.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:V.useCallback(()=>a&&c(``),[a,c]),children:(0,H.jsx)(ef,{scope:e.__scopeAccordion,collapsible:a,children:(0,H.jsx)(sf,{...o,ref:t})})})}),rf=V.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=md({prop:n,defaultProp:r??[],onChange:i,caller:Ud}),c=V.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=V.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,H.jsx)(Qd,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,H.jsx)(ef,{scope:e.__scopeAccordion,collapsible:!0,children:(0,H.jsx)(sf,{...a,ref:t})})})}),[af,of]=Jd(Ud),sf=V.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=K(V.useRef(null),t),c=Kd(n),l=Hd(i)===`ltr`,u=q(e.onKeyDown,e=>{if(!Wd.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=()=>{o=r+1,o>s&&(o=0)},d=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,H.jsx)(af,{scope:n,disabled:r,direction:i,orientation:a,children:(0,H.jsx)(Gd.Slot,{scope:n,children:(0,H.jsx)(J.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),cf=`AccordionItem`,[lf,uf]=Jd(cf),df=V.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=of(cf,n),o=$d(cf,n),s=Xd(n),c=Td(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,H.jsx)(lf,{scope:n,open:l,disabled:u,triggerId:c,children:(0,H.jsx)(Rd,{"data-orientation":a.orientation,"data-state":vf(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});df.displayName=cf;var ff=`AccordionHeader`,pf=V.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=of(Ud,n),a=uf(ff,n);return(0,H.jsx)(J.h3,{"data-orientation":i.orientation,"data-state":vf(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});pf.displayName=ff;var mf=`AccordionTrigger`,hf=V.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=of(Ud,n),a=uf(mf,n),o=tf(mf,n),s=Xd(n);return(0,H.jsx)(Gd.ItemSlot,{scope:n,children:(0,H.jsx)(zd,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});hf.displayName=mf;var gf=`AccordionContent`,_f=V.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=of(Ud,n),a=uf(gf,n),o=Xd(n);return(0,H.jsx)(Bd,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});_f.displayName=gf;function vf(e){return e?`open`:`closed`}var yf=df,bf=pf,xf=hf,Sf=_f;function Cf(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Cf(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function wf(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Cf(e))&&(r&&(r+=` `),r+=t);return r}var Tf=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ef=(e,t)=>({classGroupId:e,validator:t}),Df=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Of=`-`,kf=[],Af=`arbitrary..`,jf=e=>{let t=Pf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Nf(e);let n=e.split(Of);return Mf(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Tf(i,t):t:i||kf}return n[e]||kf}}},Mf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Mf(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Of):e.slice(t).join(Of),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Nf=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Af+r:void 0})(),Pf=e=>{let{theme:t,classGroups:n}=e;return Ff(n,t)},Ff=(e,t)=>{let n=Df();for(let r in e){let i=e[r];If(i,n,r,t)}return n},If=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Lf(i,t,n,r)}},Lf=(e,t,n,r)=>{if(typeof e==`string`){Rf(e,t,n);return}if(typeof e==`function`){zf(e,t,n,r);return}Bf(e,t,n,r)},Rf=(e,t,n)=>{let r=e===``?t:Vf(t,e);r.classGroupId=n},zf=(e,t,n,r)=>{if(Hf(e)){If(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ef(n,e))},Bf=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];If(o,Vf(t,a),n,r)}},Vf=(e,t)=>{let n=e,r=t.split(Of),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Df(),n.nextPart.set(t,i)),n=i}return n},Hf=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Uf=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Wf=`!`,Gf=`:`,Kf=[],qf=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Jf=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Gf){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Wf)?(c=s.slice(0,-1),l=!0):s.startsWith(Wf)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return qf(t,l,c,u)};if(t){let e=t+Gf,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):qf(Kf,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Yf=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Xf=e=>({cache:Uf(e.cacheSize),parseClassName:Jf(e),sortModifiers:Yf(e),...jf(e)}),Zf=/\s+/,Qf=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Zf),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Wf:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},$f=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ep(n))&&(i&&(i+=` `),i+=r);return i},ep=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ep(e[r]))&&(n&&(n+=` `),n+=t);return n},tp=(e,...t)=>{let n,r,i,a,o=o=>(n=Xf(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Qf(e,n);return i(e,a),a};return a=o,(...e)=>a($f(...e))},np=[],rp=e=>{let t=t=>t[e]||np;return t.isThemeGetter=!0,t},ip=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ap=/^\((?:(\w[\w-]*):)?(.+)\)$/i,op=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,sp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,up=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fp=e=>op.test(e),Y=e=>!!e&&!Number.isNaN(Number(e)),pp=e=>!!e&&Number.isInteger(Number(e)),mp=e=>e.endsWith(`%`)&&Y(e.slice(0,-1)),hp=e=>sp.test(e),gp=()=>!0,_p=e=>cp.test(e)&&!lp.test(e),vp=()=>!1,yp=e=>up.test(e),bp=e=>dp.test(e),xp=e=>!X(e)&&!Z(e),Sp=e=>Lp(e,Vp,vp),X=e=>ip.test(e),Cp=e=>Lp(e,Hp,_p),wp=e=>Lp(e,Up,Y),Tp=e=>Lp(e,Gp,gp),Ep=e=>Lp(e,Wp,vp),Dp=e=>Lp(e,zp,vp),Op=e=>Lp(e,Bp,bp),kp=e=>Lp(e,Kp,yp),Z=e=>ap.test(e),Ap=e=>Rp(e,Hp),jp=e=>Rp(e,Wp),Mp=e=>Rp(e,zp),Np=e=>Rp(e,Vp),Pp=e=>Rp(e,Bp),Fp=e=>Rp(e,Kp,!0),Ip=e=>Rp(e,Gp,!0),Lp=(e,t,n)=>{let r=ip.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Rp=(e,t,n=!1)=>{let r=ap.exec(e);return r?r[1]?t(r[1]):n:!1},zp=e=>e===`position`||e===`percentage`,Bp=e=>e===`image`||e===`url`,Vp=e=>e===`length`||e===`size`||e===`bg-size`,Hp=e=>e===`length`,Up=e=>e===`number`,Wp=e=>e===`family-name`,Gp=e=>e===`number`||e===`weight`,Kp=e=>e===`shadow`,qp=tp(()=>{let e=rp(`color`),t=rp(`font`),n=rp(`text`),r=rp(`font-weight`),i=rp(`tracking`),a=rp(`leading`),o=rp(`breakpoint`),s=rp(`container`),c=rp(`spacing`),l=rp(`radius`),u=rp(`shadow`),d=rp(`inset-shadow`),f=rp(`text-shadow`),p=rp(`drop-shadow`),m=rp(`blur`),h=rp(`perspective`),g=rp(`aspect`),_=rp(`ease`),v=rp(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Z,X],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Z,X,c],T=()=>[fp,`full`,`auto`,...w()],E=()=>[pp,`none`,`subgrid`,Z,X],D=()=>[`auto`,{span:[`full`,pp,Z,X]},pp,Z,X],O=()=>[pp,`auto`,Z,X],k=()=>[`auto`,`min`,`max`,`fr`,Z,X],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[fp,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[fp,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[fp,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,Z,X],I=()=>[...b(),Mp,Dp,{position:[Z,X]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Np,Sp,{size:[Z,X]}],L=()=>[mp,Ap,Cp],R=()=>[``,`none`,`full`,l,Z,X],re=()=>[``,Y,Ap,Cp],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[Y,mp,Mp,Dp],oe=()=>[``,`none`,m,Z,X],se=()=>[`none`,Y,Z,X],B=()=>[`none`,Y,Z,X],ce=()=>[Y,Z,X],le=()=>[fp,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[hp],breakpoint:[hp],color:[gp],container:[hp],"drop-shadow":[hp],ease:[`in`,`out`,`in-out`],font:[xp],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[hp],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[hp],shadow:[hp],spacing:[`px`,Y],text:[hp],"text-shadow":[hp],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,fp,X,Z,g]}],container:[`container`],columns:[{columns:[Y,X,Z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[pp,`auto`,Z,X]}],basis:[{basis:[fp,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Y,fp,`auto`,`initial`,`none`,X]}],grow:[{grow:[``,Y,Z,X]}],shrink:[{shrink:[``,Y,Z,X]}],order:[{order:[pp,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Ap,Cp]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ip,Tp]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,mp,X]}],"font-family":[{font:[jp,Ep,t]}],"font-features":[{"font-features":[X]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Z,X]}],"line-clamp":[{"line-clamp":[Y,`none`,Z,wp]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[Y,`from-font`,`auto`,Z,Cp]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Y,`auto`,Z,X]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},pp,Z,X],radial:[``,Z,X],conic:[pp,Z,X]},Pp,Op]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":re()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Y,Z,X]}],"outline-w":[{outline:[``,Y,Ap,Cp]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,Fp,kp]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Fp,kp]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:re()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Y,Cp]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Fp,kp]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Y,Z,X]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Y]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Y]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:oe()}],brightness:[{brightness:[Y,Z,X]}],contrast:[{contrast:[Y,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Fp,kp]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Y,Z,X]}],"hue-rotate":[{"hue-rotate":[Y,Z,X]}],invert:[{invert:[``,Y,Z,X]}],saturate:[{saturate:[Y,Z,X]}],sepia:[{sepia:[``,Y,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Y,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[Y,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Y,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,Y,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[Y,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[Y,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,Y,Z,X]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Y,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[Y,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Z,X]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Z,X]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[Y,Ap,Cp,wp]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Jp=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Yp=wf,Xp=(e,t)=>n=>{if(t?.variants==null)return Yp(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Jp(t)||Jp(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Yp(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function Zp(e){let t=V.useRef(e);return V.useEffect(()=>{t.current=e}),V.useMemo(()=>(...e)=>t.current?.(...e),[])}function Qp(e,t=globalThis?.document){let n=Zp(e);V.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var $p=`DismissableLayer`,em=`dismissableLayer.update`,tm=`dismissableLayer.pointerDownOutside`,nm=`dismissableLayer.focusOutside`,rm,im=V.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),am=V.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=V.useContext(im),[u,d]=V.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=V.useState({}),m=K(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=cm(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=lm(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Qp(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),V.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(rm=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),um(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=rm)}},[u,f,n,l]),V.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),um())},[u,l]),V.useEffect(()=>{let e=()=>p({});return document.addEventListener(em,e),()=>document.removeEventListener(em,e)},[]),(0,H.jsx)(J.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:q(e.onFocusCapture,S.onFocusCapture),onBlurCapture:q(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,x.onPointerDownCapture)})});am.displayName=$p;var om=`DismissableLayerBranch`,sm=V.forwardRef((e,t)=>{let n=V.useContext(im),r=V.useRef(null),i=K(t,r);return V.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,H.jsx)(J.div,{...e,ref:i})});sm.displayName=om;function cm(e,t=globalThis?.document){let n=Zp(e),r=V.useRef(!1),i=V.useRef(()=>{});return V.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){dm(tm,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function lm(e,t=globalThis?.document){let n=Zp(e),r=V.useRef(!1);return V.useEffect(()=>{let e=e=>{e.target&&!r.current&&dm(nm,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function um(){let e=new CustomEvent(em);document.dispatchEvent(e)}function dm(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_d(i,a):i.dispatchEvent(a)}var fm=am,pm=sm,mm=`focusScope.autoFocusOnMount`,hm=`focusScope.autoFocusOnUnmount`,gm={bubbles:!1,cancelable:!0},_m=`FocusScope`,vm=V.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=V.useState(null),l=Zp(i),u=Zp(a),d=V.useRef(null),f=K(t,e=>c(e)),p=V.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Tm(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Tm(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Tm(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),V.useEffect(()=>{if(s){Em.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(mm,gm);s.addEventListener(mm,l),s.dispatchEvent(t),t.defaultPrevented||(ym(km(xm(s)),{select:!0}),document.activeElement===e&&Tm(s))}return()=>{s.removeEventListener(mm,l),setTimeout(()=>{let t=new CustomEvent(hm,gm);s.addEventListener(hm,u),s.dispatchEvent(t),t.defaultPrevented||Tm(e??document.body,{select:!0}),s.removeEventListener(hm,u),Em.remove(p)},0)}}},[s,l,u,p]);let m=V.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=bm(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Tm(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Tm(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});vm.displayName=_m;function ym(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Tm(r,{select:t}),document.activeElement!==n)return}function bm(e){let t=xm(e);return[Sm(t,e),Sm(t.reverse(),e)]}function xm(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sm(e,t){for(let n of e)if(!Cm(n,{upTo:t}))return n}function Cm(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function wm(e){return e instanceof HTMLInputElement&&`select`in e}function Tm(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wm(e)&&t&&e.select()}}var Em=Dm();function Dm(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Om(e,t),e.unshift(t)},remove(t){e=Om(e,t),e[0]?.resume()}}}function Om(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function km(e){return e.filter(e=>e.tagName!==`A`)}var Am=`Portal`,jm=V.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=V.useState(!1);fd(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Au.createPortal((0,H.jsx)(J.div,{...r,ref:t}),o):null});jm.displayName=Am;var Mm=0;function Nm(){V.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Pm()),document.body.insertAdjacentElement(`beforeend`,e[1]??Pm()),Mm++,()=>{Mm===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Mm--}},[])}function Pm(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Fm=function(){return Fm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Fm.apply(this,arguments)};function Im(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Lm(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Rm=`right-scroll-bar-position`,zm=`width-before-scroll-bar`,Bm=`with-scroll-bars-hidden`,Vm=`--removed-body-scroll-bar-size`;function Hm(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Um(e,t){var n=(0,V.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Wm=typeof window<`u`?V.useLayoutEffect:V.useEffect,Gm=new WeakMap;function Km(e,t){var n=Um(t||null,function(t){return e.forEach(function(e){return Hm(e,t)})});return Wm(function(){var t=Gm.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Hm(e,null)}),i.forEach(function(e){r.has(e)||Hm(e,a)})}Gm.set(n,e)},[e]),n}function qm(e){return e}function Jm(e,t){t===void 0&&(t=qm);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ym(e){e===void 0&&(e={});var t=Jm(null);return t.options=Fm({async:!0,ssr:!1},e),t}var Xm=function(e){var t=e.sideCar,n=Im(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return V.createElement(r,Fm({},n))};Xm.isSideCarExport=!0;function Zm(e,t){return e.useMedium(t),Xm}var Qm=Ym(),$m=function(){},eh=V.forwardRef(function(e,t){var n=V.useRef(null),r=V.useState({onScrollCapture:$m,onWheelCapture:$m,onTouchMoveCapture:$m}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Im(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Km([n,t]),C=Fm(Fm({},b),i);return V.createElement(V.Fragment,null,u&&V.createElement(x,{sideCar:Qm,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?V.cloneElement(V.Children.only(s),Fm(Fm({},C),{ref:S})):V.createElement(v,Fm({},C,{className:c,ref:S}),s))});eh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eh.classNames={fullWidth:zm,zeroRight:Rm};var th,nh=function(){if(th)return th;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rh(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=nh();return t&&e.setAttribute(`nonce`,t),e}function ih(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ah(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var oh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rh())&&(ih(t,n),ah(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sh=function(){var e=oh();return function(t,n){V.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ch=function(){var e=sh();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},lh={left:0,top:0,right:0,gap:0},uh=function(e){return parseInt(e||``,10)||0},dh=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[uh(n),uh(r),uh(i)]},fh=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return lh;var t=dh(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ph=ch(),mh=`data-scroll-locked`,hh=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
31
|
-
.${Bm} {
|
|
32
|
-
overflow: hidden ${r};
|
|
33
|
-
padding-right: ${s}px ${r};
|
|
34
|
-
}
|
|
35
|
-
body[${mh}] {
|
|
36
|
-
overflow: hidden ${r};
|
|
37
|
-
overscroll-behavior: contain;
|
|
38
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
39
|
-
padding-left: ${i}px;
|
|
40
|
-
padding-top: ${a}px;
|
|
41
|
-
padding-right: ${o}px;
|
|
42
|
-
margin-left:0;
|
|
43
|
-
margin-top:0;
|
|
44
|
-
margin-right: ${s}px ${r};
|
|
45
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.${Rm} {
|
|
49
|
-
right: ${s}px ${r};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.${zm} {
|
|
53
|
-
margin-right: ${s}px ${r};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.${Rm} .${Rm} {
|
|
57
|
-
right: 0 ${r};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.${zm} .${zm} {
|
|
61
|
-
margin-right: 0 ${r};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
body[${mh}] {
|
|
65
|
-
${Vm}: ${s}px;
|
|
66
|
-
}
|
|
67
|
-
`},gh=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},_h=function(){V.useEffect(function(){return document.body.setAttribute(mh,(gh()+1).toString()),function(){var e=gh()-1;e<=0?document.body.removeAttribute(mh):document.body.setAttribute(mh,e.toString())}},[])},vh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;_h();var a=V.useMemo(function(){return fh(i)},[i]);return V.createElement(ph,{styles:hh(a,!t,i,n?``:`!important`)})},yh=!1;if(typeof window<`u`)try{var bh=Object.defineProperty({},`passive`,{get:function(){return yh=!0,!0}});window.addEventListener(`test`,bh,bh),window.removeEventListener(`test`,bh,bh)}catch{yh=!1}var xh=yh?{passive:!1}:!1,Sh=function(e){return e.tagName===`TEXTAREA`},Ch=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Sh(e)&&n[t]===`visible`)},wh=function(e){return Ch(e,`overflowY`)},Th=function(e){return Ch(e,`overflowX`)},Eh=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),kh(e,r)){var i=Ah(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dh=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Oh=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},kh=function(e,t){return e===`v`?wh(t):Th(t)},Ah=function(e,t){return e===`v`?Dh(t):Oh(t)},jh=function(e,t){return e===`h`&&t===`rtl`?-1:1},Mh=function(e,t,n,r,i){var a=jh(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Ah(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&kh(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Nh=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ph=function(e){return[e.deltaX,e.deltaY]},Fh=function(e){return e&&`current`in e?e.current:e},Ih=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Lh=function(e){return`
|
|
68
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
69
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
70
|
-
`},Rh=0,zh=[];function Bh(e){var t=V.useRef([]),n=V.useRef([0,0]),r=V.useRef(),i=V.useState(Rh++)[0],a=V.useState(ch)[0],o=V.useRef(e);V.useEffect(function(){o.current=e},[e]),V.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Lm([e.lockRef.current],(e.shards||[]).map(Fh),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=V.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Nh(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Eh(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Eh(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Mh(h,t,e,h===`h`?s:c,!0)},[]),c=V.useCallback(function(e){var n=e;if(!(!zh.length||zh[zh.length-1]!==a)){var r=`deltaY`in n?Ph(n):Nh(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ih(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Fh).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=V.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Vh(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=V.useCallback(function(e){n.current=Nh(e),r.current=void 0},[]),d=V.useCallback(function(t){l(t.type,Ph(t),t.target,s(t,e.lockRef.current))},[]),f=V.useCallback(function(t){l(t.type,Nh(t),t.target,s(t,e.lockRef.current))},[]);V.useEffect(function(){return zh.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,xh),document.addEventListener(`touchmove`,c,xh),document.addEventListener(`touchstart`,u,xh),function(){zh=zh.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,xh),document.removeEventListener(`touchmove`,c,xh),document.removeEventListener(`touchstart`,u,xh)}},[]);var p=e.removeScrollBar,m=e.inert;return V.createElement(V.Fragment,null,m?V.createElement(a,{styles:Lh(i)}):null,p?V.createElement(vh,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Vh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Hh=Zm(Qm,Bh),Uh=V.forwardRef(function(e,t){return V.createElement(eh,Fm({},e,{ref:t,sideCar:Hh}))});Uh.classNames=eh.classNames;var Wh=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Gh=new WeakMap,Kh=new WeakMap,qh={},Jh=0,Yh=function(e){return e&&(e.host||Yh(e.parentNode))},Xh=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Yh(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Zh=function(e,t,n,r){var i=Xh(t,Array.isArray(e)?e:[e]);qh[n]||(qh[n]=new WeakMap);var a=qh[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Gh.get(e)||0)+1,l=(a.get(e)||0)+1;Gh.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Kh.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Jh++,function(){o.forEach(function(e){var t=Gh.get(e)-1,i=a.get(e)-1;Gh.set(e,t),a.set(e,i),t||(Kh.has(e)||e.removeAttribute(r),Kh.delete(e)),i||e.removeAttribute(n)}),Jh--,Jh||(Gh=new WeakMap,Gh=new WeakMap,Kh=new WeakMap,qh={})}},Qh=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Wh(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Zh(r,i,n,`aria-hidden`)):function(){return null}},$h=`Dialog`,[eg,tg]=ed($h),[ng,rg]=eg($h),ig=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=V.useRef(null),c=V.useRef(null),[l,u]=md({prop:r,defaultProp:i??!1,onChange:a,caller:$h});return(0,H.jsx)(ng,{scope:t,triggerRef:s,contentRef:c,contentId:Td(),titleId:Td(),descriptionId:Td(),open:l,onOpenChange:u,onOpenToggle:V.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};ig.displayName=$h;var ag=`DialogTrigger`,og=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=rg(ag,n),a=K(t,i.triggerRef);return(0,H.jsx)(J.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Eg(i.open),...r,ref:a,onClick:q(e.onClick,i.onOpenToggle)})});og.displayName=ag;var sg=`DialogPortal`,[cg,lg]=eg(sg,{forceMount:void 0}),ug=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=rg(sg,t);return(0,H.jsx)(cg,{scope:t,forceMount:n,children:V.Children.map(r,e=>(0,H.jsx)(yd,{present:n||a.open,children:(0,H.jsx)(jm,{asChild:!0,container:i,children:e})}))})};ug.displayName=sg;var dg=`DialogOverlay`,fg=V.forwardRef((e,t)=>{let n=lg(dg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=rg(dg,e.__scopeDialog);return a.modal?(0,H.jsx)(yd,{present:r||a.open,children:(0,H.jsx)(mg,{...i,ref:t})}):null});fg.displayName=dg;var pg=id(`DialogOverlay.RemoveScroll`),mg=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=rg(dg,n);return(0,H.jsx)(Uh,{as:pg,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(J.div,{"data-state":Eg(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),hg=`DialogContent`,gg=V.forwardRef((e,t)=>{let n=lg(hg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=rg(hg,e.__scopeDialog);return(0,H.jsx)(yd,{present:r||a.open,children:a.modal?(0,H.jsx)(_g,{...i,ref:t}):(0,H.jsx)(vg,{...i,ref:t})})});gg.displayName=hg;var _g=V.forwardRef((e,t)=>{let n=rg(hg,e.__scopeDialog),r=V.useRef(null),i=K(t,n.contentRef,r);return V.useEffect(()=>{let e=r.current;if(e)return Qh(e)},[]),(0,H.jsx)(yg,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:q(e.onFocusOutside,e=>e.preventDefault())})}),vg=V.forwardRef((e,t)=>{let n=rg(hg,e.__scopeDialog),r=V.useRef(!1),i=V.useRef(!1);return(0,H.jsx)(yg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),yg=V.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=rg(hg,n),c=V.useRef(null),l=K(t,c);return Nm(),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(vm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(am,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Eg(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Ag,{titleId:s.titleId}),(0,H.jsx)(Mg,{contentRef:c,descriptionId:s.descriptionId})]})]})}),bg=`DialogTitle`,xg=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=rg(bg,n);return(0,H.jsx)(J.h2,{id:i.titleId,...r,ref:t})});xg.displayName=bg;var Sg=`DialogDescription`,Cg=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=rg(Sg,n);return(0,H.jsx)(J.p,{id:i.descriptionId,...r,ref:t})});Cg.displayName=Sg;var wg=`DialogClose`,Tg=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=rg(wg,n);return(0,H.jsx)(J.button,{type:`button`,...r,ref:t,onClick:q(e.onClick,()=>i.onOpenChange(!1))})});Tg.displayName=wg;function Eg(e){return e?`open`:`closed`}var Dg=`DialogTitleWarning`,[Og,kg]=$u(Dg,{contentName:hg,titleName:bg,docsSlug:`dialog`}),Ag=({titleId:e})=>{let t=kg(Dg),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
71
|
-
|
|
72
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
73
|
-
|
|
74
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return V.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},jg=`DialogDescriptionWarning`,Mg=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${kg(jg).contentName}}.`;return V.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Ng=ig,Pg=og,Fg=ug,Ig=fg,Lg=gg,Rg=xg,zg=Cg,Bg=Tg,Vg=`AlertDialog`,[Hg,Ug]=ed(Vg,[tg]),Wg=tg(),Gg=e=>{let{__scopeAlertDialog:t,...n}=e,r=Wg(t);return(0,H.jsx)(Ng,{...r,...n,modal:!0})};Gg.displayName=Vg;var Kg=`AlertDialogTrigger`,qg=V.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Wg(n);return(0,H.jsx)(Pg,{...i,...r,ref:t})});qg.displayName=Kg;var Jg=`AlertDialogPortal`,Yg=e=>{let{__scopeAlertDialog:t,...n}=e,r=Wg(t);return(0,H.jsx)(Fg,{...r,...n})};Yg.displayName=Jg;var Xg=`AlertDialogOverlay`,Zg=V.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Wg(n);return(0,H.jsx)(Ig,{...i,...r,ref:t})});Zg.displayName=Xg;var Qg=`AlertDialogContent`,[$g,e_]=Hg(Qg),t_=sd(`AlertDialogContent`),n_=V.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=Wg(n),o=V.useRef(null),s=K(t,o),c=V.useRef(null);return(0,H.jsx)(Og,{contentName:Qg,titleName:r_,docsSlug:`alert-dialog`,children:(0,H.jsx)($g,{scope:n,cancelRef:c,children:(0,H.jsxs)(Lg,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:q(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,H.jsx)(t_,{children:r}),(0,H.jsx)(d_,{contentRef:o})]})})})});n_.displayName=Qg;var r_=`AlertDialogTitle`,i_=V.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Wg(n);return(0,H.jsx)(Rg,{...i,...r,ref:t})});i_.displayName=r_;var a_=`AlertDialogDescription`,o_=V.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Wg(n);return(0,H.jsx)(zg,{...i,...r,ref:t})});o_.displayName=a_;var s_=`AlertDialogAction`,c_=V.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Wg(n);return(0,H.jsx)(Bg,{...i,...r,ref:t})});c_.displayName=s_;var l_=`AlertDialogCancel`,u_=V.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=e_(l_,n),a=Wg(n),o=K(t,i);return(0,H.jsx)(Bg,{...a,...r,ref:o})});u_.displayName=l_;var d_=({contentRef:e})=>{let t=`\`${Qg}\` requires a description for the component to be accessible for screen reader users.
|
|
75
|
-
|
|
76
|
-
You can add a description to the \`${Qg}\` by passing a \`${a_}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
77
|
-
|
|
78
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Qg}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
79
|
-
|
|
80
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return V.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},f_=Yg,p_=Zg,m_=n_,h_=c_,g_=u_,__=i_,v_=o_,y_=Symbol.for(`react.lazy`),b_=V.use;function x_(e){return typeof e==`object`&&!!e&&`then`in e}function S_(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===y_&&`_payload`in e&&x_(e._payload)}function C_(e){let t=T_(e),n=V.forwardRef((e,n)=>{let{children:r,...i}=e;S_(r)&&typeof b_==`function`&&(r=b_(r._payload));let a=V.Children.toArray(r),o=a.find(D_);if(o){let e=o.props.children,r=a.map(t=>t===o?V.Children.count(e)>1?V.Children.only(null):V.isValidElement(e)?e.props.children:null:t);return(0,H.jsx)(t,{...i,ref:n,children:V.isValidElement(e)?V.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var w_=C_(`Slot`);function T_(e){let t=V.forwardRef((e,t)=>{let{children:n,...r}=e;if(S_(n)&&typeof b_==`function`&&(n=b_(n._payload)),V.isValidElement(n)){let e=k_(n),i=O_(r,n.props);return n.type!==V.Fragment&&(i.ref=t?rd(t,e):e),V.cloneElement(n,i)}return V.Children.count(n)>1?V.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var E_=Symbol(`radix.slottable`);function D_(e){return V.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===E_}function O_(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function k_(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var A_=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=C_(`Primitive.${t}`),r=V.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),j_=`AspectRatio`,M_=V.forwardRef((e,t)=>{let{ratio:n=1/1,style:r,...i}=e;return(0,H.jsx)(`div`,{style:{position:`relative`,width:`100%`,paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":``,children:(0,H.jsx)(A_.div,{...i,ref:t,style:{...r,position:`absolute`,top:0,right:0,bottom:0,left:0}})})});M_.displayName=j_;function N_(e,t=[]){let n=[];function r(t,r){let i=V.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=V.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=V.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>V.createContext(e));return function(n){let r=n?.[e]||t;return V.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,P_(i,...t)]}function P_(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return V.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var F_=y();function I_(){return(0,F_.useSyncExternalStore)(L_,()=>!0,()=>!1)}function L_(){return()=>{}}var R_=`Avatar`,[z_,B_]=N_(R_),[V_,H_]=z_(R_),U_=V.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=V.useState(`idle`);return(0,H.jsx)(V_,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:(0,H.jsx)(A_.span,{...r,ref:t})})});U_.displayName=R_;var W_=`AvatarImage`,G_=V.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=H_(W_,n),s=Y_(r,a),c=Zp(e=>{i(e),o.onImageLoadingStatusChange(e)});return fd(()=>{s!==`idle`&&c(s)},[s,c]),s===`loaded`?(0,H.jsx)(A_.img,{...a,ref:t,src:r}):null});G_.displayName=W_;var K_=`AvatarFallback`,q_=V.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=H_(K_,n),[o,s]=V.useState(r===void 0);return V.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,H.jsx)(A_.span,{...i,ref:t}):null});q_.displayName=K_;function J_(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function Y_(e,{referrerPolicy:t,crossOrigin:n}){let r=I_(),i=V.useRef(null),a=r?(i.current||=new window.Image,i.current):null,[o,s]=V.useState(()=>J_(a,e));return fd(()=>{s(J_(a,e))},[a,e]),fd(()=>{let e=e=>()=>{s(e)};if(!a)return;let r=e(`loaded`),i=e(`error`);return a.addEventListener(`load`,r),a.addEventListener(`error`,i),t&&(a.referrerPolicy=t),typeof n==`string`&&(a.crossOrigin=n),()=>{a.removeEventListener(`load`,r),a.removeEventListener(`error`,i)}},[a,n,t]),o}var X_=U_,Z_=G_,Q_=q_,$_=function(){return $_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$_.apply(this,arguments)},ev=(0,V.createContext)(void 0);function tv(){var e=(0,V.useContext)(ev);if(!e)throw Error(`useDayPicker must be used within a DayPickerProvider.`);return e}(0,V.createContext)(void 0),(0,V.forwardRef)(function(e,t){var n=tv(),r=n.classNames,i=n.styles,a=[r.button_reset,r.button];e.className&&a.push(e.className);var o=a.join(` `),s=$_($_({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),(0,H.jsx)(`button`,$_({},e,{ref:t,type:`button`,className:o,style:s}))}),(0,V.createContext)(void 0),(0,V.createContext)(void 0);var nv;(function(e){e.Outside=`outside`,e.Disabled=`disabled`,e.Selected=`selected`,e.Hidden=`hidden`,e.Today=`today`,e.RangeStart=`range_start`,e.RangeEnd=`range_end`,e.RangeMiddle=`range_middle`})(nv||={}),nv.Selected,nv.Disabled,nv.Hidden,nv.Today,nv.RangeEnd,nv.RangeMiddle,nv.RangeStart,nv.Outside,(0,V.createContext)(void 0),(0,V.createContext)(void 0),(0,V.createContext)(void 0);function rv(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}rv()?V.useLayoutEffect:V.useEffect;function iv(e){return Object.prototype.toString.call(e)===`[object Object]`}function av(e){return iv(e)||Array.isArray(e)}function ov(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function sv(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!av(r)||!av(i)?r===i:sv(r,i)})}function cv(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function lv(e,t){if(e.length!==t.length)return!1;let n=cv(e),r=cv(t);return n.every((e,t)=>{let n=r[t];return sv(e,n)})}function uv(e){return typeof e==`number`}function dv(e){return typeof e==`string`}function fv(e){return typeof e==`boolean`}function pv(e){return Object.prototype.toString.call(e)===`[object Object]`}function mv(e){return Math.abs(e)}function hv(e){return Math.sign(e)}function gv(e,t){return mv(e-t)}function _v(e,t){return e===0||t===0||mv(e)<=mv(t)?0:mv(gv(mv(e),mv(t))/e)}function vv(e){return Math.round(e*100)/100}function yv(e){return wv(e).map(Number)}function bv(e){return e[xv(e)]}function xv(e){return Math.max(0,e.length-1)}function Sv(e,t){return t===xv(e)}function Cv(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function wv(e){return Object.keys(e)}function Tv(e,t){return[e,t].reduce((e,t)=>(wv(t).forEach(n=>{let r=e[n],i=t[n];e[n]=pv(r)&&pv(i)?Tv(r,i):i}),e),{})}function Ev(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function Dv(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return dv(e)?n[e](r):e(t,r,i)}return{measure:o}}function Ov(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function kv(e,t,n,r){let i=Ov(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function Av(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function jv(e=0,t=0){let n=mv(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function Mv(e,t,n){let{constrain:r}=jv(0,e),i=e+1,a=o(t);function o(e){return n?mv((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return Mv(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function Nv(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=Ov(),w=Ov(),T=jv(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,ee=!1;function F(e){if(!v)return;function n(t){(fv(v)||v(e,t))&&re(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,ae).add(r,`contextmenu`,ae).add(r,`click`,z,!0)}function I(){C.clear(),w.clear()}function te(){let e=ee?n:t;w.add(e,`touchmove`,ie,S).add(e,`touchend`,ae).add(e,`mousemove`,ie,S).add(e,`mouseup`,ae)}function ne(e){let t=e.nodeName||``;return x.includes(t)}function L(){return(m?D:E)[ee?`mouse`:`touch`]}function R(e,t){let n=d.add(hv(e)*-1),r=u.byDistance(e,!m).distance;return m||mv(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function re(e){let t=Ev(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=gv(i.get(),o.get())>=2,!(t&&e.button!==0)&&(ne(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),te(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function ie(e){if(!Ev(e,r)&&e.touches.length>=2)return ae(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=gv(t,A),c=gv(n,j);if(!N&&!ee&&(!e.cancelable||(N=o>c,!N)))return ae(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function ae(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*L(),r=R(b(n),t),i=_v(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),ee=!1,f.emit(`pointerUp`)}function z(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function oe(){return M}return{init:F,destroy:I,pointerDown:oe}}function Pv(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(Ev(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&mv(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function Fv(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function Iv(e){function t(t){return t/100*e}return{measure:t}}function Lv(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(mv(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(fv(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function Rv(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=hv(a),d=u,x}function p(){return mv(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function zv(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=jv(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=mv(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&mv(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function Bv(e,t,n,r,i){let a=jv(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return gv(e,t)<=1}function u(){let e=o[0],t=bv(o);return jv(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=Sv(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function Vv(e,t,n){let r=t[0];return{limit:jv(n?r-e:bv(t),r)}}function Hv(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=jv(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function Uv(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function Wv(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>bv(e)[o]-e[0][a]).map(mv)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-mv(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Gv(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=Sv(n,t);return r?Cv(bv(n[0])+1):i?Cv(xv(a)-bv(n)[0]+1,bv(n)[0]):e})}return{slideRegistry:l}}function Kv(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>mv(e)-mv(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>mv(e.diff)-mv(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>hv(e)===r);return a.length?c(a):bv(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function qv(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function Jv(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));uv(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(fv(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Yv(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return uv(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Xv(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=vv(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function Zv(e,t,n,r,i,a,o,s,c){let l=.5,u=yv(i),d=yv(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:Yv(-1),translate:Xv(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function Qv(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(fv(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function $v(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return wv(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function ey(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return mv(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(bv(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=Sv(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(mv)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function ty(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=uv(n);function p(e,t){return yv(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?yv(e).reduce((n,f,p)=>{let m=bv(n)||0,h=m===0,g=f===xv(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=mv(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function ny(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=Fv(),w=C.measure(t),T=n.map(C.measure),E=Av(c,l),D=E.measureSize(w),O=Iv(D),k=Dv(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=ey(E,w,T,n,d||!!v,i),ee=ty(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=Wv(E,k,w,T,ee),te=-bv(F)+bv(M),{snapsContained:ne,scrollContainLimit:L}=Bv(D,te,I,v,2),R=A?ne:I,{limit:re}=Vv(te,R,d),ie=Mv(xv(R),u,d),ae=ie.clone(),z=yv(n),oe=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},se=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},B=kv(r,i,()=>oe(Se),e=>se(Se,e)),ce=.68,le=R[ie.get()],ue=Yv(le),de=Yv(le),fe=Yv(le),pe=Yv(le),me=Rv(ue,fe,de,pe,f,ce),he=Kv(d,R,te,re,pe),ge=qv(B,ie,ae,me,he,pe,o),_e=Uv(re),ve=Ov(),ye=$v(t,n,o,h),{slideRegistry:be}=Gv(A,v,R,L,ee,z),xe=Jv(e,n,be,ge,me,ve,o,S),Se={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:B,axis:E,dragHandler:Nv(E,e,r,i,pe,Pv(E,i),ue,B,ge,me,he,ie,o,O,p,m,_,ce,x),eventStore:ve,percentOfView:O,index:ie,indexPrevious:ae,limit:re,location:ue,offsetLocation:fe,previousLocation:de,options:a,resizeHandler:Lv(t,o,i,n,E,y,C),scrollBody:me,scrollBounds:zv(re,fe,pe,me,O),scrollLooper:Hv(te,re,fe,[ue,fe,de,pe]),scrollProgress:_e,scrollSnapList:R.map(_e.get),scrollSnaps:R,scrollTarget:he,scrollTo:ge,slideLooper:Zv(E,D,te,j,M,F,R,fe,n),slideFocus:xe,slidesHandler:Qv(t,o,b),slidesInView:ye,slideIndexes:z,slideRegistry:be,slidesToScroll:ee,target:pe,translate:Xv(E,t)};return Se}function ry(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var iy={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function ay(e){function t(e,t){return Tv(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,wv(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>wv(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function oy(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function sy(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=ay(i),o=oy(a),s=Ov(),c=ry(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(iy,sy.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(dv(t)?e.querySelector(t):t)||e.children[0];let r=dv(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=ny(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(oe),_.eventHandler.init(oe),_.resizeHandler.init(oe),_.slidesHandler.init(oe),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(oe),x=o.init(oe,b)))}function D(e,t){let n=I();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==I()}function P(){return _.index.add(-1).get()!==I()}function ee(){return _.scrollSnapList}function F(){return _.scrollProgress.get(_.offsetLocation.get())}function I(){return _.index.get()}function te(){return _.indexPrevious.get()}function ne(){return _.slidesInView.get()}function L(){return _.slidesInView.get(!1)}function R(){return x}function re(){return _}function ie(){return e}function ae(){return S}function z(){return C}let oe={canScrollNext:N,canScrollPrev:P,containerNode:ae,internalEngine:re,destroy:k,off:p,on:f,emit:m,plugins:R,previousScrollSnap:te,reInit:h,rootNode:ie,scrollNext:j,scrollPrev:M,scrollProgress:F,scrollSnapList:ee,scrollTo:A,selectedScrollSnap:I,slideNodes:z,slidesInView:ne,slidesNotInView:L};return E(t,n),setTimeout(()=>c.emit(`init`),0),oe}sy.globalOptions=void 0;function cy(e={},t=[]){let n=(0,V.useRef)(e),r=(0,V.useRef)(t),[i,a]=(0,V.useState)(),[o,s]=(0,V.useState)(),c=(0,V.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,V.useEffect)(()=>{sv(n.current,e)||(n.current=e,c())},[e,c]),(0,V.useEffect)(()=>{lv(r.current,t)||(r.current=t,c())},[t,c]),(0,V.useEffect)(()=>{if(ov()&&o){sy.globalOptions=cy.globalOptions;let e=sy(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}cy.globalOptions=void 0;function ly(e){let t=V.useRef({value:e,previous:e});return V.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function uy(e){let[t,n]=V.useState(void 0);return fd(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var dy=`Checkbox`,[fy,py]=ed(dy),[my,hy]=fy(dy);function gy(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=md({prop:n,defaultProp:i??!1,onChange:c,caller:dy}),[m,h]=V.useState(null),[g,_]=V.useState(null),v=V.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:Ty(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(my,{scope:t,...b,children:wy(d)?d(b):r})}var _y=`CheckboxTrigger`,vy=V.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=hy(_y,e),h=K(i,u),g=V.useRef(c);return V.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,H.jsx)(J.button,{type:`button`,role:`checkbox`,"aria-checked":Ty(c)?`mixed`:c,"aria-required":l,"data-state":Ey(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:q(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:q(n,e=>{d(e=>Ty(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});vy.displayName=_y;var yy=V.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,H.jsx)(gy,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(vy,{...d,ref:t,__scopeCheckbox:n}),e&&(0,H.jsx)(Cy,{__scopeCheckbox:n})]})})});yy.displayName=dy;var by=`CheckboxIndicator`,xy=V.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=hy(by,n);return(0,H.jsx)(yd,{present:r||Ty(a.checked)||a.checked===!0,children:(0,H.jsx)(J.span,{"data-state":Ey(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});xy.displayName=by;var Sy=`CheckboxBubbleInput`,Cy=V.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=hy(Sy,e),m=K(n,p),h=ly(a),g=uy(r);V.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=Ty(a),n.call(e,Ty(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=V.useRef(Ty(a)?!1:a);return(0,H.jsx)(J.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});Cy.displayName=Sy;function wy(e){return typeof e==`function`}function Ty(e){return e===`indeterminate`}function Ey(e){return Ty(e)?`indeterminate`:e?`checked`:`unchecked`}var Dy=Object.create(null),Oy=e=>({}),ky=new Proxy(Dy,{get(e,t){return Oy()[t]??Dy[t]},has(e,t){return t in Oy()||t in Dy},set(e,t,n){let r=Oy(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=Oy(!0);return delete n[t],!0},ownKeys(){let e=Oy(!0);return Object.keys(e)}});function Ay(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return Ay(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return Ay(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return Ay(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return Ay(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return Ay(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return Ay(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return Ay(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var jy=1,My=4,Ny=8,Py=24,Fy={eterm:My,cons25:My,console:My,cygwin:My,dtterm:My,gnome:My,hurd:My,jfbterm:My,konsole:My,kterm:My,mlterm:My,mosh:Py,putty:My,st:My,"rxvt-unicode-24bit":Py,terminator:Py,"xterm-kitty":Py},Iy=new Map(Object.entries({APPVEYOR:Ny,BUILDKITE:Ny,CIRCLECI:Py,DRONE:Ny,GITEA_ACTIONS:Py,GITHUB_ACTIONS:Py,GITLAB_CI:Ny,TRAVIS:Ny})),Ly=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Ry(){if(Ay(`FORCE_COLOR`)!==void 0)switch(Ay(`FORCE_COLOR`)){case``:case`1`:case`true`:return My;case`2`:return Ny;case`3`:return Py;default:return jy}if(Ay(`NODE_DISABLE_COLORS`)!==void 0&&Ay(`NODE_DISABLE_COLORS`)!==``||Ay(`NO_COLOR`)!==void 0&&Ay(`NO_COLOR`)!==``||Ay(`TERM`)===`dumb`)return jy;if(Ay(`TMUX`))return Py;if(`TF_BUILD`in ky&&`AGENT_NAME`in ky)return My;if(`CI`in ky){for(let{0:e,1:t}of Iy)if(e in ky)return t;return Ay(`CI_NAME`)===`codeship`?Ny:jy}if(`TEAMCITY_VERSION`in ky)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Ay(`TEAMCITY_VERSION`))===null?jy:My;switch(Ay(`TERM_PROGRAM`)){case`iTerm.app`:return!Ay(`TERM_PROGRAM_VERSION`)||/^[0-2]\./.exec(Ay(`TERM_PROGRAM_VERSION`))!==null?Ny:Py;case`HyperTerm`:case`MacTerm`:return Py;case`Apple_Terminal`:return Ny}if(Ay(`COLORTERM`)===`truecolor`||Ay(`COLORTERM`)===`24bit`)return Py;if(Ay(`TERM`)){if(/truecolor/.exec(Ay(`TERM`))!==null)return Py;if(/^xterm-256/.exec(Ay(`TERM`))!==null)return Ny;let e=Ay(`TERM`).toLowerCase();if(Fy[e])return Fy[e];if(Ly.some(t=>t.exec(e)!==null))return My}return Ay(`COLORTERM`)?My:jy}var zy={reset:`\x1B[0m`,bright:`\x1B[1m`,dim:`\x1B[2m`,undim:`\x1B[22m`,underscore:`\x1B[4m`,blink:`\x1B[5m`,reverse:`\x1B[7m`,hidden:`\x1B[8m`,fg:{black:`\x1B[30m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,magenta:`\x1B[35m`,cyan:`\x1B[36m`,white:`\x1B[37m`},bg:{black:`\x1B[40m`,red:`\x1B[41m`,green:`\x1B[42m`,yellow:`\x1B[43m`,blue:`\x1B[44m`,magenta:`\x1B[45m`,cyan:`\x1B[46m`,white:`\x1B[47m`}},By=[`debug`,`info`,`success`,`warn`,`error`];function Vy(e,t){return By.indexOf(t)>=By.indexOf(e)}var Hy={info:zy.fg.blue,success:zy.fg.green,warn:zy.fg.yellow,error:zy.fg.red,debug:zy.fg.magenta},Uy=(e,t,n)=>{let r=new Date().toISOString();return n?`${zy.dim}${r}${zy.reset} ${Hy[e]}${e.toUpperCase()}${zy.reset} ${zy.bright}[Better Auth]:${zy.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`};(e=>{let t=e?.disabled!==!0,n=e?.level??`warn`,r=e?.disableColors===void 0?Ry()!==1:!e.disableColors,i=(i,a,o=[])=>{if(!t||!Vy(n,i))return;let s=Uy(i,a,r);if(!e||typeof e.log!=`function`){i===`error`?console.error(s,...o):i===`warn`?console.warn(s,...o):console.log(s,...o);return}e.log(i===`success`?`info`:i,a,...o)};return{...Object.fromEntries(By.map(e=>[e,(...[t,...n])=>i(e,t,n)])),get level(){return n}}})();function Wy(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Gy=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function Ky(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new Gy(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function qy(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new Gy(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Gy?t:new Gy(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Jy(e,t=`/api/auth`){if(qy(e),Ky(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function Yy(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function Xy(e,t,n,r,i){if(e)return Jy(e,t);if(r!==!1){let e=ky.BETTER_AUTH_URL||ky.NEXT_PUBLIC_BETTER_AUTH_URL||ky.PUBLIC_BETTER_AUTH_URL||ky.NUXT_PUBLIC_BETTER_AUTH_URL||ky.NUXT_PUBLIC_AUTH_URL||(ky.BASE_URL===`/`?void 0:ky.BASE_URL);if(e)return Jy(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&Yy(o,`proto`)&&Yy(a,`host`))try{return Jy(`${o}://${a}`,t)}catch{}if(n){let e=Zy(n.url);if(!e)throw new Gy(`Could not get origin from request. Please provide a valid base URL.`);return Jy(e,t)}if(typeof window<`u`&&window.location)return Jy(window.location.origin,t)}function Zy(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Qy={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},$y={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},eb=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,tb={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},nb=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function rb(e){return e instanceof Date&&!isNaN(e.getTime())}function ib(e){let t=nb.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return rb(f)?f:null}function ab(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in tb)return tb[s];if(!eb.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries($y).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=ib(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function ob(e,t={strict:!0}){return ab(e,t)}var sb=[],cb=0,lb=4,ub=0,db=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=cb+lb;t<sb.length;)sb[t]===e?sb.splice(t,lb):t+=lb;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){ub++;let i=!sb.length;for(let i of t)sb.push(i,n.value,e,r);if(i){for(cb=0;cb<sb.length;cb+=lb)sb[cb](sb[cb+1],sb[cb+2],sb[cb+3]);sb.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},fb=5,pb=6,mb=10,hb=(e,t,n,r)=>(e.events=e.events||{},e.events[n+mb]||(e.events[n+mb]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+mb](),delete e.events[n+mb])}),gb=1e3,_b=(e,t)=>hb(e,n=>{let r=t(n);r&&e.events[pb].push(r)},fb,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[pb]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[pb])t();e.events[pb]=[]}},gb)},()=>{e.listen=n,e.off=r}});function vb(e,t,n){let r=new Set(t).add(void 0);return e.listen((e,t,i)=>{r.has(i)&&n(e,t,i)})}var yb=()=>typeof window>`u`,bb=(e,t,n,r)=>{let i=db({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;n&&r<n||(i.set({error:e.error,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e))},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{yb()||(o?await a():_b(i,()=>{let e=setTimeout(async()=>{o||=(await a(),!0)},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},xb=Symbol.for(`better-auth:broadcast-channel`),Sb=()=>Math.floor(Date.now()/1e3),Cb=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Sb()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function wb(e=`better-auth.message`){return globalThis[xb]||(globalThis[xb]=new Cb(e)),globalThis[xb]}var Tb=Symbol.for(`better-auth:focus-manager`),Eb=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function Db(){return globalThis[Tb]||(globalThis[Tb]=new Eb),globalThis[Tb]}var Ob=Symbol.for(`better-auth:online-manager`),kb=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function Ab(){return globalThis[Ob]||(globalThis[Ob]=new kb),globalThis[Ob]}var jb=()=>Math.floor(Date.now()/1e3),Mb=5;function Nb(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||Ab().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=jb(),n.set(!n.get());return}let i=t.get();if(e?.event===`poll`){c.lastSessionRequest=jb(),r(`/get-session`).then(e=>{e.error?t.set({...i,data:null,error:e.error}):t.set({...i,data:e.data,error:null}),c.lastSync=jb(),n.set(!n.get())}).catch(()=>{});return}if(e?.event===`visibilitychange`){if(jb()-c.lastSessionRequest<Mb)return;c.lastSessionRequest=jb()}(i?.data===null||i?.data===void 0||e?.event===`visibilitychange`)&&(c.lastSync=jb(),n.set(!n.get()))},d=e=>{wb().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=wb().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=Db().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=Ab().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),wb().setup(),Db().setup(),Ab().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}function Pb(e,t){let n=db(!1),r=bb(n,`/get-session`,e,{method:`GET`});return _b(r,()=>{let i=Nb({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:r,$sessionSignal:n}}function Fb(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Ib(e,t,n=`.`,r){if(!Fb(t))return Ib(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Fb(a)&&Fb(i[t])?i[t]=Ib(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Lb(e){return(...t)=>t.reduce((t,n)=>Ib(t,n,``,e),{})}var Rb=Lb(),zb=Object.defineProperty,Bb=Object.defineProperties,Vb=Object.getOwnPropertyDescriptors,Hb=Object.getOwnPropertySymbols,Ub=Object.prototype.hasOwnProperty,Wb=Object.prototype.propertyIsEnumerable,Gb=(e,t,n)=>t in e?zb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kb=(e,t)=>{for(var n in t||={})Ub.call(t,n)&&Gb(e,n,t[n]);if(Hb)for(var n of Hb(t))Wb.call(t,n)&&Gb(e,n,t[n]);return e},qb=(e,t)=>Bb(e,Vb(t)),Jb=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},Yb=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},Xb=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Zb=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Qb(e){if(typeof e==`number`)return new Xb({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new Xb(e);case`exponential`:return new Zb(e);default:throw Error(`Invalid retry strategy`)}}var $b=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},ex=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function tx(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return ex.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function nx(e){try{return JSON.parse(e),!0}catch{return!1}}function rx(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function ix(e){try{return JSON.parse(e)}catch{return e}}function ax(e){return typeof e==`function`}function ox(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&ax(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&ax(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function sx(e){let t=new Headers(e?.headers),n=await $b(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=cx(e?.body);n&&t.set(`content-type`,n)}return t}function cx(e){return rx(e)?`application/json`:null}function lx(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(rx(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&rx(e.body)?new URLSearchParams(e.body).toString():e.body}function ux(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return mx.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function dx(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var fx=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function px(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new fx(n.issues);return n.value}var mx=[`get`,`post`,`put`,`patch`,`delete`],hx=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=qb(Kb({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=qb(Kb({},e),{body:i.input?await px(i.input,n?.body):n?.body,params:i.params?await px(i.params,n?.params):n?.params,query:i.query?await px(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),gx=e=>{async function t(t,n){let r=qb(Kb(Kb({},e),n),{plugins:[...e?.plugins||[],hx(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await vx(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await vx(t,r)}return t};function _x(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];mx.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var vx=async(e,t)=>{let{hooks:n,url:r,options:i}=await Yb(e,t),a=ox(i),o=new AbortController,s=i.signal??o.signal,c=_x(r,i),l=lx(i),u=await sx(i),d=ux(r,i),f=qb(Kb({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=dx(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(qb(Kb({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=tx(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??ix)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await px(f.output,r.data));for(let e of n.onSuccess)e&&await e(qb(Kb({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??ix,_=await m.text(),v=nx(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:qb(Kb({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(qb(Kb({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=Qb(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await vx(e,qb(Kb({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new Jb(m.status,m.statusText,v?y:_);return{data:null,error:qb(Kb({},y),{status:m.status,statusText:m.statusText})}},yx=(e,t)=>{let n=`credentials`in Request.prototype,r=Xy(e?.baseURL,e?.basePath,void 0,t)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=gx({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?ob(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Qy],...i]}),{$sessionSignal:f,session:p}=Pb(d,e),m=e?.plugins||[],h={},g={$sessionSignal:f,session:p},_={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},v=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/change-email`}}];for(let e of m)e.getAtoms&&Object.assign(g,e.getAtoms?.(d)),e.pathMethods&&Object.assign(_,e.pathMethods),e.atomListeners&&v.push(...e.atomListeners);let y={notify:e=>{g[e].set(!g[e].get())},listen:(e,t)=>{g[e].subscribe(t)},atoms:g};for(let t of m)t.getActions&&(h=Rb(t.getActions?.(d,y,e)??{},h));return{get baseURL(){return r},pluginsActions:h,pluginsAtoms:g,pluginPathMethods:_,atomListeners:v,$fetch:d,$store:y}};function bx(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function xx(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function Sx(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||bx(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=xx(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10)}}})}})}return a()}function Cx(e,t={}){let n=(0,V.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,V.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?vb(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,V.useSyncExternalStore)(a,o,o)}function wx(e){return`use${Wy(e)}`}function Tx(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,$store:a,atomListeners:o}=yx(e),s={};for(let[e,t]of Object.entries(r))s[wx(e)]=()=>Cx(t);return Sx({...n,...s,$fetch:i,$store:a},i,t,r,o)}var Ex=1,Dx=.9,Ox=.8,kx=.17,Ax=.1,jx=.999,Mx=.9999,Nx=.99,Px=/[\\\/_+.#"@\[\(\{&]/,Fx=/[\\\/_+.#"@\[\(\{&]/g,Ix=/[\s-]/,Lx=/[\s-]/g;function Rx(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Ex:Nx;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Rx(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Ex:Px.test(e.charAt(l-1))?(d*=Ox,p=e.slice(i,l-1).match(Fx),p&&i>0&&(d*=jx**+p.length)):Ix.test(e.charAt(l-1))?(d*=Dx,m=e.slice(i,l-1).match(Lx),m&&i>0&&(d*=jx**+m.length)):(d*=kx,i>0&&(d*=jx**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Mx)),(d<Ax&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Rx(e,t,n,r,l+1,a+2,o),f*Ax>d&&(d=f*Ax)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function zx(e){return e.toLowerCase().replace(Lx,` `)}function Bx(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Rx(e,t,zx(e),zx(t),0,0,{})}var Vx=`[cmdk-group=""]`,Hx=`[cmdk-group-items=""]`,Ux=`[cmdk-group-heading=""]`,Wx=`[cmdk-item=""]`,Gx=`${Wx}:not([aria-disabled="true"])`,Kx=`cmdk-item-select`,qx=`data-value`,Jx=(e,t,n)=>Bx(e,t,n),Yx=V.createContext(void 0),Xx=()=>V.useContext(Yx),Zx=V.createContext(void 0),Qx=()=>V.useContext(Zx),$x=V.createContext(void 0),eS=V.forwardRef((e,t)=>{let n=mS(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=mS(()=>new Set),i=mS(()=>new Map),a=mS(()=>new Map),o=mS(()=>new Set),s=fS(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=Td(),y=Td(),b=Td(),x=V.useRef(null),S=_S();pS(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),pS(()=>{S(6,k)},[]);let C=V.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=V.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??Jx;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Hx);t?t.appendChild(e.parentElement===t?e:e.closest(`${Hx} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Hx} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${Vx}[${qx}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(qx);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Vx)?.querySelector(Ux))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${Wx}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(Gx)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(qx))}function N(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(qx))}function P(e){let t=A()?.closest(Vx),n;for(;t&&!n;)t=e>0?uS(t,Vx):dS(t,Vx),n=t?.querySelector(Gx);n?C.setState(`value`,n.getAttribute(qx)):N(e)}let ee=()=>M(j().length-1),F=e=>{e.preventDefault(),e.metaKey?ee():e.altKey?P(1):N(1)},I=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?P(-1):N(-1)};return V.createElement(A_.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&F(e);break;case`ArrowDown`:F(e);break;case`p`:case`k`:g&&e.ctrlKey&&I(e);break;case`ArrowUp`:I(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),ee();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(Kx);t.dispatchEvent(e)}}}}},V.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:bS},c),yS(e,e=>V.createElement(Zx.Provider,{value:C},V.createElement(Yx.Provider,{value:w},e))))}),tS=V.forwardRef((e,t)=>{let n=Td(),r=V.useRef(null),i=V.useContext($x),a=Xx(),o=fS(e),s=o.current?.forceMount??i?.forceMount;pS(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=gS(n,r,[e.value,e.children,r],e.keywords),l=Qx(),u=hS(e=>e.value&&e.value===c.current),d=hS(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);V.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Kx,f),()=>t.removeEventListener(Kx,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return V.createElement(A_.div,{ref:rd(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),nS=V.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=Td(),s=V.useRef(null),c=V.useRef(null),l=Td(),u=Xx(),d=hS(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);pS(()=>u.group(o),[]),gS(o,s,[e.value,e.heading,c]);let f=V.useMemo(()=>({id:o,forceMount:i}),[i]);return V.createElement(A_.div,{ref:rd(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&V.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),yS(e,e=>V.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},V.createElement($x.Provider,{value:f},e))))}),rS=V.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=V.useRef(null),a=hS(e=>!e.search);return!n&&!a?null:V.createElement(A_.div,{ref:rd(i,t),...r,"cmdk-separator":``,role:`separator`})}),iS=V.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=Qx(),o=hS(e=>e.search),s=hS(e=>e.selectedItemId),c=Xx();return V.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),V.createElement(A_.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),aS=V.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=V.useRef(null),o=V.useRef(null),s=hS(e=>e.selectedItemId),c=Xx();return V.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),V.createElement(A_.div,{ref:rd(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},yS(e,e=>V.createElement(`div`,{ref:rd(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),oS=V.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return V.createElement(Ng,{open:n,onOpenChange:r},V.createElement(Fg,{container:o},V.createElement(Ig,{"cmdk-overlay":``,className:i}),V.createElement(Lg,{"aria-label":e.label,"cmdk-dialog":``,className:a},V.createElement(eS,{ref:t,...s}))))}),sS=V.forwardRef((e,t)=>hS(e=>e.filtered.count===0)?V.createElement(A_.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),cS=V.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return V.createElement(A_.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},yS(e,e=>V.createElement(`div`,{"aria-hidden":!0},e)))}),lS=Object.assign(eS,{List:aS,Item:tS,Input:iS,Group:nS,Separator:rS,Dialog:oS,Empty:sS,Loading:cS});function uS(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function dS(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function fS(e){let t=V.useRef(e);return pS(()=>{t.current=e}),t}var pS=typeof window>`u`?V.useEffect:V.useLayoutEffect;function mS(e){let t=V.useRef();return t.current===void 0&&(t.current=e()),t}function hS(e){let t=Qx(),n=()=>e(t.snapshot());return V.useSyncExternalStore(t.subscribe,n,n)}function gS(e,t,n,r=[]){let i=V.useRef(),a=Xx();return pS(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(qx,s),i.current=s}),i}var _S=()=>{let[e,t]=V.useState(),n=mS(()=>new Map);return pS(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function vS(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function yS({asChild:e,children:t},n){return e&&V.isValidElement(t)?V.cloneElement(vS(t),{ref:t.ref},n(t.props.children)):n(t)}var bS={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},xS=[`top`,`right`,`bottom`,`left`],SS=Math.min,CS=Math.max,wS=Math.round,TS=Math.floor,ES=e=>({x:e,y:e}),DS={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function OS(e,t,n){return CS(e,SS(t,n))}function kS(e,t){return typeof e==`function`?e(t):e}function AS(e){return e.split(`-`)[0]}function jS(e){return e.split(`-`)[1]}function MS(e){return e===`x`?`y`:`x`}function NS(e){return e===`y`?`height`:`width`}function PS(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function FS(e){return MS(PS(e))}function IS(e,t,n){n===void 0&&(n=!1);let r=jS(e),i=FS(e),a=NS(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=GS(o)),[o,GS(o)]}function LS(e){let t=GS(e);return[RS(e),t,RS(t)]}function RS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var zS=[`left`,`right`],BS=[`right`,`left`],VS=[`top`,`bottom`],HS=[`bottom`,`top`];function US(e,t,n){switch(e){case`top`:case`bottom`:return n?t?BS:zS:t?zS:BS;case`left`:case`right`:return t?VS:HS;default:return[]}}function WS(e,t,n,r){let i=jS(e),a=US(AS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(RS)))),a}function GS(e){let t=AS(e);return DS[t]+e.slice(t.length)}function KS(e){return{top:0,right:0,bottom:0,left:0,...e}}function qS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:KS(e)}function JS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function YS(e,t,n){let{reference:r,floating:i}=e,a=PS(t),o=FS(t),s=NS(o),c=AS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(jS(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function XS(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=kS(t,e),p=qS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=JS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=JS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ZS=50,QS=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:XS},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=YS(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ZS&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=YS(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},$S=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=kS(e,t)||{};if(l==null)return{};let d=qS(u),f={x:n,y:r},p=FS(i),m=NS(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=SS(d[_],T),D=SS(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=OS(O,A,k),M=!c.arrow&&jS(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),eC=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=kS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=AS(r),_=PS(o),v=AS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[GS(o)]:LS(o)),x=p!==`none`;!d&&x&&b.push(...WS(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=IS(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==PS(t))||T.every(e=>PS(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=PS(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function tC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nC(e){return xS.some(t=>e[t]>=0)}var rC=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=kS(e,t);switch(i){case`referenceHidden`:{let e=tC(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:nC(e)}}}case`escaped`:{let e=tC(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:nC(e)}}}default:return{}}}}},iC=new Set([`left`,`top`]);async function aC(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=AS(n),s=jS(n),c=PS(n)===`y`,l=iC.has(o)?-1:1,u=a&&c?-1:1,d=kS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var oC=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await aC(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},sC=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=kS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=PS(AS(i)),p=MS(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=OS(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=OS(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},cC=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=kS(e,t),u={x:n,y:r},d=PS(i),f=MS(d),p=u[f],m=u[d],h=kS(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=iC.has(AS(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},lC=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=kS(e,t),u=await o.detectOverflow(t,l),d=AS(i),f=jS(i),p=PS(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=SS(h-u[g],v),x=SS(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=CS(u.left,0),t=CS(u.right,0),n=CS(u.top,0),r=CS(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:CS(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:CS(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function uC(){return typeof window<`u`}function dC(e){return mC(e)?(e.nodeName||``).toLowerCase():`#document`}function fC(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pC(e){return((mC(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function mC(e){return uC()?e instanceof Node||e instanceof fC(e).Node:!1}function hC(e){return uC()?e instanceof Element||e instanceof fC(e).Element:!1}function gC(e){return uC()?e instanceof HTMLElement||e instanceof fC(e).HTMLElement:!1}function _C(e){return!uC()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof fC(e).ShadowRoot}function vC(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=kC(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function yC(e){return/^(table|td|th)$/.test(dC(e))}function bC(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xC=/transform|translate|scale|rotate|perspective|filter/,SC=/paint|layout|strict|content/,CC=e=>!!e&&e!==`none`,wC;function TC(e){let t=hC(e)?kC(e):e;return CC(t.transform)||CC(t.translate)||CC(t.scale)||CC(t.rotate)||CC(t.perspective)||!DC()&&(CC(t.backdropFilter)||CC(t.filter))||xC.test(t.willChange||``)||SC.test(t.contain||``)}function EC(e){let t=jC(e);for(;gC(t)&&!OC(t);){if(TC(t))return t;if(bC(t))return null;t=jC(t)}return null}function DC(){return wC??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),wC}function OC(e){return/^(html|body|#document)$/.test(dC(e))}function kC(e){return fC(e).getComputedStyle(e)}function AC(e){return hC(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jC(e){if(dC(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_C(e)&&e.host||pC(e);return _C(t)?t.host:t}function MC(e){let t=jC(e);return OC(t)?e.ownerDocument?e.ownerDocument.body:e.body:gC(t)&&vC(t)?t:MC(t)}function NC(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=MC(e),i=r===e.ownerDocument?.body,a=fC(r);if(i){let e=PC(a);return t.concat(a,a.visualViewport||[],vC(r)?r:[],e&&n?NC(e):[])}else return t.concat(r,NC(r,[],n))}function PC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FC(e){let t=kC(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=gC(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=wS(n)!==a||wS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function IC(e){return hC(e)?e:e.contextElement}function LC(e){let t=IC(e);if(!gC(t))return ES(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=FC(t),o=(a?wS(n.width):n.width)/r,s=(a?wS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var RC=ES(0);function zC(e){let t=fC(e);return!DC()||!t.visualViewport?RC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function BC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fC(e)?!1:t}function VC(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=IC(e),o=ES(1);t&&(r?hC(r)&&(o=LC(r)):o=LC(e));let s=BC(a,n,r)?zC(a):ES(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=fC(a),t=r&&hC(r)?fC(r):r,n=e,i=PC(n);for(;i&&r&&t!==n;){let e=LC(i),t=i.getBoundingClientRect(),r=kC(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=fC(i),i=PC(n)}}return JS({width:u,height:d,x:c,y:l})}function HC(e,t){let n=AC(e).scrollLeft;return t?t.left+n:VC(pC(e)).left+n}function UC(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-HC(e,n),y:n.top+t.scrollTop}}function WC(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=pC(r),s=t?bC(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ES(1),u=ES(0),d=gC(r);if((d||!d&&!a)&&((dC(r)!==`body`||vC(o))&&(c=AC(r)),d)){let e=VC(r);l=LC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?UC(o,c):ES(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function GC(e){return Array.from(e.getClientRects())}function KC(e){let t=pC(e),n=AC(e),r=e.ownerDocument.body,i=CS(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=CS(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+HC(e),s=-n.scrollTop;return kC(r).direction===`rtl`&&(o+=CS(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var qC=25;function JC(e,t){let n=fC(e),r=pC(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=DC();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=HC(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=qC&&(a-=o)}else l<=qC&&(a+=l);return{width:a,height:o,x:s,y:c}}function YC(e,t){let n=VC(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=gC(e)?LC(e):ES(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function XC(e,t,n){let r;if(t===`viewport`)r=JC(e,n);else if(t===`document`)r=KC(pC(e));else if(hC(t))r=YC(t,n);else{let n=zC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return JS(r)}function ZC(e,t){let n=jC(e);return n===t||!hC(n)||OC(n)?!1:kC(n).position===`fixed`||ZC(n,t)}function QC(e,t){let n=t.get(e);if(n)return n;let r=NC(e,[],!1).filter(e=>hC(e)&&dC(e)!==`body`),i=null,a=kC(e).position===`fixed`,o=a?jC(e):e;for(;hC(o)&&!OC(o);){let t=kC(o),n=TC(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||vC(o)&&!n&&ZC(e,o))?r=r.filter(e=>e!==o):i=t,o=jC(o)}return t.set(e,r),r}function $C(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?bC(t)?[]:QC(t,this._c):[].concat(n),r],o=XC(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=XC(t,a[e],i);s=CS(n.top,s),c=SS(n.right,c),l=SS(n.bottom,l),u=CS(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ew(e){let{width:t,height:n}=FC(e);return{width:t,height:n}}function tw(e,t,n){let r=gC(t),i=pC(t),a=n===`fixed`,o=VC(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ES(0);function l(){c.x=HC(i)}if(r||!r&&!a)if((dC(t)!==`body`||vC(i))&&(s=AC(t)),r){let e=VC(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?UC(i,s):ES(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function nw(e){return kC(e).position===`static`}function rw(e,t){if(!gC(e)||kC(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return pC(e)===n&&(n=n.ownerDocument.body),n}function iw(e,t){let n=fC(e);if(bC(e))return n;if(!gC(e)){let t=jC(e);for(;t&&!OC(t);){if(hC(t)&&!nw(t))return t;t=jC(t)}return n}let r=rw(e,t);for(;r&&yC(r)&&nw(r);)r=rw(r,t);return r&&OC(r)&&nw(r)&&!TC(r)?n:r||EC(e)||n}var aw=async function(e){let t=this.getOffsetParent||iw,n=this.getDimensions,r=await n(e.floating);return{reference:tw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ow(e){return kC(e).direction===`rtl`}var sw={convertOffsetParentRelativeRectToViewportRelativeRect:WC,getDocumentElement:pC,getClippingRect:$C,getOffsetParent:iw,getElementRects:aw,getClientRects:GC,getDimensions:ew,getScale:LC,isElement:hC,isRTL:ow};function cw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lw(e,t){let n=null,r,i=pC(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=TS(d),h=TS(i.clientWidth-(u+f)),g=TS(i.clientHeight-(d+p)),_=TS(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:CS(0,SS(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!cw(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function uw(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=IC(e),u=i||a?[...l?NC(l):[],...t?NC(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?lw(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?VC(e):null;c&&g();function g(){let t=VC(e);h&&!cw(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var dw=oC,fw=sC,pw=eC,mw=lC,hw=rC,gw=$S,_w=cC,vw=(e,t,n)=>{let r=new Map,i={platform:sw,...n},a={...i.platform,_c:r};return QS(e,t,{...i,platform:a})},yw=typeof document<`u`?V.useLayoutEffect:function(){};function bw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!bw(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!bw(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function xw(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sw(e,t){let n=xw(e);return Math.round(t*n)/n}function Cw(e){let t=V.useRef(e);return yw(()=>{t.current=e}),t}function ww(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=V.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=V.useState(r);bw(f,r)||p(r);let[m,h]=V.useState(null),[g,_]=V.useState(null),v=V.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=V.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=V.useRef(null),C=V.useRef(null),w=V.useRef(u),T=c!=null,E=Cw(c),D=Cw(i),O=Cw(l),k=V.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),vw(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!bw(w.current,t)&&(w.current=t,Au.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);yw(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=V.useRef(!1);yw(()=>(A.current=!0,()=>{A.current=!1}),[]),yw(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=V.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=V.useMemo(()=>({reference:b,floating:x}),[b,x]),N=V.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Sw(M.floating,u.x),r=Sw(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...xw(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return V.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Tw=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:gw({element:r.current,padding:i}).fn(n):r?gw({element:r,padding:i}).fn(n):{}}}},Ew=(e,t)=>{let n=dw(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dw=(e,t)=>{let n=fw(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ow=(e,t)=>({fn:_w(e).fn,options:[e,t]}),kw=(e,t)=>{let n=pw(e);return{name:n.name,fn:n.fn,options:[e,t]}},Aw=(e,t)=>{let n=mw(e);return{name:n.name,fn:n.fn,options:[e,t]}},jw=(e,t)=>{let n=hw(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mw=(e,t)=>{let n=Tw(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nw=`Arrow`,Pw=V.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,H.jsx)(J.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,H.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Pw.displayName=Nw;var Fw=Pw,Iw=`Popper`,[Lw,Rw]=ed(Iw),[zw,Bw]=Lw(Iw),Vw=e=>{let{__scopePopper:t,children:n}=e,[r,i]=V.useState(null);return(0,H.jsx)(zw,{scope:t,anchor:r,onAnchorChange:i,children:n})};Vw.displayName=Iw;var Hw=`PopperAnchor`,Uw=V.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Bw(Hw,n),o=V.useRef(null),s=K(t,o),c=V.useRef(null);return V.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,H.jsx)(J.div,{...i,ref:s})});Uw.displayName=Hw;var Ww=`PopperContent`,[Gw,Kw]=Lw(Ww),qw=V.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Bw(Ww,n),[_,v]=V.useState(null),y=K(t,e=>v(e)),[b,x]=V.useState(null),S=uy(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Zw),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:N,middlewareData:P}=ww({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>uw(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Ew({mainAxis:i+w,alignmentAxis:o}),c&&Dw({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Ow():void 0,...k}),c&&kw({...k}),Aw({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Mw({element:b,padding:s}),Qw({arrowWidth:C,arrowHeight:w}),f&&jw({strategy:`referenceHidden`,...k})]}),[ee,F]=$w(M),I=Zp(m);fd(()=>{N&&I?.()},[N,I]);let te=P.arrow?.x,ne=P.arrow?.y,L=P.arrow?.centerOffset!==0,[R,re]=V.useState();return fd(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,H.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:N?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:R,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,H.jsx)(Gw,{scope:n,placedSide:ee,onArrowChange:x,arrowX:te,arrowY:ne,shouldHideArrow:L,children:(0,H.jsx)(J.div,{"data-side":ee,"data-align":F,...h,ref:y,style:{...h.style,animation:N?void 0:`none`}})})})});qw.displayName=Ww;var Jw=`PopperArrow`,Yw={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Xw=V.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Kw(Jw,n),a=Yw[i.placedSide];return(0,H.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,H.jsx)(Fw,{...r,ref:t,style:{...r.style,display:`block`}})})});Xw.displayName=Jw;function Zw(e){return e!==null}var Qw=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=$w(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function $w(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var eT=Vw,tT=Uw,nT=qw,rT=Xw,iT=`Popover`,[aT,oT]=ed(iT,[Rw]),sT=Rw(),[cT,lT]=aT(iT),uT=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=sT(t),c=V.useRef(null),[l,u]=V.useState(!1),[d,f]=md({prop:r,defaultProp:i??!1,onChange:a,caller:iT});return(0,H.jsx)(eT,{...s,children:(0,H.jsx)(cT,{scope:t,contentId:Td(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:V.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:V.useCallback(()=>u(!0),[]),onCustomAnchorRemove:V.useCallback(()=>u(!1),[]),modal:o,children:n})})};uT.displayName=iT;var dT=`PopoverAnchor`,fT=V.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=lT(dT,n),a=sT(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return V.useEffect(()=>(o(),()=>s()),[o,s]),(0,H.jsx)(tT,{...a,...r,ref:t})});fT.displayName=dT;var pT=`PopoverTrigger`,mT=V.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=lT(pT,n),a=sT(n),o=K(t,i.triggerRef),s=(0,H.jsx)(J.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":kT(i.open),...r,ref:o,onClick:q(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,H.jsx)(tT,{asChild:!0,...a,children:s})});mT.displayName=pT;var hT=`PopoverPortal`,[gT,_T]=aT(hT,{forceMount:void 0}),vT=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=lT(hT,t);return(0,H.jsx)(gT,{scope:t,forceMount:n,children:(0,H.jsx)(yd,{present:n||a.open,children:(0,H.jsx)(jm,{asChild:!0,container:i,children:r})})})};vT.displayName=hT;var yT=`PopoverContent`,bT=V.forwardRef((e,t)=>{let n=_T(yT,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=lT(yT,e.__scopePopover);return(0,H.jsx)(yd,{present:r||a.open,children:a.modal?(0,H.jsx)(ST,{...i,ref:t}):(0,H.jsx)(CT,{...i,ref:t})})});bT.displayName=yT;var xT=id(`PopoverContent.RemoveScroll`),ST=V.forwardRef((e,t)=>{let n=lT(yT,e.__scopePopover),r=V.useRef(null),i=K(t,r),a=V.useRef(!1);return V.useEffect(()=>{let e=r.current;if(e)return Qh(e)},[]),(0,H.jsx)(Uh,{as:xT,allowPinchZoom:!0,children:(0,H.jsx)(wT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),CT=V.forwardRef((e,t)=>{let n=lT(yT,e.__scopePopover),r=V.useRef(!1),i=V.useRef(!1);return(0,H.jsx)(wT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),wT=V.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=lT(yT,n),p=sT(n);return Nm(),(0,H.jsx)(vm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(am,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,H.jsx)(nT,{"data-state":kT(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),TT=`PopoverClose`,ET=V.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=lT(TT,n);return(0,H.jsx)(J.button,{type:`button`,...r,ref:t,onClick:q(e.onClick,()=>i.onOpenChange(!1))})});ET.displayName=TT;var DT=`PopoverArrow`,OT=V.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=sT(n);return(0,H.jsx)(rT,{...i,...r,ref:t})});OT.displayName=DT;function kT(e){return e?`open`:`closed`}var AT=uT,jT=mT,MT=vT,NT=bT,PT=0;function FT(e,t){let n=`atom${++PT}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=IT,r.write=LT),t&&(r.write=t),r}function IT(e){return e(this)}function LT(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var RT=`rovingFocusGroup.onEntryFocus`,zT={bubbles:!1,cancelable:!0},BT=`RovingFocusGroup`,[VT,HT,UT]=dd(BT),[WT,GT]=ed(BT,[UT]),[KT,qT]=WT(BT),JT=V.forwardRef((e,t)=>(0,H.jsx)(VT.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(VT.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(YT,{...e,ref:t})})}));JT.displayName=BT;var YT=V.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=V.useRef(null),p=K(t,f),m=Hd(a),[h,g]=md({prop:o,defaultProp:s??null,onChange:c,caller:BT}),[_,v]=V.useState(!1),y=Zp(l),b=HT(n),x=V.useRef(!1),[S,C]=V.useState(0);return V.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(RT,y),()=>e.removeEventListener(RT,y)},[y]),(0,H.jsx)(KT,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:V.useCallback(e=>g(e),[g]),onItemShiftTab:V.useCallback(()=>v(!0),[]),onFocusableItemAdd:V.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:V.useCallback(()=>C(e=>e-1),[]),children:(0,H.jsx)(J.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:q(e.onMouseDown,()=>{x.current=!0}),onFocus:q(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(RT,zT);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);tE([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:q(e.onBlur,()=>v(!1))})})}),XT=`RovingFocusGroupItem`,ZT=V.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Td(),l=a||c,u=qT(XT,n),d=u.currentTabStopId===l,f=HT(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return V.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,H.jsx)(VT.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(J.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:q(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:q(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:q(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=eE(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?nE(n,r+1):n.slice(r+1)}setTimeout(()=>tE(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});ZT.displayName=XT;var QT={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function $T(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function eE(e,t,n){let r=$T(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return QT[r]}function tE(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function nE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rE=JT,iE=ZT,aE=[`Enter`,` `],oE=[`ArrowDown`,`PageUp`,`Home`],sE=[`ArrowUp`,`PageDown`,`End`],cE=[...oE,...sE],lE={ltr:[...aE,`ArrowRight`],rtl:[...aE,`ArrowLeft`]},uE={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},dE=`Menu`,[fE,pE,mE]=dd(dE),[hE,gE]=ed(dE,[mE,Rw,GT]),_E=Rw(),vE=GT(),[yE,bE]=hE(dE),[xE,SE]=hE(dE),CE=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=_E(t),[c,l]=V.useState(null),u=V.useRef(!1),d=Zp(a),f=Hd(i);return V.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,H.jsx)(eT,{...s,children:(0,H.jsx)(yE,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,H.jsx)(xE,{scope:t,onClose:V.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};CE.displayName=dE;var wE=`MenuAnchor`,TE=V.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=_E(n);return(0,H.jsx)(tT,{...i,...r,ref:t})});TE.displayName=wE;var EE=`MenuPortal`,[DE,OE]=hE(EE,{forceMount:void 0}),kE=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=bE(EE,t);return(0,H.jsx)(DE,{scope:t,forceMount:n,children:(0,H.jsx)(yd,{present:n||a.open,children:(0,H.jsx)(jm,{asChild:!0,container:i,children:r})})})};kE.displayName=EE;var AE=`MenuContent`,[jE,ME]=hE(AE),NE=V.forwardRef((e,t)=>{let n=OE(AE,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=bE(AE,e.__scopeMenu),o=SE(AE,e.__scopeMenu);return(0,H.jsx)(fE.Provider,{scope:e.__scopeMenu,children:(0,H.jsx)(yd,{present:r||a.open,children:(0,H.jsx)(fE.Slot,{scope:e.__scopeMenu,children:o.modal?(0,H.jsx)(PE,{...i,ref:t}):(0,H.jsx)(FE,{...i,ref:t})})})})}),PE=V.forwardRef((e,t)=>{let n=bE(AE,e.__scopeMenu),r=V.useRef(null),i=K(t,r);return V.useEffect(()=>{let e=r.current;if(e)return Qh(e)},[]),(0,H.jsx)(LE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),FE=V.forwardRef((e,t)=>{let n=bE(AE,e.__scopeMenu);return(0,H.jsx)(LE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),IE=id(`MenuContent.ScrollLock`),LE=V.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=bE(AE,n),_=SE(AE,n),v=_E(n),y=vE(n),b=pE(n),[x,S]=V.useState(null),C=V.useRef(null),w=K(t,C,g.onContentChange),T=V.useRef(0),E=V.useRef(``),D=V.useRef(0),O=V.useRef(null),k=V.useRef(`right`),A=V.useRef(0),j=m?Uh:V.Fragment,M=m?{as:IE,allowPinchZoom:!0}:void 0,N=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=xD(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};V.useEffect(()=>()=>window.clearTimeout(T.current),[]),Nm();let P=V.useCallback(e=>k.current===O.current?.side&&CD(e,O.current?.area),[]);return(0,H.jsx)(jE,{scope:n,searchRef:E,onItemEnter:V.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:V.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:V.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:V.useCallback(e=>{O.current=e},[]),children:(0,H.jsx)(j,{...M,children:(0,H.jsx)(vm,{asChild:!0,trapped:i,onMountAutoFocus:q(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,H.jsx)(am,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,H.jsx)(rE,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:q(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,H.jsx)(nT,{role:`menu`,"aria-orientation":`vertical`,"data-state":gD(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:q(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&N(e.key));let i=C.current;if(e.target!==i||!cE.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);sE.includes(e.key)&&a.reverse(),yD(a)}),onBlur:q(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:q(e.onPointerMove,wD(e=>{let t=e.target,n=A.current!==e.clientX;e.currentTarget.contains(t)&&n&&(k.current=e.clientX>A.current?`right`:`left`,A.current=e.clientX)}))})})})})})})});NE.displayName=AE;var RE=`MenuGroup`,zE=V.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,H.jsx)(J.div,{role:`group`,...r,ref:t})});zE.displayName=RE;var BE=`MenuLabel`,VE=V.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,H.jsx)(J.div,{...r,ref:t})});VE.displayName=BE;var HE=`MenuItem`,UE=`menu.itemSelect`,WE=V.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=V.useRef(null),o=SE(HE,e.__scopeMenu),s=ME(HE,e.__scopeMenu),c=K(t,a),l=V.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(UE,{bubbles:!0,cancelable:!0});e.addEventListener(UE,e=>r?.(e),{once:!0}),_d(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,H.jsx)(GE,{...i,ref:c,disabled:n,onClick:q(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:q(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:q(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||aE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});WE.displayName=HE;var GE=V.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=ME(HE,n),s=vE(n),c=V.useRef(null),l=K(t,c),[u,d]=V.useState(!1),[f,p]=V.useState(``);return V.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,H.jsx)(fE.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,H.jsx)(iE,{asChild:!0,...s,focusable:!r,children:(0,H.jsx)(J.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:q(e.onPointerMove,wD(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:q(e.onPointerLeave,wD(e=>o.onItemLeave(e))),onFocus:q(e.onFocus,()=>d(!0)),onBlur:q(e.onBlur,()=>d(!1))})})})}),KE=`MenuCheckboxItem`,qE=V.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,H.jsx)(tD,{scope:e.__scopeMenu,checked:n,children:(0,H.jsx)(WE,{role:`menuitemcheckbox`,"aria-checked":_D(n)?`mixed`:n,...i,ref:t,"data-state":vD(n),onSelect:q(i.onSelect,()=>r?.(_D(n)?!0:!n),{checkForDefaultPrevented:!1})})})});qE.displayName=KE;var JE=`MenuRadioGroup`,[YE,XE]=hE(JE,{value:void 0,onValueChange:()=>{}}),ZE=V.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Zp(r);return(0,H.jsx)(YE,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,H.jsx)(zE,{...i,ref:t})})});ZE.displayName=JE;var QE=`MenuRadioItem`,$E=V.forwardRef((e,t)=>{let{value:n,...r}=e,i=XE(QE,e.__scopeMenu),a=n===i.value;return(0,H.jsx)(tD,{scope:e.__scopeMenu,checked:a,children:(0,H.jsx)(WE,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":vD(a),onSelect:q(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});$E.displayName=QE;var eD=`MenuItemIndicator`,[tD,nD]=hE(eD,{checked:!1}),rD=V.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=nD(eD,n);return(0,H.jsx)(yd,{present:r||_D(a.checked)||a.checked===!0,children:(0,H.jsx)(J.span,{...i,ref:t,"data-state":vD(a.checked)})})});rD.displayName=eD;var iD=`MenuSeparator`,aD=V.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,H.jsx)(J.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});aD.displayName=iD;var oD=`MenuArrow`,sD=V.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=_E(n);return(0,H.jsx)(rT,{...i,...r,ref:t})});sD.displayName=oD;var cD=`MenuSub`,[lD,uD]=hE(cD),dD=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=bE(cD,t),o=_E(t),[s,c]=V.useState(null),[l,u]=V.useState(null),d=Zp(i);return V.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,H.jsx)(eT,{...o,children:(0,H.jsx)(yE,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,H.jsx)(lD,{scope:t,contentId:Td(),triggerId:Td(),trigger:s,onTriggerChange:c,children:n})})})};dD.displayName=cD;var fD=`MenuSubTrigger`,pD=V.forwardRef((e,t)=>{let n=bE(fD,e.__scopeMenu),r=SE(fD,e.__scopeMenu),i=uD(fD,e.__scopeMenu),a=ME(fD,e.__scopeMenu),o=V.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=V.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return V.useEffect(()=>u,[u]),V.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,H.jsx)(TE,{asChild:!0,...l,children:(0,H.jsx)(GE,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":gD(n.open),...e,ref:rd(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:q(e.onPointerMove,wD(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:q(e.onPointerLeave,wD(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:q(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||lE[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});pD.displayName=fD;var mD=`MenuSubContent`,hD=V.forwardRef((e,t)=>{let n=OE(AE,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=bE(AE,e.__scopeMenu),o=SE(AE,e.__scopeMenu),s=uD(mD,e.__scopeMenu),c=V.useRef(null),l=K(t,c);return(0,H.jsx)(fE.Provider,{scope:e.__scopeMenu,children:(0,H.jsx)(yd,{present:r||a.open,children:(0,H.jsx)(fE.Slot,{scope:e.__scopeMenu,children:(0,H.jsx)(LE,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:q(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:q(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:q(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=uE[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});hD.displayName=mD;function gD(e){return e?`open`:`closed`}function _D(e){return e===`indeterminate`}function vD(e){return _D(e)?`indeterminate`:e?`checked`:`unchecked`}function yD(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function bD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function xD(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=bD(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function SD(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function CD(e,t){return t?SD({x:e.clientX,y:e.clientY},t):!1}function wD(e){return t=>t.pointerType===`mouse`?e(t):void 0}var TD=CE,ED=TE,DD=kE,OD=NE,kD=zE,AD=VE,jD=WE,MD=qE,ND=ZE,PD=$E,FD=rD,ID=aD,LD=sD,RD=dD,zD=pD,BD=hD,VD=`ContextMenu`,[HD,UD]=ed(VD,[gE]),WD=gE(),[GD,KD]=HD(VD),qD=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=V.useState(!1),c=WD(t),l=Zp(r),u=V.useCallback(e=>{s(e),l(e)},[l]);return(0,H.jsx)(GD,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,H.jsx)(TD,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};qD.displayName=VD;var JD=`ContextMenuTrigger`,YD=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=KD(JD,n),o=WD(n),s=V.useRef({x:0,y:0}),c=V.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=V.useRef(0),u=V.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return V.useEffect(()=>u,[u]),V.useEffect(()=>void(r&&u()),[r,u]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ED,{...o,virtualRef:c}),(0,H.jsx)(J.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:q(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:q(e.onPointerDown,wO(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:q(e.onPointerMove,wO(u)),onPointerCancel:r?e.onPointerCancel:q(e.onPointerCancel,wO(u)),onPointerUp:r?e.onPointerUp:q(e.onPointerUp,wO(u))})]})});YD.displayName=JD;var XD=`ContextMenuPortal`,ZD=e=>{let{__scopeContextMenu:t,...n}=e,r=WD(t);return(0,H.jsx)(DD,{...r,...n})};ZD.displayName=XD;var QD=`ContextMenuContent`,$D=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=KD(QD,n),a=WD(n),o=V.useRef(!1);return(0,H.jsx)(OD,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});$D.displayName=QD;var eO=`ContextMenuGroup`,tO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(kD,{...i,...r,ref:t})});tO.displayName=eO;var nO=`ContextMenuLabel`,rO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(AD,{...i,...r,ref:t})});rO.displayName=nO;var iO=`ContextMenuItem`,aO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(jD,{...i,...r,ref:t})});aO.displayName=iO;var oO=`ContextMenuCheckboxItem`,sO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(MD,{...i,...r,ref:t})});sO.displayName=oO;var cO=`ContextMenuRadioGroup`,lO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(ND,{...i,...r,ref:t})});lO.displayName=cO;var uO=`ContextMenuRadioItem`,dO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(PD,{...i,...r,ref:t})});dO.displayName=uO;var fO=`ContextMenuItemIndicator`,pO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(FD,{...i,...r,ref:t})});pO.displayName=fO;var mO=`ContextMenuSeparator`,hO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(ID,{...i,...r,ref:t})});hO.displayName=mO;var gO=`ContextMenuArrow`,_O=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(LD,{...i,...r,ref:t})});_O.displayName=gO;var vO=`ContextMenuSub`,yO=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=WD(t),[s,c]=md({prop:i,defaultProp:a??!1,onChange:r,caller:vO});return(0,H.jsx)(RD,{...o,open:s,onOpenChange:c,children:n})};yO.displayName=vO;var bO=`ContextMenuSubTrigger`,xO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(zD,{...i,...r,ref:t})});xO.displayName=bO;var SO=`ContextMenuSubContent`,CO=V.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=WD(n);return(0,H.jsx)(BD,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});CO.displayName=SO;function wO(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var TO=ZD,EO=$D,DO=rO,OO=aO,kO=sO,AO=dO,jO=pO,MO=hO,NO=xO,PO=CO;function FO(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var IO=V.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:`bottom`,shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),LO=()=>{let e=V.useContext(IO);if(!e)throw Error(`useDrawerContext must be used within a Drawer.Root`);return e};FO(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
81
|
-
[data-state=closed]
|
|
82
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function RO(){let e=navigator.userAgent;return typeof window<`u`&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function zO(){return WO(/^Mac/)}function BO(){return WO(/^iPhone/)}function VO(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function HO(){return WO(/^iPad/)||zO()&&navigator.maxTouchPoints>1}function UO(){return BO()||HO()}function WO(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.platform):void 0}var GO=24,KO=typeof window<`u`?V.useLayoutEffect:V.useEffect;function qO(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var JO=typeof document<`u`&&window.visualViewport;function YO(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function XO(e){for(YO(e)&&(e=e.parentElement);e&&!YO(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var ZO=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),QO=0,$O;function ek(e={}){let{isDisabled:t}=e;KO(()=>{if(!t)return QO++,QO===1&&UO()&&($O=tk()),()=>{QO--,QO===0&&$O?.()}},[t])}function tk(){let e,t=0,n=n=>{e=XO(n.target),!(e===document.documentElement&&e===document.body)&&(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}let r=n.changedTouches[0].pageY,i=e.scrollTop,a=e.scrollHeight-e.clientHeight;a!==0&&((i<=0&&r>t||i>=a&&r<t)&&n.preventDefault(),t=r)},i=e=>{let t=e.target;ak(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform=`translateY(-2000px)`,t.focus(),requestAnimationFrame(()=>{t.style.transform=``}))},a=e=>{let t=e.target;ak(t)&&(t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>{t.style.transform=``,JO&&(JO.height<window.innerHeight?requestAnimationFrame(()=>{ik(t)}):JO.addEventListener(`resize`,()=>ik(t),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=qO(nk(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let u=qO(rk(document,`touchstart`,n,{passive:!1,capture:!0}),rk(document,`touchmove`,r,{passive:!1,capture:!0}),rk(document,`touchend`,i,{passive:!1,capture:!0}),rk(document,`focus`,a,!0),rk(window,`scroll`,o));return()=>{l(),u(),window.scrollTo(s,c)}}function nk(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function rk(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ik(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=XO(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+GO&&(t.scrollTop+=r-n)}e=t.parentElement}}function ak(e){return e instanceof HTMLInputElement&&!ZO.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function ok(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function sk(...e){return t=>e.forEach(e=>ok(e,t))}function ck(...e){return V.useCallback(sk(...e),e)}var lk=new WeakMap;function uk(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&lk.set(e,r)}function dk(e,t){if(!e||!(e instanceof HTMLElement))return;let n=lk.get(e);n&&(e.style[t]=n[t])}var fk=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function pk(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(`, `)[fk(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(`, `)[fk(t)?5:4]):null)}function mk(e){return 8*(Math.log(e+1)-2)}function hk(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var gk={DURATION:.5,EASE:[.32,.72,0,1]},_k=.4,vk=.25,yk=100,bk=8,xk=16,Sk=26,Ck=`vaul-dragging`;function wk(e){let t=V.useRef(e);return V.useEffect(()=>{t.current=e}),V.useMemo(()=>(...e)=>t.current==null?void 0:t.current.call(t,...e),[])}function Tk({defaultProp:e,onChange:t}){let n=V.useState(e),[r]=n,i=V.useRef(r),a=wk(t);return V.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function Ek({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=Tk({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=wk(n);return[o,V.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function Dk({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:o,direction:s=`bottom`,container:c,snapToSequentialPoint:l}){let[u,d]=Ek({prop:e,defaultProp:n?.[0],onChange:t}),[f,p]=V.useState(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);V.useEffect(()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let m=V.useMemo(()=>u===n?.[n.length-1]||null,[n,u]),h=V.useMemo(()=>n?.findIndex(e=>e===u)??null,[n,u]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===u||!n,_=V.useMemo(()=>{let e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return n?.map(t=>{let n=typeof t==`string`,r=0;if(n&&(r=parseInt(t,10)),fk(s)){let i=n?r:f?t*e.height:0;return f?s===`bottom`?e.height-i:-e.height+i:i}let i=n?r:f?t*e.width:0;return f?s===`right`?e.width-i:-e.width+i:i})??[]},[n,f,c]),v=V.useMemo(()=>h===null?null:_?.[h],[_,h]),y=V.useCallback(e=>{let t=_?.findIndex(t=>t===e)??null;o(t),uk(r.current,{transition:`transform ${gk.DURATION}s cubic-bezier(${gk.EASE.join(`,`)})`,transform:fk(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),_&&t!==_.length-1&&a!==void 0&&t!==a&&t<a?uk(i.current,{transition:`opacity ${gk.DURATION}s cubic-bezier(${gk.EASE.join(`,`)})`,opacity:`0`}):uk(i.current,{transition:`opacity ${gk.DURATION}s cubic-bezier(${gk.EASE.join(`,`)})`,opacity:`1`}),d(n?.[Math.max(t,0)])},[r.current,n,_,a,i,d]);V.useEffect(()=>{if(u||e){let t=n?.findIndex(t=>t===e||t===u)??-1;_&&t!==-1&&typeof _[t]==`number`&&y(_[t])}},[u,e,n,_,y]);function b({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(a===void 0)return;let c=s===`bottom`||s===`right`?(v??0)-e:(v??0)+e,u=h===a-1,d=h===0,f=e>0;if(u&&uk(i.current,{transition:`opacity ${gk.DURATION}s cubic-bezier(${gk.EASE.join(`,`)})`}),!l&&r>2&&!f){o?t():y(_[0]);return}if(!l&&r>2&&f&&_&&n){y(_[n.length-1]);return}let p=_?.reduce((e,t)=>typeof e!=`number`||typeof t!=`number`?e:Math.abs(t-c)<Math.abs(e-c)?t:e),g=fk(s)?window.innerHeight:window.innerWidth;if(r>_k&&Math.abs(e)<g*.4){let e=f?1:-1;if(e>0&&m&&n){y(_[n.length-1]);return}if(d&&e<0&&o&&t(),h===null)return;y(_[h+e]);return}y(p)}function x({draggedDistance:e}){if(v===null)return;let t=s===`bottom`||s===`right`?v-e:v+e;(s===`bottom`||s===`right`)&&t<_[_.length-1]||(s===`top`||s===`left`)&&t>_[_.length-1]||uk(r.current,{transform:fk(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function S(e,t){if(!n||typeof h!=`number`||!_||a===void 0)return null;let r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;let i=r?h+1:h-1,o=r?_[i]-_[i-1]:_[i+1]-_[i],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:m,activeSnapPoint:u,shouldFade:g,getPercentageDragged:S,setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:b,onDrag:x,snapPointsOffset:_}}function Ok(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=LO(),a=V.useRef(null),o=(0,V.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-Sk)/window.innerWidth}V.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&hk(document.body,{background:`black`}),hk(t,{transformOrigin:fk(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${gk.DURATION}s`,transitionTimingFunction:`cubic-bezier(${gk.EASE.join(`,`)})`});let n=hk(t,{borderRadius:`${bk}px`,overflow:`hidden`,...fk(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},gk.DURATION*1e3)}}},[t,n,o])}var kk=null;function Ak({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){let[o,s]=V.useState(()=>typeof window<`u`?window.location.href:``),c=V.useRef(0),l=V.useCallback(()=>{if(VO()&&kk===null&&e&&!a){kk={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:`unset`};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-e}px`,right:`0px`,height:`auto`}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=`${-(c.current+e)}px`)}),300)}},[e]),u=V.useCallback(()=>{if(VO()&&kk!==null&&!a){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,kk),window.requestAnimationFrame(()=>{if(i&&o!==window.location.href){s(window.location.href);return}window.scrollTo(t,e)}),kk=null}},[o]);return V.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener(`scroll`,e),()=>{window.removeEventListener(`scroll`,e)}},[]),V.useEffect(()=>{if(t)return()=>{typeof document>`u`||document.querySelector(`[data-vaul-drawer]`)||u()}},[t,u]),V.useEffect(()=>{n||!r||(e?(!window.matchMedia(`(display-mode: standalone)`).matches&&l(),t||window.setTimeout(()=>{u()},500)):u())},[e,r,o,t,n,l,u]),{restorePositionSetting:u}}function jk({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=vk,scrollLockTimeout:l=yk,dismissible:u=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:_,nested:v,noBodyStyles:y=!1,direction:b=`bottom`,defaultOpen:x=!1,disablePreventScroll:S=!0,snapToSequentialPoint:C=!1,preventScrollRestoration:w=!1,repositionInputs:T=!0,onAnimationEnd:E,container:D,autoFocus:O=!1}){let[k=!1,A]=Ek({defaultProp:x,prop:e,onChange:e=>{t?.(e),!e&&!v&&ye(),setTimeout(()=>{E?.(e)},gk.DURATION*1e3),e&&!g&&typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),e||(document.body.style.pointerEvents=`auto`)}}),[j,M]=V.useState(!1),[N,P]=V.useState(!1),[ee,F]=V.useState(!1),I=V.useRef(null),te=V.useRef(null),ne=V.useRef(null),L=V.useRef(null),R=V.useRef(null),re=V.useRef(!1),ie=V.useRef(null),ae=V.useRef(0),z=V.useRef(!1),oe=V.useRef(!x),se=V.useRef(0),B=V.useRef(null),ce=V.useRef(B.current?.getBoundingClientRect().height||0),le=V.useRef(B.current?.getBoundingClientRect().width||0),ue=V.useRef(0),{activeSnapPoint:de,activeSnapPointIndex:fe,setActiveSnapPoint:pe,onRelease:me,snapPointsOffset:he,onDrag:ge,shouldFade:_e,getPercentageDragged:ve}=Dk({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:B,fadeFromIndex:f,overlayRef:I,onSnapPointChange:V.useCallback(e=>{a&&e===he.length-1&&(te.current=new Date)},[]),direction:b,container:D,snapToSequentialPoint:C});ek({isDisabled:!k||N||!g||ee||!j||!T||!S});let{restorePositionSetting:ye}=Ak({isOpen:k,modal:g,nested:v??!1,hasBeenOpened:j,preventScrollRestoration:w,noBodyStyles:y});function be(){return(window.innerWidth-Sk)/window.innerWidth}function xe(e){!u&&!a||B.current&&!B.current.contains(e.target)||(ce.current=B.current?.getBoundingClientRect().height||0,le.current=B.current?.getBoundingClientRect().width||0,P(!0),ne.current=new Date,UO()&&window.addEventListener(`touchend`,()=>re.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),ae.current=fk(b)?e.pageY:e.pageX)}function Se(e,t){let n=e,r=window.getSelection()?.toString(),i=B.current?pk(B.current,b):null,a=new Date;if(n.tagName===`SELECT`||n.hasAttribute(`data-vaul-no-drag`)||n.closest(`[data-vaul-no-drag]`))return!1;if(b===`right`||b===`left`)return!0;if(te.current&&a.getTime()-te.current.getTime()<500)return!1;if(i!==null&&(b===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(R.current&&a.getTime()-R.current.getTime()<l&&i===0||t)return R.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return R.current=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function H(e){if(B.current&&N){let t=b===`bottom`||b===`right`?1:-1,n=(ae.current-(fk(b)?e.pageY:e.pageX))*t,i=n>0,s=a&&!u&&!i;if(s&&fe===0)return;let c=Math.abs(n),l=document.querySelector(`[data-vaul-drawer-wrapper]`),d=c/(b===`bottom`||b===`top`?ce.current:le.current),p=ve(c,i);if(p!==null&&(d=p),s&&d>=1||!re.current&&!Se(e.target,i))return;if(B.current.classList.add(Ck),re.current=!0,uk(B.current,{transition:`none`}),uk(I.current,{transition:`none`}),a&&ge({draggedDistance:n}),i&&!a){let e=mk(n),r=Math.min(e*-1,0)*t;uk(B.current,{transform:fk(b)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-d;if((_e||f&&fe===f-1)&&(r?.(e,d),uk(I.current,{opacity:`${m}`,transition:`none`},!0)),l&&I.current&&o){let e=Math.min(be()+d*(1-be()),1),t=8-d*8,n=Math.max(0,14-d*14);uk(l,{borderRadius:`${t}px`,transform:fk(b)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!a){let e=c*t;uk(B.current,{transform:fk(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}}V.useEffect(()=>{window.requestAnimationFrame(()=>{oe.current=!0})},[]),V.useEffect(()=>{var e;function t(){if(!B.current||!T)return;let e=document.activeElement;if(ak(e)||z.current){let e=window.visualViewport?.height||0,t=window.innerHeight,n=t-e,r=B.current.getBoundingClientRect().height||0,i=r>t*.8;ue.current||=r;let o=B.current.getBoundingClientRect().top;if(Math.abs(se.current-n)>60&&(z.current=!z.current),a&&a.length>0&&he&&fe){let e=he[fe]||0;n+=e}if(se.current=n,r>e||z.current){let t=B.current.getBoundingClientRect().height,r=t;t>e&&(r=e-(i?o:Sk)),h?B.current.style.height=`${t-Math.max(n,0)}px`:B.current.style.height=`${Math.max(r,e-o)}px`}else RO()||(B.current.style.height=`${ue.current}px`);a&&a.length>0&&!z.current?B.current.style.bottom=`0px`:B.current.style.bottom=`${Math.max(n,0)}px`}}return(e=window.visualViewport)==null||e.addEventListener(`resize`,t),()=>window.visualViewport?.removeEventListener(`resize`,t)},[fe,a,he]);function Ce(e){Te(),_?.(),e||A(!1),setTimeout(()=>{a&&pe(a[0])},gk.DURATION*1e3)}function we(){if(!B.current)return;let e=document.querySelector(`[data-vaul-drawer-wrapper]`),t=pk(B.current,b);uk(B.current,{transform:`translate3d(0, 0, 0)`,transition:`transform ${gk.DURATION}s cubic-bezier(${gk.EASE.join(`,`)})`}),uk(I.current,{transition:`opacity ${gk.DURATION}s cubic-bezier(${gk.EASE.join(`,`)})`,opacity:`1`}),o&&t&&t>0&&k&&uk(e,{borderRadius:`${bk}px`,overflow:`hidden`,...fk(b)?{transform:`scale(${be()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${be()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${gk.DURATION}s`,transitionTimingFunction:`cubic-bezier(${gk.EASE.join(`,`)})`},!0)}function Te(){!N||!B.current||(B.current.classList.remove(Ck),re.current=!1,P(!1),L.current=new Date)}function Ee(e){if(!N||!B.current)return;B.current.classList.remove(Ck),re.current=!1,P(!1),L.current=new Date;let t=pk(B.current,b);if(!e||!Se(e.target,!1)||!t||Number.isNaN(t)||ne.current===null)return;let n=L.current.getTime()-ne.current.getTime(),r=ae.current-(fk(b)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(F(!0),setTimeout(()=>{F(!1)},200)),a){me({draggedDistance:r*(b===`bottom`||b===`right`?1:-1),closeDrawer:Ce,velocity:o,dismissible:u}),i?.(e,!0);return}if(b===`bottom`||b===`right`?r>0:r<0){we(),i?.(e,!0);return}if(o>_k){Ce(),i?.(e,!1);return}let s=Math.min(B.current.getBoundingClientRect().height??0,window.innerHeight),l=Math.min(B.current.getBoundingClientRect().width??0,window.innerWidth);if(Math.abs(t)>=(b===`left`||b===`right`?l:s)*c){Ce(),i?.(e,!1);return}i?.(e,!0),we()}V.useEffect(()=>(k&&(uk(document.documentElement,{scrollBehavior:`auto`}),te.current=new Date),()=>{dk(document.documentElement,`scrollBehavior`)}),[k]);function De(e){let t=e?(window.innerWidth-xk)/window.innerWidth:1,n=e?-xk:0;ie.current&&window.clearTimeout(ie.current),uk(B.current,{transition:`transform ${gk.DURATION}s cubic-bezier(${gk.EASE.join(`,`)})`,transform:fk(b)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&B.current&&(ie.current=setTimeout(()=>{let e=pk(B.current,b);uk(B.current,{transition:`none`,transform:fk(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function Oe(e,t){if(t<0)return;let n=(window.innerWidth-xk)/window.innerWidth,r=n+t*(1-n),i=-xk+t*xk;uk(B.current,{transform:fk(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function ke(e,t){let n=fk(b)?window.innerHeight:window.innerWidth,r=t?(n-xk)/n:1,i=t?-xk:0;t&&uk(B.current,{transition:`transform ${gk.DURATION}s cubic-bezier(${gk.EASE.join(`,`)})`,transform:fk(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`})}return V.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`})},[g]),V.createElement(Ng,{defaultOpen:x,onOpenChange:e=>{!u&&!e||(e?M(!0):Ce(!0),A(e))},open:k},V.createElement(IO.Provider,{value:{activeSnapPoint:de,snapPoints:a,setActiveSnapPoint:pe,drawerRef:B,overlayRef:I,onOpenChange:t,onPress:xe,onRelease:Ee,onDrag:H,dismissible:u,shouldAnimate:oe,handleOnly:d,isOpen:k,isDragging:N,shouldFade:_e,closeDrawer:Ce,onNestedDrag:Oe,onNestedOpenChange:De,onNestedRelease:ke,keyboardIsOpen:z,modal:g,snapPointsOffset:he,activeSnapPointIndex:fe,direction:b,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:y,container:D,autoFocus:O}},n))}var Mk=V.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s,shouldAnimate:c}=LO(),l=ck(t,n),u=r&&r.length>0;if(!s)return null;let d=V.useCallback(e=>i(e),[i]);return V.createElement(Ig,{onMouseUp:d,ref:l,"data-vaul-overlay":``,"data-vaul-snap-points":o&&u?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,"data-vaul-animate":c?.current?`true`:`false`,...e})});Mk.displayName=`Drawer.Overlay`;var Nk=V.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,activeSnapPointIndex:d,modal:f,isOpen:p,direction:m,snapPoints:h,container:g,handleOnly:_,shouldAnimate:v,autoFocus:y}=LO(),[b,x]=V.useState(!1),S=ck(i,a),C=V.useRef(null),w=V.useRef(null),T=V.useRef(!1),E=h&&h.length>0;Ok();let D=(e,t,n=0)=>{if(T.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return T.current=!0,!0};V.useEffect(()=>{E&&window.requestAnimationFrame(()=>{x(!0)})},[]);function O(e){C.current=null,T.current=!1,s(e)}return V.createElement(Lg,{"data-vaul-drawer-direction":m,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":b?`true`:`false`,"data-vaul-snap-points":p&&E?`true`:`false`,"data-vaul-custom-container":g?`true`:`false`,"data-vaul-animate":v?.current?`true`:`false`,...r,ref:S,style:u&&u.length>0?{"--snap-point-height":`${u[d??0]}px`,...t}:t,onPointerDown:e=>{_||(r.onPointerDown==null||r.onPointerDown.call(r,e),C.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),y||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!f||t.defaultPrevented){t.preventDefault();return}l.current&&=!1},onFocusOutside:e=>{if(!f){e.preventDefault();return}},onPointerMove:e=>{if(w.current=e,_||(r.onPointerMove==null||r.onPointerMove.call(r,e),!C.current))return;let t=e.pageY-C.current.y,n=e.pageX-C.current.x,i=e.pointerType===`touch`?10:2;D({x:n,y:t},m,i)?c(e):(Math.abs(n)>i||Math.abs(t)>i)&&(C.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),C.current=null,T.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),O(w.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),w.current&&O(w.current)}})});Nk.displayName=`Drawer.Content`;var Pk=250,Fk=120,Ik=V.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=LO(),m=V.useRef(null),h=V.useRef(!1);function g(){if(h.current){y();return}window.setTimeout(()=>{_()},Fk)}function _(){if(a||e||h.current){y();return}if(y(),!o||o.length===0){l||i();return}if(s===o[o.length-1]&&l){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];c(n)}function v(){m.current=window.setTimeout(()=>{h.current=!0},Pk)}function y(){m.current&&window.clearTimeout(m.current),h.current=!1}return V.createElement(`div`,{onClick:g,onPointerCancel:y,onPointerDown:e=>{u&&f(e),v()},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":d?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},V.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});Ik.displayName=`Drawer.Handle`;function Lk({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:o}=LO();if(!i)throw Error(`Drawer.NestedRoot must be placed in another drawer`);return V.createElement(jk,{nested:!0,open:n,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),e?.(t,n)},onOpenChange:e=>{e&&a(e),t?.(e)},onRelease:o,...r})}function Rk(e){let t=LO(),{container:n=t.container,...r}=e;return V.createElement(Fg,{container:n,...r})}var zk={Root:jk,NestedRoot:Lk,Content:Nk,Overlay:Mk,Trigger:Pg,Portal:Rk,Handle:Ik,Close:Bg,Title:Rg,Description:zg},Bk=`DropdownMenu`,[Vk,Hk]=ed(Bk,[gE]),Uk=gE(),[Wk,Gk]=Vk(Bk),Kk=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Uk(t),l=V.useRef(null),[u,d]=md({prop:i,defaultProp:a??!1,onChange:o,caller:Bk});return(0,H.jsx)(Wk,{scope:t,triggerId:Td(),triggerRef:l,contentId:Td(),open:u,onOpenChange:d,onOpenToggle:V.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,H.jsx)(TD,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Kk.displayName=Bk;var qk=`DropdownMenuTrigger`,Jk=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Gk(qk,n),o=Uk(n);return(0,H.jsx)(ED,{asChild:!0,...o,children:(0,H.jsx)(J.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:rd(t,a.triggerRef),onPointerDown:q(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:q(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Jk.displayName=qk;var Yk=`DropdownMenuPortal`,Xk=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Uk(t);return(0,H.jsx)(DD,{...r,...n})};Xk.displayName=Yk;var Zk=`DropdownMenuContent`,Qk=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gk(Zk,n),a=Uk(n),o=V.useRef(!1);return(0,H.jsx)(OD,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:q(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Qk.displayName=Zk;var $k=`DropdownMenuGroup`,eA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(kD,{...i,...r,ref:t})});eA.displayName=$k;var tA=`DropdownMenuLabel`,nA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(AD,{...i,...r,ref:t})});nA.displayName=tA;var rA=`DropdownMenuItem`,iA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(jD,{...i,...r,ref:t})});iA.displayName=rA;var aA=`DropdownMenuCheckboxItem`,oA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(MD,{...i,...r,ref:t})});oA.displayName=aA;var sA=`DropdownMenuRadioGroup`,cA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(ND,{...i,...r,ref:t})});cA.displayName=sA;var lA=`DropdownMenuRadioItem`,uA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(PD,{...i,...r,ref:t})});uA.displayName=lA;var dA=`DropdownMenuItemIndicator`,fA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(FD,{...i,...r,ref:t})});fA.displayName=dA;var pA=`DropdownMenuSeparator`,mA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(ID,{...i,...r,ref:t})});mA.displayName=pA;var hA=`DropdownMenuArrow`,gA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(LD,{...i,...r,ref:t})});gA.displayName=hA;var _A=`DropdownMenuSubTrigger`,vA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(zD,{...i,...r,ref:t})});vA.displayName=_A;var yA=`DropdownMenuSubContent`,bA=V.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Uk(n);return(0,H.jsx)(BD,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});bA.displayName=yA;var xA=Xk,SA=Qk,CA=nA,wA=iA,TA=oA,EA=uA,DA=fA,OA=mA,kA=vA,AA=bA,jA=e=>e instanceof Date,MA=e=>e==null,NA=e=>typeof e==`object`,PA=e=>!MA(e)&&!Array.isArray(e)&&NA(e)&&!jA(e),FA=e=>{let t=e.constructor&&e.constructor.prototype;return PA(t)&&t.hasOwnProperty(`isPrototypeOf`)},IA=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function LA(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(IA&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(PA(e)&&FA(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=LA(e[t]));return r}var RA={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},zA=V.createContext(null);zA.displayName=`HookFormControlContext`,typeof window<`u`?V.useLayoutEffect:V.useEffect;var BA=e=>MA(e)||!NA(e);function VA(e,t,n=new WeakSet){if(BA(e)||BA(t))return Object.is(e,t);if(jA(e)&&jA(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(let a of r){let r=e[a];if(!i.includes(a))return!1;if(a!==`ref`){let e=t[a];if(jA(r)&&jA(e)||PA(r)&&PA(e)||Array.isArray(r)&&Array.isArray(e)?!VA(r,e,n):!Object.is(r,e))return!1}}return!0}var HA=V.createContext(null);HA.displayName=`HookFormContext`;var UA=()=>V.useContext(HA);RA.onSubmit,RA.onChange;var WA=`Label`,GA=V.forwardRef((e,t)=>(0,H.jsx)(A_.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));GA.displayName=WA;var KA=GA,qA,JA=`HoverCard`,[YA,XA]=ed(JA,[Rw]),ZA=Rw(),[QA,$A]=YA(JA),ej=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,c=ZA(t),l=V.useRef(0),u=V.useRef(0),d=V.useRef(!1),f=V.useRef(!1),[p,m]=md({prop:r,defaultProp:i??!1,onChange:a,caller:JA}),h=V.useCallback(()=>{clearTimeout(u.current),l.current=window.setTimeout(()=>m(!0),o)},[o,m]),g=V.useCallback(()=>{clearTimeout(l.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>m(!1),s))},[s,m]),_=V.useCallback(()=>m(!1),[m]);return V.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(u.current)},[]),(0,H.jsx)(QA,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:g,onDismiss:_,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,H.jsx)(eT,{...c,children:n})})};ej.displayName=JA;var tj=`HoverCardTrigger`,nj=V.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=$A(tj,n),a=ZA(n);return(0,H.jsx)(tT,{asChild:!0,...a,children:(0,H.jsx)(J.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:q(e.onPointerEnter,fj(i.onOpen)),onPointerLeave:q(e.onPointerLeave,fj(i.onClose)),onFocus:q(e.onFocus,i.onOpen),onBlur:q(e.onBlur,i.onClose),onTouchStart:q(e.onTouchStart,e=>e.preventDefault())})})});nj.displayName=tj;var rj=`HoverCardPortal`,[ij,aj]=YA(rj,{forceMount:void 0}),oj=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=$A(rj,t);return(0,H.jsx)(ij,{scope:t,forceMount:n,children:(0,H.jsx)(yd,{present:n||a.open,children:(0,H.jsx)(jm,{asChild:!0,container:i,children:r})})})};oj.displayName=rj;var sj=`HoverCardContent`,cj=V.forwardRef((e,t)=>{let n=aj(sj,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=$A(sj,e.__scopeHoverCard);return(0,H.jsx)(yd,{present:r||a.open,children:(0,H.jsx)(lj,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:q(e.onPointerEnter,fj(a.onOpen)),onPointerLeave:q(e.onPointerLeave,fj(a.onClose)),ref:t})})});cj.displayName=sj;var lj=V.forwardRef((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,c=$A(sj,n),l=ZA(n),u=V.useRef(null),d=K(t,u),[f,p]=V.useState(!1);return V.useEffect(()=>{if(f){let e=document.body;return qA=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=qA,e.style.webkitUserSelect=qA}}},[f]),V.useEffect(()=>{if(u.current){let e=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(c.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),V.useEffect(()=>{u.current&&pj(u.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,H.jsx)(am,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:q(a,e=>{e.preventDefault()}),onDismiss:c.onDismiss,children:(0,H.jsx)(nT,{...l,...s,onPointerDown:q(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:f?`text`:void 0,WebkitUserSelect:f?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),uj=`HoverCardArrow`,dj=V.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=ZA(n);return(0,H.jsx)(rT,{...i,...r,ref:t})});dj.displayName=uj;function fj(e){return t=>t.pointerType===`touch`?void 0:e()}function pj(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var mj=cj,hj=Object.defineProperty,gj=Object.defineProperties,_j=Object.getOwnPropertyDescriptors,vj=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,bj=Object.prototype.propertyIsEnumerable,xj=(e,t,n)=>t in e?hj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sj=(e,t)=>{for(var n in t||={})yj.call(t,n)&&xj(e,n,t[n]);if(vj)for(var n of vj(t))bj.call(t,n)&&xj(e,n,t[n]);return e},Cj=(e,t)=>gj(e,_j(t)),wj=(e,t)=>{var n={};for(var r in e)yj.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vj)for(var r of vj(e))t.indexOf(r)<0&&bj.call(e,r)&&(n[r]=e[r]);return n};function Tj(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function Ej(e){let t=V.useRef();return V.useEffect(()=>{t.current=e}),t.current}var Dj=18,Oj=40,kj=`${Oj}px`,Aj=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function jj({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=V.useState(!1),[o,s]=V.useState(!1),[c,l]=V.useState(!1),u=V.useMemo(()=>n===`none`?!1:(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=V.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,u=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-Dj,f=u;document.querySelectorAll(Aj).length===0&&document.elementFromPoint(d,f)===r||(a(!0),l(!0))},[e,t,c,n]);return V.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){s(window.innerWidth-t.getBoundingClientRect().right>=Oj)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),V.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:kj}}var Mj=V.createContext({}),Nj=V.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=Fj,render:h,children:g}=n,_=wj(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),v;let[y,b]=V.useState(typeof _.defaultValue==`string`?_.defaultValue:``),x=r??y,S=Ej(x),C=V.useCallback(e=>{i?.(e),b(e)},[i]),w=V.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),T=V.useRef(null),E=V.useRef(null),D=V.useRef({value:x,onChange:C,isIOS:typeof window<`u`&&((v=window==null?void 0:window.CSS)?.supports)?.call(v,`-webkit-touch-callout`,`none`)}),O=V.useRef({prev:[T.current?.selectionStart,T.current?.selectionEnd,T.current?.selectionDirection]});V.useImperativeHandle(t,()=>T.current,[]),V.useEffect(()=>{let e=T.current,t=E.current;if(!e||!t)return;D.current.value!==e.value&&D.current.onChange(e.value),O.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){P(null),F(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=O.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&T.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;P(u),F(d),O.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&M(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;Pj(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Pj(e.sheet,`[data-input-otp]:autofill { ${t} }`),Pj(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Pj(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),Pj(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[k,A]=V.useState(!1),[j,M]=V.useState(!1),[N,P]=V.useState(null),[ee,F]=V.useState(null);V.useEffect(()=>{Tj(()=>{var e;(e=T.current)==null||e.dispatchEvent(new Event(`input`));let t=T.current?.selectionStart,n=T.current?.selectionEnd,r=T.current?.selectionDirection;t!==null&&n!==null&&(P(t),F(n),O.current.prev=[t,n,r])})},[x,j]),V.useEffect(()=>{S!==void 0&&x!==S&&S.length<a&&x.length===a&&u?.(x)},[a,u,S,x]);let I=jj({containerRef:E,inputRef:T,pushPasswordManagerStrategy:d,isFocused:j}),te=V.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&w&&!w.test(t)){e.preventDefault();return}typeof S==`string`&&t.length<S.length&&document.dispatchEvent(new Event(`selectionchange`)),C(t)},[a,C,S,w]),ne=V.useCallback(()=>{var e;if(T.current){let t=Math.min(T.current.value.length,a-1),n=T.current.value.length;(e=T.current)==null||e.setSelectionRange(t,n),P(t),F(n)}M(!0)},[a]),L=V.useCallback(e=>{let t=T.current;if(!f&&(!D.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=T.current?.selectionStart,o=T.current?.selectionEnd,s=(i===o?x.slice(0,i)+r+x.slice(i):x.slice(0,i)+r+x.slice(o)).slice(0,a);if(s.length>0&&w&&!w.test(s))return;t.value=s,C(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),P(c),F(l)},[a,C,w,x]),R=V.useMemo(()=>({position:`relative`,cursor:_.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[_.disabled]),re=V.useMemo(()=>({position:`absolute`,inset:0,width:I.willPushPWMBadge?`calc(100% + ${I.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:I.willPushPWMBadge?`inset(0 ${I.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[I.PWM_BADGE_SPACE_WIDTH,I.willPushPWMBadge,o]),ie=V.useMemo(()=>V.createElement(`input`,Cj(Sj({autoComplete:_.autoComplete||`one-time-code`},_),{"data-input-otp":!0,"data-input-otp-placeholder-shown":x.length===0||void 0,"data-input-otp-mss":N,"data-input-otp-mse":ee,inputMode:l,pattern:w?.source,"aria-placeholder":c,style:re,maxLength:a,value:x,ref:T,onPaste:e=>{var t;L(e),(t=_.onPaste)==null||t.call(_,e)},onChange:te,onMouseOver:e=>{var t;A(!0),(t=_.onMouseOver)==null||t.call(_,e)},onMouseLeave:e=>{var t;A(!1),(t=_.onMouseLeave)==null||t.call(_,e)},onFocus:e=>{var t;ne(),(t=_.onFocus)==null||t.call(_,e)},onBlur:e=>{var t;M(!1),(t=_.onBlur)==null||t.call(_,e)}})),[te,ne,L,l,re,a,ee,N,_,w?.source,x]),ae=V.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=j&&N!==null&&ee!==null&&(N===ee&&t===N||t>=N&&t<ee),r=x[t]===void 0?null:x[t];return{char:r,placeholderChar:x[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:j,isHovering:!_.disabled&&k}),[j,k,a,ee,N,_.disabled,x]),z=V.useMemo(()=>h?h(ae):V.createElement(Mj.Provider,{value:ae},g),[g,ae,h]);return V.createElement(V.Fragment,null,m!==null&&V.createElement(`noscript`,null,V.createElement(`style`,null,m)),V.createElement(`div`,{ref:E,"data-input-otp-container":!0,style:R,className:p},z,V.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},ie)))});Nj.displayName=`Input`;function Pj(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var Fj=`
|
|
83
|
-
[data-input-otp] {
|
|
84
|
-
--nojs-bg: white !important;
|
|
85
|
-
--nojs-fg: black !important;
|
|
86
|
-
|
|
87
|
-
background-color: var(--nojs-bg) !important;
|
|
88
|
-
color: var(--nojs-fg) !important;
|
|
89
|
-
caret-color: var(--nojs-fg) !important;
|
|
90
|
-
letter-spacing: .25em !important;
|
|
91
|
-
text-align: center !important;
|
|
92
|
-
border: 1px solid var(--nojs-fg) !important;
|
|
93
|
-
border-radius: 4px !important;
|
|
94
|
-
width: 100% !important;
|
|
95
|
-
}
|
|
96
|
-
@media (prefers-color-scheme: dark) {
|
|
97
|
-
[data-input-otp] {
|
|
98
|
-
--nojs-bg: black !important;
|
|
99
|
-
--nojs-fg: white !important;
|
|
100
|
-
}
|
|
101
|
-
}`,Ij=`Menubar`,[Lj,Rj,zj]=dd(Ij),[Bj,Vj]=ed(Ij,[zj,GT]),Hj=gE(),Uj=GT(),[Wj,Gj]=Bj(Ij),Kj=V.forwardRef((e,t)=>{let{__scopeMenubar:n,value:r,onValueChange:i,defaultValue:a,loop:o=!0,dir:s,...c}=e,l=Hd(s),u=Uj(n),[d,f]=md({prop:r,onChange:i,defaultProp:a??``,caller:Ij}),[p,m]=V.useState(null);return(0,H.jsx)(Wj,{scope:n,value:d,onMenuOpen:V.useCallback(e=>{f(e),m(e)},[f]),onMenuClose:V.useCallback(()=>f(``),[f]),onMenuToggle:V.useCallback(e=>{f(t=>t?``:e),m(e)},[f]),dir:l,loop:o,children:(0,H.jsx)(Lj.Provider,{scope:n,children:(0,H.jsx)(Lj.Slot,{scope:n,children:(0,H.jsx)(rE,{asChild:!0,...u,orientation:`horizontal`,loop:o,dir:l,currentTabStopId:p,onCurrentTabStopIdChange:m,children:(0,H.jsx)(J.div,{role:`menubar`,...c,ref:t})})})})})});Kj.displayName=Ij;var qj=`MenubarMenu`,[Jj,Yj]=Bj(qj),Xj=e=>{let{__scopeMenubar:t,value:n,...r}=e,i=Td(),a=n||i||`LEGACY_REACT_AUTO_VALUE`,o=Gj(qj,t),s=Hj(t),c=V.useRef(null),l=V.useRef(!1),u=o.value===a;return V.useEffect(()=>{u||(l.current=!1)},[u]),(0,H.jsx)(Jj,{scope:t,value:a,triggerId:Td(),triggerRef:c,contentId:Td(),wasKeyboardTriggerOpenRef:l,children:(0,H.jsx)(TD,{...s,open:u,onOpenChange:e=>{e||o.onMenuClose()},modal:!1,dir:o.dir,...r})})};Xj.displayName=qj;var Zj=`MenubarTrigger`,Qj=V.forwardRef((e,t)=>{let{__scopeMenubar:n,disabled:r=!1,...i}=e,a=Uj(n),o=Hj(n),s=Gj(Zj,n),c=Yj(Zj,n),l=V.useRef(null),u=K(t,l,c.triggerRef),[d,f]=V.useState(!1),p=s.value===c.value;return(0,H.jsx)(Lj.ItemSlot,{scope:n,value:c.value,disabled:r,children:(0,H.jsx)(iE,{asChild:!0,...a,focusable:!r,tabStopId:c.value,children:(0,H.jsx)(ED,{asChild:!0,...o,children:(0,H.jsx)(J.button,{type:`button`,role:`menuitem`,id:c.triggerId,"aria-haspopup":`menu`,"aria-expanded":p,"aria-controls":p?c.contentId:void 0,"data-highlighted":d?``:void 0,"data-state":p?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:u,onPointerDown:q(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(s.onMenuOpen(c.value),p||e.preventDefault())}),onPointerEnter:q(e.onPointerEnter,()=>{s.value&&!p&&(s.onMenuOpen(c.value),l.current?.focus())}),onKeyDown:q(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&s.onMenuToggle(c.value),e.key===`ArrowDown`&&s.onMenuOpen(c.value),[`Enter`,` `,`ArrowDown`].includes(e.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))}),onFocus:q(e.onFocus,()=>f(!0)),onBlur:q(e.onBlur,()=>f(!1))})})})})});Qj.displayName=Zj;var $j=`MenubarPortal`,eM=e=>{let{__scopeMenubar:t,...n}=e,r=Hj(t);return(0,H.jsx)(DD,{...r,...n})};eM.displayName=$j;var tM=`MenubarContent`,nM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,align:r=`start`,...i}=e,a=Hj(n),o=Gj(tM,n),s=Yj(tM,n),c=Rj(n),l=V.useRef(!1);return(0,H.jsx)(OD,{id:s.contentId,"aria-labelledby":s.triggerId,"data-radix-menubar-content":``,...a,...i,ref:t,align:r,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{!o.value&&!l.current&&s.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onFocusOutside:q(e.onFocusOutside,e=>{let t=e.target;c().some(e=>e.ref.current?.contains(t))&&e.preventDefault()}),onInteractOutside:q(e.onInteractOutside,()=>{l.current=!0}),onEntryFocus:e=>{s.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:q(e.onKeyDown,e=>{if([`ArrowRight`,`ArrowLeft`].includes(e.key)){let t=e.target,n=t.hasAttribute(`data-radix-menubar-subtrigger`),r=t.closest(`[data-radix-menubar-content]`)!==e.currentTarget,i=(o.dir===`rtl`?`ArrowRight`:`ArrowLeft`)===e.key;if(!i&&n||r&&i)return;let a=c().filter(e=>!e.disabled).map(e=>e.value);i&&a.reverse();let l=a.indexOf(s.value);a=o.loop?DM(a,l+1):a.slice(l+1);let[u]=a;u&&o.onMenuOpen(u)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});nM.displayName=tM;var rM=`MenubarGroup`,iM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(kD,{...i,...r,ref:t})});iM.displayName=rM;var aM=`MenubarLabel`,oM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(AD,{...i,...r,ref:t})});oM.displayName=aM;var sM=`MenubarItem`,cM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(jD,{...i,...r,ref:t})});cM.displayName=sM;var lM=`MenubarCheckboxItem`,uM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(MD,{...i,...r,ref:t})});uM.displayName=lM;var dM=`MenubarRadioGroup`,fM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(ND,{...i,...r,ref:t})});fM.displayName=dM;var pM=`MenubarRadioItem`,mM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(PD,{...i,...r,ref:t})});mM.displayName=pM;var hM=`MenubarItemIndicator`,gM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(FD,{...i,...r,ref:t})});gM.displayName=hM;var _M=`MenubarSeparator`,vM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(ID,{...i,...r,ref:t})});vM.displayName=_M;var yM=`MenubarArrow`,bM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(LD,{...i,...r,ref:t})});bM.displayName=yM;var xM=`MenubarSub`,SM=e=>{let{__scopeMenubar:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Hj(t),[s,c]=md({prop:r,defaultProp:a??!1,onChange:i,caller:xM});return(0,H.jsx)(RD,{...o,open:s,onOpenChange:c,children:n})};SM.displayName=xM;var CM=`MenubarSubTrigger`,wM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(zD,{"data-radix-menubar-subtrigger":``,...i,...r,ref:t})});wM.displayName=CM;var TM=`MenubarSubContent`,EM=V.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Hj(n);return(0,H.jsx)(BD,{...i,"data-radix-menubar-content":``,...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});EM.displayName=TM;function DM(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var OM=Kj,kM=Qj,AM=eM,jM=nM,MM=oM,NM=cM,PM=uM,FM=mM,IM=gM,LM=vM,RM=wM,zM=EM,BM=`Separator`,VM=`horizontal`,HM=[`horizontal`,`vertical`],UM=V.forwardRef((e,t)=>{let{decorative:n,orientation:r=VM,...i}=e,a=WM(r)?r:VM,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,H.jsx)(A_.div,{"data-orientation":a,...s,...i,ref:t})});UM.displayName=BM;function WM(e){return HM.includes(e)}var GM=UM,KM=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),qM=`VisuallyHidden`,JM=V.forwardRef((e,t)=>(0,H.jsx)(J.span,{...e,ref:t,style:{...KM,...e.style}}));JM.displayName=qM;var YM=JM,XM=`NavigationMenu`,[ZM,QM,$M]=dd(XM),[eN,tN,nN]=dd(XM),[rN,iN]=ed(XM,[$M,nN]),[aN,oN]=rN(XM),[sN,cN]=rN(XM),lN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,delayDuration:o=200,skipDelayDuration:s=300,orientation:c=`horizontal`,dir:l,...u}=e,[d,f]=V.useState(null),p=K(t,e=>f(e)),m=Hd(l),h=V.useRef(0),g=V.useRef(0),_=V.useRef(0),[v,y]=V.useState(!0),[b,x]=md({prop:r,onChange:e=>{let t=e!==``,n=s>0;t?(window.clearTimeout(_.current),n&&y(!1)):(window.clearTimeout(_.current),_.current=window.setTimeout(()=>y(!0),s)),i?.(e)},defaultProp:a??``,caller:XM}),S=V.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(``),150)},[x]),C=V.useCallback(e=>{window.clearTimeout(g.current),x(e)},[x]),w=V.useCallback(e=>{b===e?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(e)},o)},[b,x,o]);return V.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(_.current)},[]),(0,H.jsx)(fN,{scope:n,isRootMenu:!0,value:b,dir:m,orientation:c,rootNavigationMenu:d,onTriggerEnter:e=>{window.clearTimeout(h.current),v?w(e):C(e)},onTriggerLeave:()=>{window.clearTimeout(h.current),S()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:S,onItemSelect:e=>{x(t=>t===e?``:e)},onItemDismiss:()=>x(``),children:(0,H.jsx)(J.nav,{"aria-label":`Main`,"data-orientation":c,dir:m,...u,ref:p})})});lN.displayName=XM;var uN=`NavigationMenuSub`,dN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,...s}=e,c=oN(uN,n),[l,u]=md({prop:r,onChange:i,defaultProp:a??``,caller:uN});return(0,H.jsx)(fN,{scope:n,isRootMenu:!1,value:l,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>u(e),onItemSelect:e=>u(e),onItemDismiss:()=>u(``),children:(0,H.jsx)(J.div,{"data-orientation":o,...s,ref:t})})});dN.displayName=uN;var fN=e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,children:o,value:s,onItemSelect:c,onItemDismiss:l,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:p}=e,[m,h]=V.useState(null),[g,_]=V.useState(new Map),[v,y]=V.useState(null);return(0,H.jsx)(aN,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:ly(s),baseId:Td(),dir:i,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:v,onIndicatorTrackChange:y,onTriggerEnter:Zp(u),onTriggerLeave:Zp(d),onContentEnter:Zp(f),onContentLeave:Zp(p),onItemSelect:Zp(c),onItemDismiss:Zp(l),onViewportContentChange:V.useCallback((e,t)=>{_(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:V.useCallback(e=>{_(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,H.jsx)(ZM.Provider,{scope:t,children:(0,H.jsx)(sN,{scope:t,items:g,children:o})})})},pN=`NavigationMenuList`,mN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=oN(pN,n),a=(0,H.jsx)(J.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,H.jsx)(J.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,H.jsx)(ZM.Slot,{scope:n,children:i.isRootMenu?(0,H.jsx)(IN,{asChild:!0,children:a}):a})})});mN.displayName=pN;var hN=`NavigationMenuItem`,[gN,_N]=rN(hN),vN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...i}=e,a=Td(),o=r||a||`LEGACY_REACT_AUTO_VALUE`,s=V.useRef(null),c=V.useRef(null),l=V.useRef(null),u=V.useRef(()=>{}),d=V.useRef(!1),f=V.useCallback((e=`start`)=>{if(s.current){u.current();let t=BN(s.current);t.length&&VN(e===`start`?t:t.reverse())}},[]),p=V.useCallback(()=>{if(s.current){let e=BN(s.current);e.length&&(u.current=HN(e))}},[]);return(0,H.jsx)(gN,{scope:n,value:o,triggerRef:c,contentRef:s,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,H.jsx)(J.li,{...i,ref:t})})});vN.displayName=hN;var yN=`NavigationMenuTrigger`,bN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=oN(yN,e.__scopeNavigationMenu),o=_N(yN,e.__scopeNavigationMenu),s=V.useRef(null),c=K(s,o.triggerRef,t),l=GN(a.baseId,o.value),u=KN(a.baseId,o.value),d=V.useRef(!1),f=V.useRef(!1),p=o.value===a.value;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ZM.ItemSlot,{scope:n,value:o.value,children:(0,H.jsx)(zN,{asChild:!0,children:(0,H.jsx)(J.button,{id:l,disabled:r,"data-disabled":r?``:void 0,"data-state":WN(p),"aria-expanded":p,"aria-controls":u,...i,ref:c,onPointerEnter:q(e.onPointerEnter,()=>{f.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:q(e.onPointerMove,qN(()=>{r||f.current||o.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:q(e.onPointerLeave,qN(()=>{r||(a.onTriggerLeave(),d.current=!1)})),onClick:q(e.onClick,()=>{a.onItemSelect(o.value),f.current=p}),onKeyDown:q(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:a.dir===`rtl`?`ArrowLeft`:`ArrowRight`}[a.orientation];p&&e.key===t&&(o.onEntryKeyDown(),e.preventDefault())})})})}),p&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(YM,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:e=>{let t=o.contentRef.current,n=e.relatedTarget,r=n===s.current,i=t?.contains(n);(r||!i)&&o.onFocusProxyEnter(r?`start`:`end`)}}),a.viewport&&(0,H.jsx)(`span`,{"aria-owns":u})]})]})});bN.displayName=yN;var xN=`NavigationMenuLink`,SN=`navigationMenu.linkSelect`,CN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,H.jsx)(zN,{asChild:!0,children:(0,H.jsx)(J.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:q(e.onClick,e=>{let t=e.target,n=new CustomEvent(SN,{bubbles:!0,cancelable:!0});t.addEventListener(SN,e=>i?.(e),{once:!0}),_d(t,n),!n.defaultPrevented&&!e.metaKey&&_d(t,new CustomEvent(AN,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});CN.displayName=xN;var wN=`NavigationMenuIndicator`,TN=V.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=oN(wN,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?Au.createPortal((0,H.jsx)(yd,{present:n||a,children:(0,H.jsx)(EN,{...r,ref:t})}),i.indicatorTrack):null});TN.displayName=wN;var EN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=oN(wN,n),a=QM(n),[o,s]=V.useState(null),[c,l]=V.useState(null),u=i.orientation===`horizontal`,d=!!i.value;V.useEffect(()=>{let e=a().find(e=>e.value===i.value)?.ref.current;e&&s(e)},[a,i.value]);let f=()=>{o&&l({size:u?o.offsetWidth:o.offsetHeight,offset:u?o.offsetLeft:o.offsetTop})};return UN(o,f),UN(i.indicatorTrack,f),c?(0,H.jsx)(J.div,{"aria-hidden":!0,"data-state":d?`visible`:`hidden`,"data-orientation":i.orientation,...r,ref:t,style:{position:`absolute`,...u?{left:0,width:c.size+`px`,transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+`px`,transform:`translateY(${c.offset}px)`},...r.style}}):null}),DN=`NavigationMenuContent`,ON=V.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=oN(DN,e.__scopeNavigationMenu),a=_N(DN,e.__scopeNavigationMenu),o=K(a.contentRef,t),s=a.value===i.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?(0,H.jsx)(kN,{forceMount:n,...c,ref:o}):(0,H.jsx)(yd,{present:n||s,children:(0,H.jsx)(jN,{"data-state":WN(s),...c,ref:o,onPointerEnter:q(e.onPointerEnter,i.onContentEnter),onPointerLeave:q(e.onPointerLeave,qN(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})});ON.displayName=DN;var kN=V.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=oN(DN,e.__scopeNavigationMenu);return fd(()=>{n(e.value,{ref:t,...e})},[e,t,n]),fd(()=>()=>r(e.value),[e.value,r]),null}),AN=`navigationMenu.rootContentDismiss`,jN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:o,onRootContentClose:s,onContentFocusOutside:c,...l}=e,u=oN(DN,n),d=V.useRef(null),f=K(d,t),p=GN(u.baseId,r),m=KN(u.baseId,r),h=QM(n),g=V.useRef(null),{onItemDismiss:_}=u;V.useEffect(()=>{let e=d.current;if(u.isRootMenu&&e){let t=()=>{_(),s(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(AN,t),()=>e.removeEventListener(AN,t)}},[u.isRootMenu,e.value,i,_,s]);let v=V.useMemo(()=>{let e=h().map(e=>e.value);u.dir===`rtl`&&e.reverse();let t=e.indexOf(u.value),n=e.indexOf(u.previousValue),i=r===u.value,a=n===e.indexOf(r);if(!i&&!a)return g.current;let o=(()=>{if(t!==n){if(i&&n!==-1)return t>n?`from-end`:`from-start`;if(a&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return g.current=o,o},[u.previousValue,u.value,u.dir,h,r]);return(0,H.jsx)(IN,{asChild:!0,children:(0,H.jsx)(am,{id:m,"aria-labelledby":p,"data-motion":v,"data-orientation":u.orientation,...l,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(AN,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(e)},onFocusOutside:q(e.onFocusOutside,e=>{c();let t=e.target;u.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:q(e.onPointerDownOutside,e=>{let t=e.target,n=h().some(e=>e.ref.current?.contains(t)),r=u.isRootMenu&&u.viewport?.contains(t);(n||r||!u.isRootMenu)&&e.preventDefault()}),onKeyDown:q(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=BN(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);VN(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:q(e.onEscapeKeyDown,e=>{o.current=!0})})})}),MN=`NavigationMenuViewport`,NN=V.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=!!oN(MN,e.__scopeNavigationMenu).value;return(0,H.jsx)(yd,{present:n||i,children:(0,H.jsx)(PN,{...r,ref:t})})});NN.displayName=MN;var PN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,a=oN(MN,n),o=K(t,a.onViewportChange),s=cN(DN,e.__scopeNavigationMenu),[c,l]=V.useState(null),[u,d]=V.useState(null),f=c?c?.width+`px`:void 0,p=c?c?.height+`px`:void 0,m=!!a.value,h=m?a.value:a.previousValue;return UN(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),(0,H.jsx)(J.div,{"data-state":WN(m),"data-orientation":a.orientation,...i,ref:o,style:{pointerEvents:!m&&a.isRootMenu?`none`:void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":p,...i.style},onPointerEnter:q(e.onPointerEnter,a.onContentEnter),onPointerLeave:q(e.onPointerLeave,qN(a.onContentLeave)),children:Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=h===e;return(0,H.jsx)(yd,{present:n||i,children:(0,H.jsx)(jN,{...r,ref:rd(t,e=>{i&&e&&d(e)})})},e)})})}),FN=`FocusGroup`,IN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=oN(FN,n);return(0,H.jsx)(eN.Provider,{scope:n,children:(0,H.jsx)(eN.Slot,{scope:n,children:(0,H.jsx)(J.div,{dir:i.dir,...r,ref:t})})})}),LN=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],RN=`FocusGroupItem`,zN=V.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=tN(n),a=oN(RN,n);return(0,H.jsx)(eN.ItemSlot,{scope:n,children:(0,H.jsx)(J.button,{...r,ref:t,onKeyDown:q(e.onKeyDown,e=>{if([`Home`,`End`,...LN].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),LN.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>VN(t)),e.preventDefault()}})})})});function BN(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function VN(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}function HN(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}function UN(e,t){let n=Zp(t);fd(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function WN(e){return e?`open`:`closed`}function GN(e,t){return`${e}-trigger-${t}`}function KN(e,t){return`${e}-content-${t}`}function qN(e){return t=>t.pointerType===`mouse`?e(t):void 0}var JN=lN,YN=mN,XN=bN,ZN=TN,QN=ON,$N=NN,eP=`Progress`,tP=100,[nP,rP]=N_(eP),[iP,aP]=nP(eP),oP=V.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=lP,...o}=e;(i||i===0)&&!fP(i)&&console.error(mP(`${i}`,`Progress`));let s=fP(i)?i:tP;r!==null&&!pP(r,s)&&console.error(hP(`${r}`,`Progress`));let c=pP(r,s)?r:null,l=dP(c)?a(c,s):void 0;return(0,H.jsx)(iP,{scope:n,value:c,max:s,children:(0,H.jsx)(A_.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":dP(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":uP(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});oP.displayName=eP;var sP=`ProgressIndicator`,cP=V.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=aP(sP,n);return(0,H.jsx)(A_.div,{"data-state":uP(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});cP.displayName=sP;function lP(e,t){return`${Math.round(e/t*100)}%`}function uP(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function dP(e){return typeof e==`number`}function fP(e){return dP(e)&&!isNaN(e)&&e>0}function pP(e,t){return dP(e)&&!isNaN(e)&&e<=t&&e>=0}function mP(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${tP}\`.`}function hP(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
102
|
-
- a positive number
|
|
103
|
-
- less than the value passed to \`max\` (or ${tP} if no \`max\` prop is set)
|
|
104
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
105
|
-
|
|
106
|
-
Defaulting to \`null\`.`}var gP=oP,_P=cP,vP=`Radio`,[yP,bP]=ed(vP),[xP,SP]=yP(vP),CP=V.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=V.useState(null),p=K(t,e=>f(e)),m=V.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,H.jsxs)(xP,{scope:n,checked:i,disabled:o,children:[(0,H.jsx)(J.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":OP(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:q(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,H.jsx)(DP,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});CP.displayName=vP;var wP=`RadioIndicator`,TP=V.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=SP(wP,n);return(0,H.jsx)(yd,{present:r||a.checked,children:(0,H.jsx)(J.span,{"data-state":OP(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});TP.displayName=wP;var EP=`RadioBubbleInput`,DP=V.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=V.useRef(null),s=K(o,a),c=ly(n),l=uy(t);return V.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,H.jsx)(J.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});DP.displayName=EP;function OP(e){return e?`checked`:`unchecked`}var kP=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],AP=`RadioGroup`,[jP,MP]=ed(AP,[GT,bP]),NP=GT(),PP=bP(),[FP,IP]=jP(AP),LP=V.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=NP(n),m=Hd(l),[h,g]=md({prop:a,defaultProp:i??null,onChange:d,caller:AP});return(0,H.jsx)(FP,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,H.jsx)(rE,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,H.jsx)(J.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});LP.displayName=AP;var RP=`RadioGroupItem`,zP=V.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=IP(RP,n),o=a.disabled||r,s=NP(n),c=PP(n),l=V.useRef(null),u=K(t,l),d=a.value===i.value,f=V.useRef(!1);return V.useEffect(()=>{let e=e=>{kP.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,H.jsx)(iE,{asChild:!0,...s,focusable:!o,active:d,children:(0,H.jsx)(CP,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:q(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:q(i.onFocus,()=>{f.current&&l.current?.click()})})})});zP.displayName=RP;var BP=`RadioGroupIndicator`,VP=V.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(TP,{...PP(n),...r,ref:t})});VP.displayName=BP;var HP=LP,UP=zP,WP=VP,GP=(0,V.createContext)(null);GP.displayName=`PanelGroupContext`;var KP={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},qP=10,JP=V.useLayoutEffect,YP=V.useId,XP=typeof YP==`function`?YP:()=>null,ZP=0;function QP(e=null){let t=XP(),n=(0,V.useRef)(e||t||null);return n.current===null&&(n.current=``+ ZP++),e??n.current}function $P({children:e,className:t=``,collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:a,id:o,maxSize:s,minSize:c,onCollapse:l,onExpand:u,onResize:d,order:f,style:p,tagName:m=`div`,...h}){let g=(0,V.useContext)(GP);if(g===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:_,expandPanel:v,getPanelSize:y,getPanelStyle:b,groupId:x,isPanelCollapsed:S,reevaluatePanelConstraints:C,registerPanel:w,resizePanel:T,unregisterPanel:E}=g,D=QP(o),O=(0,V.useRef)({callbacks:{onCollapse:l,onExpand:u,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:c},id:D,idIsFromProps:o!==void 0,order:f});(0,V.useRef)({didLogMissingDefaultSizeWarning:!1}),JP(()=>{let{callbacks:e,constraints:t}=O.current,a={...t};O.current.id=D,O.current.idIsFromProps=o!==void 0,O.current.order=f,e.onCollapse=l,e.onExpand=u,e.onResize=d,t.collapsedSize=n,t.collapsible=r,t.defaultSize=i,t.maxSize=s,t.minSize=c,(a.collapsedSize!==t.collapsedSize||a.collapsible!==t.collapsible||a.maxSize!==t.maxSize||a.minSize!==t.minSize)&&C(O.current,a)}),JP(()=>{let e=O.current;return w(e),()=>{E(e)}},[f,D,w,E]),(0,V.useImperativeHandle)(a,()=>({collapse:()=>{_(O.current)},expand:e=>{v(O.current,e)},getId(){return D},getSize(){return y(O.current)},isCollapsed(){return S(O.current)},isExpanded(){return!S(O.current)},resize:e=>{T(O.current,e)}}),[_,v,y,S,D,T]);let k=b(O.current,i);return(0,V.createElement)(m,{...h,children:e,className:t,id:D,style:{...k,...p},[KP.groupId]:x,[KP.panel]:``,[KP.panelCollapsible]:r||void 0,[KP.panelId]:D,[KP.panelSize]:parseFloat(``+k.flexGrow).toFixed(1)})}var eF=(0,V.forwardRef)((e,t)=>(0,V.createElement)($P,{...e,forwardedRef:t}));$P.displayName=`Panel`,eF.displayName=`forwardRef(Panel)`;var tF;function nF(){return tF}var rF=null,iF=!0,aF=null,oF=-1,sF=null;function cF(e,t,n){let r=(t&TF)!==0,i=(t&EF)!==0,a=(t&DF)!==0,o=(t&OF)!==0;if(aF)return aF({exceedsHorizontalMaximum:i,exceedsHorizontalMinimum:r,exceedsVerticalMaximum:o,exceedsVerticalMinimum:a,intersectsHorizontalDragHandle:e===`horizontal`||e===`intersection`,intersectsVerticalDragHandle:e===`vertical`||e===`intersection`,isPointerDown:n});if(t){if(r)return a?`se-resize`:o?`ne-resize`:`e-resize`;if(i)return a?`sw-resize`:o?`nw-resize`:`w-resize`;if(a)return`s-resize`;if(o)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function lF(){sF!==null&&(document.head.removeChild(sF),rF=null,sF=null,oF=-1)}function uF(e,t,n){if(!iF)return;let r=cF(e,t,n);if(rF!==r){if(rF=r,sF===null){sF=document.createElement(`style`);let e=nF();e&&sF.setAttribute(`nonce`,e),document.head.appendChild(sF)}if(oF>=0){var i;(i=sF.sheet)==null||i.removeRule(oF)}oF=sF.sheet?.insertRule(`*{cursor: ${r} !important;}`)??-1}}function dF(e){return e.type===`keydown`}function fF(e){return e.type.startsWith(`pointer`)}function pF(e){return e.type.startsWith(`mouse`)}function mF(e){if(fF(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(pF(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function hF(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function gF(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function _F(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:CF(e),b:CF(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Q(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:SF(xF(n.a)),b:SF(xF(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var vF=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function yF(e){let t=getComputedStyle(wF(e)??e).display;return t===`flex`||t===`inline-flex`}function bF(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||yF(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||vF.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function xF(e){let t=e.length;for(;t--;){let n=e[t];if(Q(n,`Missing node`),bF(n))return n}return null}function SF(e){return e&&Number(getComputedStyle(e).zIndex)||0}function CF(e){let t=[];for(;e;)t.push(e),e=wF(e);return t}function wF(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var TF=1,EF=2,DF=4,OF=8,kF=hF()===`coarse`,AF=[],jF=!1,MF=new Map,NF=new Map,PF=new Set;function FF(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=MF.get(a)??0;return MF.set(a,s+1),PF.add(o),WF(),function(){NF.delete(e),PF.delete(o);let t=MF.get(a)??1;if(MF.set(a,t-1),WF(),t===1&&MF.delete(a),AF.includes(o)){let e=AF.indexOf(o);e>=0&&AF.splice(e,1),HF(),i(`up`,!0,null)}}}function IF(e){let{target:t}=e,{x:n,y:r}=mF(e);jF=!0,BF({target:t,x:n,y:r}),WF(),AF.length>0&&(GF(`down`,e),HF(),e.preventDefault(),zF(t)||e.stopImmediatePropagation())}function LF(e){let{x:t,y:n}=mF(e);if(jF&&e.type!==`pointerleave`&&e.buttons===0&&(jF=!1,GF(`up`,e)),!jF){let{target:r}=e;BF({target:r,x:t,y:n})}GF(`move`,e),HF(),AF.length>0&&e.preventDefault()}function RF(e){let{target:t}=e,{x:n,y:r}=mF(e);NF.clear(),jF=!1,AF.length>0&&(e.preventDefault(),zF(t)||e.stopImmediatePropagation()),GF(`up`,e),BF({target:t,x:n,y:r}),HF(),WF()}function zF(e){let t=e;for(;t;){if(t.hasAttribute(KP.resizeHandle))return!0;t=t.parentElement}return!1}function BF({target:e,x:t,y:n}){AF.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),PF.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=kF?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&_F(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(gF(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}AF.push(e)}})}function VF(e,t){NF.set(e,t)}function HF(){let e=!1,t=!1;AF.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;NF.forEach(e=>{n|=e}),e&&t?uF(`intersection`,n,jF):e?uF(`horizontal`,n,jF):t?uF(`vertical`,n,jF):lF()}var UF;function WF(){var e;(e=UF)==null||e.abort(),UF=new AbortController;let t={capture:!0,signal:UF.signal};PF.size&&(jF?(AF.length>0&&MF.forEach((e,n)=>{let{body:r}=n;e>0&&(r.addEventListener(`contextmenu`,RF,t),r.addEventListener(`pointerleave`,LF,t),r.addEventListener(`pointermove`,LF,t))}),MF.forEach((e,n)=>{let{body:r}=n;r.addEventListener(`pointerup`,RF,t),r.addEventListener(`pointercancel`,RF,t)})):MF.forEach((e,n)=>{let{body:r}=n;e>0&&(r.addEventListener(`pointerdown`,IF,t),r.addEventListener(`pointermove`,LF,t))}))}function GF(e,t){PF.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,AF.includes(n),t)})}function KF(){let[e,t]=(0,V.useState)(0);return(0,V.useCallback)(()=>t(e=>e+1),[])}function Q(e,t){if(!e)throw console.error(t),Error(t)}function qF(e,t,n=qP){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function JF(e,t,n=qP){return qF(e,t,n)===0}function YF(e,t,n){return qF(e,t,n)===0}function XF(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!YF(i,a,n))return!1}return!0}function ZF({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];Q(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:s=0}=r;if(qF(n,s)<0)if(a){let e=(i+s)/2;n=qF(n,e)<0?i:s}else n=s;return n=Math.min(o,n),n=parseFloat(n.toFixed(qP)),n}function QF({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(YF(e,0))return t;let o=[...t],[s,c]=r;Q(s!=null,`Invalid first pivot index`),Q(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];Q(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(Q(n!=null,`Previous layout not found for panel index ${r}`),YF(n,a)){let t=l-n;qF(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];Q(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(Q(n!=null,`Previous layout not found for panel index ${r}`),YF(n,l)){let t=n-a;qF(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];Q(e!=null,`Previous layout not found for panel index ${i}`);let o=ZF({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];Q(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=ZF({panelConstraints:n,panelIndex:r,size:s});if(!YF(a,c)&&(l+=a-c,o[r]=c,l.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(XF(i,o))return i;{let r=e<0?c:s,i=t[r];Q(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=ZF({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!YF(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];Q(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=ZF({panelConstraints:n,panelIndex:r,size:a});if(YF(i,s)||(t-=s-i,o[r]=s),YF(t,0))break;e>0?r--:r++}}}return YF(o.reduce((e,t)=>t+e,0),100)?o:i}function $F({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return Q(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function eI(e,t=document){return Array.from(t.querySelectorAll(`[${KP.resizeHandleId}][data-panel-group-id="${e}"]`))}function tI(e,t,n=document){return eI(e,n).findIndex(e=>e.getAttribute(KP.resizeHandleId)===t)??null}function nI(e,t,n){let r=tI(e,t,n);return r==null?[-1,-1]:[r,r+1]}function rI(e){return e instanceof HTMLElement?!0:typeof e==`object`&&!!e&&`tagName`in e&&`getAttribute`in e}function iI(e,t=document){return rI(t)&&t.dataset.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function aI(e,t=document){return t.querySelector(`[${KP.resizeHandleId}="${e}"]`)||null}function oI(e,t,n,r=document){let i=aI(t,r),a=eI(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function sI({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:a,setLayout:o}){(0,V.useRef)({didWarnAboutMissingResizeHandle:!1}),JP(()=>{if(!a)return;let e=eI(n,a);for(let t=0;t<i.length-1;t++){let{valueMax:n,valueMin:a,valueNow:o}=$F({layout:r,panelsArray:i,pivotIndices:[t,t+1]}),s=e[t];if(s!=null){let e=i[t];Q(e,`No panel data found for index "${t}"`),s.setAttribute(`aria-controls`,e.id),s.setAttribute(`aria-valuemax`,``+Math.round(n)),s.setAttribute(`aria-valuemin`,``+Math.round(a)),s.setAttribute(`aria-valuenow`,o==null?``:``+Math.round(o))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[n,r,i,a]),(0,V.useEffect)(()=>{if(!a)return;let e=t.current;Q(e,`Eager values not found`);let{panelDataArray:i}=e;Q(iI(n,a)!=null,`No group found for id "${n}"`);let s=eI(n,a);Q(s,`No resize handles found for group id "${n}"`);let c=s.map(e=>{let t=e.getAttribute(KP.resizeHandleId);Q(t,`Resize handle element has no handle id attribute`);let[s,c]=oI(n,t,i,a);if(s==null||c==null)return()=>{};let l=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let c=i.findIndex(e=>e.id===s);if(c>=0){let e=i[c];Q(e,`No panel data found for index ${c}`);let s=r[c],{collapsedSize:l=0,collapsible:u,minSize:d=0}=e.constraints;if(s!=null&&u){let e=QF({delta:YF(s,l)?d-l:l-s,initialLayout:r,panelConstraints:i.map(e=>e.constraints),pivotIndices:nI(n,t,a),prevLayout:r,trigger:`keyboard`});r!==e&&o(e)}}break}}};return e.addEventListener(`keydown`,l),()=>{e.removeEventListener(`keydown`,l)}});return()=>{c.forEach(e=>e())}},[a,e,t,n,r,i,o])}function cI(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function lI(e,t){let n=e===`horizontal`,{x:r,y:i}=mF(t);return n?r:i}function uI(e,t,n,r,i){let a=n===`horizontal`,o=aI(t,i);Q(o,`No resize handle element found for id "${t}"`);let s=o.getAttribute(KP.groupId);Q(s,`Resize handle element has no group id attribute`);let{initialCursorPosition:c}=r,l=lI(n,e),u=iI(s,i);Q(u,`No group element found for id "${s}"`);let d=u.getBoundingClientRect(),f=a?d.width:d.height;return(l-c)/f*100}function dI(e,t,n,r,i,a){if(dF(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100;break}return a}else return r==null?0:uI(e,t,n,r,a)}function fI({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];Q(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];Q(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function pI(e,t,n){t.forEach((t,r)=>{let i=e[r];Q(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||JF(u,c))&&!JF(t,c)&&r(),e&&(u==null||!JF(u,c))&&JF(t,c)&&e())}})}function mI(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function hI({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toFixed(a):r.length===1?`1`:o.toFixed(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function gI(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function _I(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function vI(e){return`react-resizable-panels:${e}`}function yI(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function bI(e,t){try{let n=vI(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function xI(e,t,n){return(bI(e,n)??{})[yI(t)]??null}function SI(e,t,n,r,i){let a=vI(e),o=yI(t),s=bI(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function CI({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!YF(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];Q(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];Q(r!=null,`No layout data found for index ${e}`);let a=ZF({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!YF(i,0))for(let e=0;e<t.length;e++){let r=n[e];Q(r!=null,`No layout data found for index ${e}`);let a=r+i,o=ZF({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,YF(i,0)))break}return n}var wI=100,TI={getItem:e=>(_I(TI),TI.getItem(e)),setItem:(e,t)=>{_I(TI),TI.setItem(e,t)}},EI={};function DI({autoSaveId:e=null,children:t,className:n=``,direction:r,forwardedRef:i,id:a=null,onLayout:o=null,keyboardResizeBy:s=null,storage:c=TI,style:l,tagName:u=`div`,...d}){let f=QP(a),p=(0,V.useRef)(null),[m,h]=(0,V.useState)(null),[g,_]=(0,V.useState)([]),v=KF(),y=(0,V.useRef)({}),b=(0,V.useRef)(new Map),x=(0,V.useRef)(0),S=(0,V.useRef)({autoSaveId:e,direction:r,dragState:m,id:f,keyboardResizeBy:s,onLayout:o,storage:c}),C=(0,V.useRef)({layout:g,panelDataArray:[],panelDataArrayChanged:!1});(0,V.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,V.useImperativeHandle)(i,()=>({getId:()=>S.current.id,getLayout:()=>{let{layout:e}=C.current;return e},setLayout:e=>{let{onLayout:t}=S.current,{layout:n,panelDataArray:r}=C.current,i=CI({layout:e,panelConstraints:r.map(e=>e.constraints)});cI(n,i)||(_(i),C.current.layout=i,t&&t(i),pI(r,i,y.current))}}),[]),JP(()=>{S.current.autoSaveId=e,S.current.direction=r,S.current.dragState=m,S.current.id=f,S.current.onLayout=o,S.current.storage=c}),sI({committedValuesRef:S,eagerValuesRef:C,groupId:f,layout:g,panelDataArray:C.current.panelDataArray,setLayout:_,panelGroupElement:p.current}),(0,V.useEffect)(()=>{let{panelDataArray:t}=C.current;if(e){if(g.length===0||g.length!==t.length)return;let n=EI[e];n??(n=gI(SI,wI),EI[e]=n);let r=[...t],i=new Map(b.current);n(e,r,i,g,c)}},[e,g,c]),(0,V.useEffect)(()=>{});let w=(0,V.useCallback)(e=>{let{onLayout:t}=S.current,{layout:n,panelDataArray:r}=C.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=AI(r,e,n);if(Q(o!=null,`Panel size not found for panel "${e.id}"`),!JF(o,a)){b.current.set(e.id,o);let c=QF({delta:kI(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});mI(n,c)||(_(c),C.current.layout=c,t&&t(c),pI(r,c,y.current))}}},[]),T=(0,V.useCallback)((e,t)=>{let{onLayout:n}=S.current,{layout:r,panelDataArray:i}=C.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=AI(i,e,r),u=t??c;if(JF(s,o)){let t=b.current.get(e.id),o=t!=null&&t>=u?t:u,c=QF({delta:kI(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});mI(r,c)||(_(c),C.current.layout=c,n&&n(c),pI(i,c,y.current))}}},[]),E=(0,V.useCallback)(e=>{let{layout:t,panelDataArray:n}=C.current,{panelSize:r}=AI(n,e,t);return Q(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),D=(0,V.useCallback)((e,t)=>{let{panelDataArray:n}=C.current;return hI({defaultSize:t,dragState:m,layout:g,panelData:n,panelIndex:kI(n,e)})},[m,g]),O=(0,V.useCallback)(e=>{let{layout:t,panelDataArray:n}=C.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=AI(n,e,t);return Q(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&JF(a,r)},[]),k=(0,V.useCallback)(e=>{let{layout:t,panelDataArray:n}=C.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=AI(n,e,t);return Q(a!=null,`Panel size not found for panel "${e.id}"`),!i||qF(a,r)>0},[]),A=(0,V.useCallback)(e=>{let{panelDataArray:t}=C.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),C.current.panelDataArrayChanged=!0,v()},[v]);JP(()=>{if(C.current.panelDataArrayChanged){C.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=S.current,{layout:r,panelDataArray:i}=C.current,a=null;if(e){let t=xI(e,i,n);t&&(b.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=fI({panelDataArray:i});let o=CI({layout:a,panelConstraints:i.map(e=>e.constraints)});cI(r,o)||(_(o),C.current.layout=o,t&&t(o),pI(i,o,y.current))}}),JP(()=>{let e=C.current;return()=>{e.layout=[]}},[]);let j=(0,V.useCallback)(e=>{let t=!1,n=p.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=p.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=S.current,{layout:l,panelDataArray:u}=C.current,{initialLayout:d}=a??{},f=nI(o,e,r),m=dI(n,e,i,a,s,r),h=i===`horizontal`;h&&t&&(m=-m);let g=u.map(e=>e.constraints),v=QF({delta:m,initialLayout:d??l,panelConstraints:g,pivotIndices:f,prevLayout:l,trigger:dF(n)?`keyboard`:`mouse-or-touch`}),b=!mI(l,v);(fF(n)||pF(n))&&x.current!=m&&(x.current=m,!b&&m!==0?h?VF(e,m<0?TF:EF):VF(e,m<0?DF:OF):VF(e,0)),b&&(_(v),C.current.layout=v,c&&c(v),pI(u,v,y.current))}},[]),M=(0,V.useCallback)((e,t)=>{let{onLayout:n}=S.current,{layout:r,panelDataArray:i}=C.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=AI(i,e,r);Q(o!=null,`Panel size not found for panel "${e.id}"`);let c=QF({delta:kI(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});mI(r,c)||(_(c),C.current.layout=c,n&&n(c),pI(i,c,y.current))},[]),N=(0,V.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=C.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=AI(r,e,n);u!=null&&(a&&s&&JF(u,i)?JF(i,o)||M(e,o):u<l?M(e,l):u>c&&M(e,c))},[M]),P=(0,V.useCallback)((e,t)=>{let{direction:n}=S.current,{layout:r}=C.current;if(!p.current)return;let i=aI(e,p.current);Q(i,`Drag handle element not found for id "${e}"`);let a=lI(n,t);h({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),ee=(0,V.useCallback)(()=>{h(null)},[]),F=(0,V.useCallback)(e=>{let{panelDataArray:t}=C.current,n=kI(t,e);n>=0&&(t.splice(n,1),delete y.current[e.id],C.current.panelDataArrayChanged=!0,v())},[v]),I=(0,V.useMemo)(()=>({collapsePanel:w,direction:r,dragState:m,expandPanel:T,getPanelSize:E,getPanelStyle:D,groupId:f,isPanelCollapsed:O,isPanelExpanded:k,reevaluatePanelConstraints:N,registerPanel:A,registerResizeHandle:j,resizePanel:M,startDragging:P,stopDragging:ee,unregisterPanel:F,panelGroupElement:p.current}),[w,m,r,T,E,D,f,O,k,N,A,j,M,P,ee,F]),te={display:`flex`,flexDirection:r===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return(0,V.createElement)(GP.Provider,{value:I},(0,V.createElement)(u,{...d,children:t,className:n,id:a,ref:p,style:{...te,...l},[KP.group]:``,[KP.groupDirection]:r,[KP.groupId]:f}))}var OI=(0,V.forwardRef)((e,t)=>(0,V.createElement)(DI,{...e,forwardedRef:t}));DI.displayName=`PanelGroup`,OI.displayName=`forwardRef(PanelGroup)`;function kI(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function AI(e,t,n){let r=kI(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function jI({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,V.useEffect)(()=>{if(e||n==null||r==null)return;let i=aI(t,r);if(i==null)return;let a=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),n(e);break;case`F6`:{e.preventDefault();let n=i.getAttribute(KP.groupId);Q(n,`No group element found for id "${n}"`);let a=eI(n,r),o=tI(n,t,r);Q(o!==null,`No resize element found for id "${t}"`),a[e.shiftKey?o>0?o-1:a.length-1:o+1<a.length?o+1:0].focus();break}}};return i.addEventListener(`keydown`,a),()=>{i.removeEventListener(`keydown`,a)}},[r,e,t,n])}function MI({children:e=null,className:t=``,disabled:n=!1,hitAreaMargins:r,id:i,onBlur:a,onClick:o,onDragging:s,onFocus:c,onPointerDown:l,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p=`div`,...m}){let h=(0,V.useRef)(null),g=(0,V.useRef)({onClick:o,onDragging:s,onPointerDown:l,onPointerUp:u});(0,V.useEffect)(()=>{g.current.onClick=o,g.current.onDragging=s,g.current.onPointerDown=l,g.current.onPointerUp=u});let _=(0,V.useContext)(GP);if(_===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:v,groupId:y,registerResizeHandle:b,startDragging:x,stopDragging:S,panelGroupElement:C}=_,w=QP(i),[T,E]=(0,V.useState)(`inactive`),[D,O]=(0,V.useState)(!1),[k,A]=(0,V.useState)(null),j=(0,V.useRef)({state:T});JP(()=>{j.current.state=T}),(0,V.useEffect)(()=>{if(n)A(null);else{let e=b(w);A(()=>e)}},[n,w,b]);let M=r?.coarse??15,N=r?.fine??5;(0,V.useEffect)(()=>{if(n||k==null)return;let e=h.current;Q(e,`Element ref not attached`);let t=!1;return FF(w,e,v,{coarse:M,fine:N},(e,n,r)=>{if(!n){E(`inactive`);return}switch(e){case`down`:{E(`drag`),t=!1,Q(r,`Expected event to be defined for "down" action`),x(w,r);let{onDragging:e,onPointerDown:n}=g.current;e?.(!0),n?.();break}case`move`:{let{state:e}=j.current;t=!0,e!==`drag`&&E(`hover`),Q(r,`Expected event to be defined for "move" action`),k(r);break}case`up`:{E(`hover`),S();let{onClick:e,onDragging:n,onPointerUp:r}=g.current;n?.(!1),r?.(),t||e?.();break}}})},[M,v,n,N,b,w,k,x,S]),jI({disabled:n,handleId:w,resizeHandler:k,panelGroupElement:C});let P={touchAction:`none`,userSelect:`none`};return(0,V.createElement)(p,{...m,children:e,className:t,id:i,onBlur:()=>{O(!1),a?.()},onFocus:()=>{O(!0),c?.()},ref:h,role:`separator`,style:{...P,...d},tabIndex:f,[KP.groupDirection]:v,[KP.groupId]:y,[KP.resizeHandle]:``,[KP.resizeHandleActive]:T===`drag`?`pointer`:D?`keyboard`:void 0,[KP.resizeHandleEnabled]:!n,[KP.resizeHandleId]:w,[KP.resizeHandleState]:T})}MI.displayName=`PanelResizeHandle`;function NI(e,[t,n]){return Math.min(n,Math.max(t,e))}function PI(e,t){return V.useReducer((e,n)=>t[e][n]??e,e)}var FI=`ScrollArea`,[II,LI]=ed(FI),[RI,zI]=II(FI),BI=V.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=V.useState(null),[l,u]=V.useState(null),[d,f]=V.useState(null),[p,m]=V.useState(null),[h,g]=V.useState(null),[_,v]=V.useState(0),[y,b]=V.useState(0),[x,S]=V.useState(!1),[C,w]=V.useState(!1),T=K(t,e=>c(e)),E=Hd(i);return(0,H.jsx)(RI,{scope:n,type:r,dir:E,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,children:(0,H.jsx)(J.div,{dir:E,...o,ref:T,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":y+`px`,...e.style}})})});BI.displayName=FI;var VI=`ScrollAreaViewport`,HI=V.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=zI(VI,n),s=K(t,V.useRef(null),o.onViewportChange);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,H.jsx)(J.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,H.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});HI.displayName=VI;var UI=`ScrollAreaScrollbar`,WI=V.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=zI(UI,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return V.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,H.jsx)(GI,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,H.jsx)(KI,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,H.jsx)(qI,{...r,ref:t,forceMount:n}):i.type===`always`?(0,H.jsx)(JI,{...r,ref:t}):null});WI.displayName=UI;var GI=V.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=zI(UI,e.__scopeScrollArea),[a,o]=V.useState(!1);return V.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,H.jsx)(yd,{present:n||a,children:(0,H.jsx)(qI,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),KI=V.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=zI(UI,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=mL(()=>c(`SCROLL_END`),100),[s,c]=PI(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return V.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),V.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,H.jsx)(yd,{present:n||s!==`hidden`,children:(0,H.jsx)(JI,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:q(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:q(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),qI=V.forwardRef((e,t)=>{let n=zI(UI,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=V.useState(!1),s=e.orientation===`horizontal`,c=mL(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return hL(n.viewport,c),hL(n.content,c),(0,H.jsx)(yd,{present:r||a,children:(0,H.jsx)(JI,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),JI=V.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=zI(UI,e.__scopeScrollArea),a=V.useRef(null),o=V.useRef(0),[s,c]=V.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=sL(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return lL(e,o.current,s,t)}return n===`horizontal`?(0,H.jsx)(YI,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=uL(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,H.jsx)(XI,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=uL(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),YI=V.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=zI(UI,e.__scopeScrollArea),[o,s]=V.useState(),c=V.useRef(null),l=K(t,c,a.onScrollbarXChange);return V.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,H.jsx)($I,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":cL(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),fL(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:oL(o.paddingLeft),paddingEnd:oL(o.paddingRight)}})}})}),XI=V.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=zI(UI,e.__scopeScrollArea),[o,s]=V.useState(),c=V.useRef(null),l=K(t,c,a.onScrollbarYChange);return V.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,H.jsx)($I,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":cL(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),fL(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:oL(o.paddingTop),paddingEnd:oL(o.paddingBottom)}})}})}),[ZI,QI]=II(UI),$I=V.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=zI(UI,n),[m,h]=V.useState(null),g=K(t,e=>h(e)),_=V.useRef(null),v=V.useRef(``),y=p.viewport,b=r.content-r.viewport,x=Zp(u),S=Zp(c),C=mL(d,10);function w(e){_.current&&l({x:e.clientX-_.current.left,y:e.clientY-_.current.top})}return V.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&x(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b,x]),V.useEffect(S,[r,S]),hL(m,C),hL(p.content,C),(0,H.jsx)(ZI,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Zp(a),onThumbPointerUp:Zp(o),onThumbPositionChange:S,onThumbPointerDown:Zp(s),children:(0,H.jsx)(J.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:q(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),w(e))}),onPointerMove:q(e.onPointerMove,w),onPointerUp:q(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})}),eL=`ScrollAreaThumb`,tL=V.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=QI(eL,e.__scopeScrollArea);return(0,H.jsx)(yd,{present:n||i.hasThumb,children:(0,H.jsx)(nL,{ref:t,...r})})}),nL=V.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=zI(eL,n),o=QI(eL,n),{onThumbPositionChange:s}=o,c=K(t,e=>o.onThumbChange(e)),l=V.useRef(void 0),u=mL(()=>{l.current&&=(l.current(),void 0)},100);return V.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=pL(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,H.jsx)(J.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:q(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:q(e.onPointerUp,o.onThumbPointerUp)})});tL.displayName=eL;var rL=`ScrollAreaCorner`,iL=V.forwardRef((e,t)=>{let n=zI(rL,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,H.jsx)(aL,{...e,ref:t}):null});iL.displayName=rL;var aL=V.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=zI(rL,n),[a,o]=V.useState(0),[s,c]=V.useState(0),l=!!(a&&s);return hL(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),hL(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,H.jsx)(J.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function oL(e){return e?parseInt(e,10):0}function sL(e,t){let n=e/t;return isNaN(n)?0:n}function cL(e){let t=sL(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function lL(e,t,n,r=`ltr`){let i=cL(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return dL([c,l],d)(e)}function uL(e,t,n=`ltr`){let r=cL(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=NI(e,n===`ltr`?[0,o]:[o*-1,0]);return dL([0,o],[0,s])(c)}function dL(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function fL(e,t){return e>0&&e<t}var pL=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function mL(e,t){let n=Zp(e),r=V.useRef(0);return V.useEffect(()=>()=>window.clearTimeout(r.current),[]),V.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function hL(e,t){let n=Zp(t);fd(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var gL=BI,_L=HI,vL=iL,[yL,bL]=ed(`Tooltip`,[Rw]),xL=Rw(),SL=`TooltipProvider`,CL=700,wL=`tooltip.open`,[TL,EL]=yL(SL),DL=e=>{let{__scopeTooltip:t,delayDuration:n=CL,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=V.useRef(!0),s=V.useRef(!1),c=V.useRef(0);return V.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,H.jsx)(TL,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:V.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:V.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:V.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};DL.displayName=SL;var OL=`Tooltip`,[kL,AL]=yL(OL),jL=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=EL(OL,e.__scopeTooltip),l=xL(t),[u,d]=V.useState(null),f=Td(),p=V.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=V.useRef(!1),[_,v]=md({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(wL))):c.onClose(),a?.(e)},caller:OL}),y=V.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=V.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=V.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=V.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return V.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,H.jsx)(eT,{...l,children:(0,H.jsx)(kL,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:V.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:V.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};jL.displayName=OL;var ML=`TooltipTrigger`,NL=V.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=AL(ML,n),a=EL(ML,n),o=xL(n),s=K(t,V.useRef(null),i.onTriggerChange),c=V.useRef(!1),l=V.useRef(!1),u=V.useCallback(()=>c.current=!1,[]);return V.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,H.jsx)(tT,{asChild:!0,...o,children:(0,H.jsx)(J.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:q(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:q(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:q(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:q(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:q(e.onBlur,i.onClose),onClick:q(e.onClick,i.onClose)})})});NL.displayName=ML;var PL=`TooltipPortal`,[FL,IL]=yL(PL,{forceMount:void 0}),LL=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=AL(PL,t);return(0,H.jsx)(FL,{scope:t,forceMount:n,children:(0,H.jsx)(yd,{present:n||a.open,children:(0,H.jsx)(jm,{asChild:!0,container:i,children:r})})})};LL.displayName=PL;var RL=`TooltipContent`,zL=V.forwardRef((e,t)=>{let n=IL(RL,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=AL(RL,e.__scopeTooltip);return(0,H.jsx)(yd,{present:r||o.open,children:o.disableHoverableContent?(0,H.jsx)(WL,{side:i,...a,ref:t}):(0,H.jsx)(BL,{side:i,...a,ref:t})})}),BL=V.forwardRef((e,t)=>{let n=AL(RL,e.__scopeTooltip),r=EL(RL,e.__scopeTooltip),i=V.useRef(null),a=K(t,i),[o,s]=V.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=V.useCallback(()=>{s(null),d(!1)},[d]),p=V.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=JL(r,qL(r,n.getBoundingClientRect())),a=YL(t.getBoundingClientRect());s(ZL([...i,...a])),d(!0)},[d]);return V.useEffect(()=>()=>f(),[f]),V.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),V.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!XL(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,H.jsx)(WL,{...e,ref:a})}),[VL,HL]=yL(OL,{isInside:!1}),UL=sd(`TooltipContent`),WL=V.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=AL(RL,n),l=xL(n),{onClose:u}=c;return V.useEffect(()=>(document.addEventListener(wL,u),()=>document.removeEventListener(wL,u)),[u]),V.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,H.jsx)(am,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,H.jsxs)(nT,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,H.jsx)(UL,{children:r}),(0,H.jsx)(VL,{scope:n,isInside:!0,children:(0,H.jsx)(YM,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});zL.displayName=RL;var GL=`TooltipArrow`,KL=V.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=xL(n);return HL(GL,n).isInside?null:(0,H.jsx)(rT,{...i,...r,ref:t})});KL.displayName=GL;function qL(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function JL(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function YL(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function XL(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ZL(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),QL(t)}function QL(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var $L=zL,eR=[`PageUp`,`PageDown`],tR=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],nR={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},rR=`Slider`,[iR,aR,oR]=dd(rR),[sR,cR]=ed(rR,[oR]),[lR,uR]=sR(rR),dR=V.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=V.useRef(new Set),_=V.useRef(0),v=o===`horizontal`?mR:hR,[y=[],b]=md({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),x=V.useRef(y);function S(e){T(e,kR(y,e))}function C(e){T(e,_.current)}function w(){let e=x.current[_.current];y[_.current]!==e&&f(y)}function T(e,t,{commit:n}={commit:!1}){let o=PR(a),s=NI(FR(Math.round((e-r)/a)*a+r,o),[r,i]);b((e=[])=>{let r=ER(e,s,t);if(MR(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,H.jsx)(lR,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,H.jsx)(iR.Provider,{scope:e.__scopeSlider,children:(0,H.jsx)(iR.Slot,{scope:e.__scopeSlider,children:(0,H.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:q(h.onPointerDown,()=>{s||(x.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:S,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:w,onHomeKeyDown:()=>!s&&T(r,0,{commit:!0}),onEndKeyDown:()=>!s&&T(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=eR.includes(e.key)||e.shiftKey&&tR.includes(e.key)?10:1,r=_.current,i=y[r];T(i+a*n*t,r,{commit:!0})}}})})})})});dR.displayName=rR;var[fR,pR]=sR(rR,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),mR=V.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=V.useState(null),p=K(t,e=>f(e)),m=V.useRef(void 0),h=Hd(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=NR([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,H.jsx)(fR,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,H.jsx)(gR,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=nR[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),hR=V.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=V.useRef(null),d=K(t,u),f=V.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=NR([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,H.jsx)(fR,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,H.jsx)(gR,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=nR[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),gR=V.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=uR(rR,n);return(0,H.jsx)(J.span,{...l,ref:t,onKeyDown:q(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):eR.concat(tR).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:q(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:q(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:q(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),_R=`SliderTrack`,vR=V.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=uR(_R,n);return(0,H.jsx)(J.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});vR.displayName=_R;var yR=`SliderRange`,bR=V.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=uR(yR,n),a=pR(yR,n),o=K(t,V.useRef(null)),s=i.values.length,c=i.values.map(e=>DR(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,H.jsx)(J.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});bR.displayName=yR;var xR=`SliderThumb`,SR=V.forwardRef((e,t)=>{let n=aR(e.__scopeSlider),[r,i]=V.useState(null),a=K(t,e=>i(e)),o=V.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,H.jsx)(CR,{...e,ref:a,index:o})}),CR=V.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=uR(xR,n),s=pR(xR,n),[c,l]=V.useState(null),u=K(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=uy(c),p=o.values[r],m=p===void 0?0:DR(p,o.min,o.max),h=OR(r,o.values.length),g=f?.[s.size],_=g?AR(g,m,s.direction):0;return V.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,H.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,H.jsx)(iR.ItemSlot,{scope:e.__scopeSlider,children:(0,H.jsx)(J.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:q(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,H.jsx)(TR,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});SR.displayName=xR;var wR=`RadioBubbleInput`,TR=V.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=V.useRef(null),a=K(i,r),o=ly(t);return V.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,H.jsx)(J.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});TR.displayName=wR;function ER(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function DR(e,t,n){return NI(100/(n-t)*(e-t),[0,100])}function OR(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function kR(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function AR(e,t,n){let r=e/2;return(r-NR([0,50],[0,r])(t)*n)*n}function jR(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function MR(e,t){if(t>0){let n=jR(e);return Math.min(...n)>=t}return!0}function NR(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function PR(e){return(String(e).split(`.`)[1]||``).length}function FR(e,t){let n=10**t;return Math.round(e*n)/n}var IR=dR,LR=vR,RR=bR,zR=SR;n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))();var BR=`Switch`,[VR,HR]=ed(BR),[UR,WR]=VR(BR),GR=V.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=V.useState(null),m=K(t,e=>p(e)),h=V.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=md({prop:i,defaultProp:a??!1,onChange:l,caller:BR});return(0,H.jsxs)(UR,{scope:n,checked:_,disabled:s,children:[(0,H.jsx)(J.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":XR(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:q(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,H.jsx)(YR,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});GR.displayName=BR;var KR=`SwitchThumb`,qR=V.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=WR(KR,n);return(0,H.jsx)(J.span,{"data-state":XR(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});qR.displayName=KR;var JR=`SwitchBubbleInput`,YR=V.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=V.useRef(null),s=K(o,a),c=ly(n),l=uy(t);return V.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,H.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});YR.displayName=JR;function XR(e){return e?`checked`:`unchecked`}var ZR=GR,QR=qR,$R=`Tabs`,[ez,tz]=ed($R,[GT]),nz=GT(),[rz,iz]=ez($R),az=V.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Hd(s),[d,f]=md({prop:r,onChange:i,defaultProp:a??``,caller:$R});return(0,H.jsx)(rz,{scope:n,baseId:Td(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,H.jsx)(J.div,{dir:u,"data-orientation":o,...l,ref:t})})});az.displayName=$R;var oz=`TabsList`,sz=V.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=iz(oz,n),o=nz(n);return(0,H.jsx)(rE,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,H.jsx)(J.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});sz.displayName=oz;var cz=`TabsTrigger`,lz=V.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=iz(cz,n),s=nz(n),c=fz(o.baseId,r),l=pz(o.baseId,r),u=r===o.value;return(0,H.jsx)(iE,{asChild:!0,...s,focusable:!i,active:u,children:(0,H.jsx)(J.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:q(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:q(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:q(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});lz.displayName=cz;var uz=`TabsContent`,dz=V.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=iz(uz,n),c=fz(s.baseId,r),l=pz(s.baseId,r),u=r===s.value,d=V.useRef(u);return V.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,H.jsx)(yd,{present:i||u,children:({present:n})=>(0,H.jsx)(J.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});dz.displayName=uz;function fz(e,t){return`${e}-trigger-${t}`}function pz(e,t){return`${e}-content-${t}`}var mz=sz,hz=lz,gz=dz,_z=`ToastProvider`,[vz,yz,bz]=dd(`Toast`),[xz,Sz]=ed(`Toast`,[bz]),[Cz,wz]=xz(_z),Tz=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=V.useState(null),[l,u]=V.useState(0),d=V.useRef(!1),f=V.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${_z}\`. Expected non-empty \`string\`.`),(0,H.jsx)(vz.Provider,{scope:t,children:(0,H.jsx)(Cz,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:V.useCallback(()=>u(e=>e+1),[]),onToastRemove:V.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Tz.displayName=_z;var Ez=`ToastViewport`,Dz=[`F8`],Oz=`toast.viewportPause`,kz=`toast.viewportResume`,Az=V.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=Dz,label:i=`Notifications ({hotkey})`,...a}=e,o=wz(Ez,n),s=yz(n),c=V.useRef(null),l=V.useRef(null),u=V.useRef(null),d=V.useRef(null),f=K(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;V.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),V.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(Oz);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(kz);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=V.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...rB(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return V.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);iB(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),(0,H.jsxs)(pm,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,H.jsx)(Mz,{ref:l,onFocusFromOutsideViewport:()=>{iB(h({tabbingDirection:`forwards`}))}}),(0,H.jsx)(vz.Slot,{scope:n,children:(0,H.jsx)(J.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,H.jsx)(Mz,{ref:u,onFocusFromOutsideViewport:()=>{iB(h({tabbingDirection:`backwards`}))}})]})});Az.displayName=Ez;var jz=`ToastFocusProxy`,Mz=V.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=wz(jz,n);return(0,H.jsx)(JM,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});Mz.displayName=jz;var Nz=`Toast`,Pz=`toast.swipeStart`,Fz=`toast.swipeMove`,Iz=`toast.swipeCancel`,Lz=`toast.swipeEnd`,Rz=V.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=md({prop:r,defaultProp:i??!0,onChange:a,caller:Nz});return(0,H.jsx)(yd,{present:n||s,children:(0,H.jsx)(Vz,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:Zp(e.onPause),onResume:Zp(e.onResume),onSwipeStart:q(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:q(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:q(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:q(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});Rz.displayName=Nz;var[zz,Bz]=xz(Nz,{onClose(){}}),Vz=V.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=wz(Nz,n),[g,_]=V.useState(null),v=K(t,e=>_(e)),y=V.useRef(null),b=V.useRef(null),x=i||h.duration,S=V.useRef(0),C=V.useRef(x),w=V.useRef(0),{onToastAdd:T,onToastRemove:E}=h,D=Zp(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),O=V.useCallback(e=>{!e||e===1/0||(window.clearTimeout(w.current),S.current=new Date().getTime(),w.current=window.setTimeout(D,e))},[D]);V.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{O(C.current),l?.()},n=()=>{let e=new Date().getTime()-S.current;C.current-=e,window.clearTimeout(w.current),c?.()};return e.addEventListener(Oz,n),e.addEventListener(kz,t),()=>{e.removeEventListener(Oz,n),e.removeEventListener(kz,t)}}},[h.viewport,x,c,l,O]),V.useEffect(()=>{a&&!h.isClosePausedRef.current&&O(x)},[a,x,h.isClosePausedRef,O]),V.useEffect(()=>(T(),()=>E()),[T,E]);let k=V.useMemo(()=>g?Qz(g):null,[g]);return h.viewport?(0,H.jsxs)(H.Fragment,{children:[k&&(0,H.jsx)(Hz,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:k}),(0,H.jsx)(zz,{scope:n,onClose:D,children:Au.createPortal((0,H.jsx)(vz.ItemSlot,{scope:n,children:(0,H.jsx)(fm,{asChild:!0,onEscapeKeyDown:q(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||D(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,H.jsx)(J.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:q(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:q(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:q(e.onPointerMove,e=>{if(!y.current)return;let t=e.clientX-y.current.x,n=e.clientY-y.current.y,r=!!b.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(b.current=l,$z(Fz,d,f,{discrete:!1})):eB(l,h.swipeDirection,c)?(b.current=l,$z(Pz,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:q(e.onPointerUp,e=>{let t=b.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),b.current=null,y.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};eB(t,h.swipeDirection,h.swipeThreshold)?$z(Lz,p,r,{discrete:!0}):$z(Iz,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Hz=e=>{let{__scopeToast:t,children:n,...r}=e,i=wz(Nz,t),[a,o]=V.useState(!1),[s,c]=V.useState(!1);return tB(()=>o(!0)),V.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,H.jsx)(jm,{asChild:!0,children:(0,H.jsx)(JM,{...r,children:a&&(0,H.jsxs)(H.Fragment,{children:[i.label,` `,n]})})})},Uz=`ToastTitle`,Wz=V.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,H.jsx)(J.div,{...r,ref:t})});Wz.displayName=Uz;var Gz=`ToastDescription`,Kz=V.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,H.jsx)(J.div,{...r,ref:t})});Kz.displayName=Gz;var qz=`ToastAction`,Jz=V.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,H.jsx)(Zz,{altText:n,asChild:!0,children:(0,H.jsx)(Xz,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${qz}\`. Expected non-empty \`string\`.`),null)});Jz.displayName=qz;var Yz=`ToastClose`,Xz=V.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=Bz(Yz,n);return(0,H.jsx)(Zz,{asChild:!0,children:(0,H.jsx)(J.button,{type:`button`,...r,ref:t,onClick:q(e.onClick,i.onClose)})})});Xz.displayName=Yz;var Zz=V.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,H.jsx)(J.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Qz(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),nB(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Qz(e))}}),t}function $z(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_d(i,a):i.dispatchEvent(a)}var eB=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function tB(e=()=>{}){let t=Zp(e);fd(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function nB(e){return e.nodeType===e.ELEMENT_NODE}function rB(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iB(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var aB=Az,oB=Rz,sB=Wz,cB=Kz,lB=Jz,uB=Xz,dB=`Toggle`,fB=V.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=md({prop:n,onChange:i,defaultProp:r??!1,caller:dB});return(0,H.jsx)(J.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:q(e.onClick,()=>{e.disabled||s(!o)})})});fB.displayName=dB;var pB=fB,mB=`ToggleGroup`,[hB,gB]=ed(mB,[GT]),_B=GT(),vB=V.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,H.jsx)(xB,{...r,ref:t});if(n===`multiple`)return(0,H.jsx)(SB,{...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${mB}\``)});vB.displayName=mB;var[yB,bB]=hB(mB),xB=V.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=md({prop:n,defaultProp:r??``,onChange:i,caller:mB});return(0,H.jsx)(yB,{scope:e.__scopeToggleGroup,type:`single`,value:V.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:V.useCallback(()=>s(``),[s]),children:(0,H.jsx)(TB,{...a,ref:t})})}),SB=V.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=md({prop:n,defaultProp:r??[],onChange:i,caller:mB}),c=V.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=V.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,H.jsx)(yB,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,H.jsx)(TB,{...a,ref:t})})});vB.displayName=mB;var[CB,wB]=hB(mB),TB=V.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=_B(n),u=Hd(o),d={role:`group`,dir:u,...c};return(0,H.jsx)(CB,{scope:n,rovingFocus:i,disabled:r,children:i?(0,H.jsx)(rE,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,H.jsx)(J.div,{...d,ref:t})}):(0,H.jsx)(J.div,{...d,ref:t})})}),EB=`ToggleGroupItem`,DB=V.forwardRef((e,t)=>{let n=bB(EB,e.__scopeToggleGroup),r=wB(EB,e.__scopeToggleGroup),i=_B(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=V.useRef(null);return r.rovingFocus?(0,H.jsx)(iE,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,H.jsx)(OB,{...s,ref:t})}):(0,H.jsx)(OB,{...s,ref:t})});DB.displayName=EB;var OB=V.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=bB(EB,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,H.jsx)(fB,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),kB=vB,AB=DB,jB=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m6 9l6 6l6-6`})});function $(...e){return qp(wf(e))}function MB(e){return e===void 0?void 0:Array.isArray(e)?e:[e]}var NB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(yf,{ref:n,className:$(`border-b`,e),...t}));NB.displayName=`AccordionItem`;var PB=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsx)(bf,{className:`flex`,children:(0,H.jsxs)(xf,{ref:r,className:$(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,H.jsx)(jB,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));PB.displayName=xf.displayName;var FB=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsx)(Sf,{ref:r,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,H.jsx)(`div`,{className:$(`pb-4 pt-0`,e),children:t})}));FB.displayName=Sf.displayName;var IB=Xp(`relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground`,{variants:{variant:{default:`bg-background text-foreground`,destructive:`border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive`}},defaultVariants:{variant:`default`}}),LB=V.forwardRef(({className:e,variant:t,...n},r)=>(0,H.jsx)(`div`,{ref:r,role:`alert`,className:$(IB({variant:t}),e),...n}));LB.displayName=`Alert`;var RB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(`h5`,{ref:n,className:$(`mb-1 font-medium leading-none tracking-tight`,e),...t}));RB.displayName=`AlertTitle`;var zB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(`div`,{ref:n,className:$(`text-sm [&_p]:leading-relaxed`,e),...t}));zB.displayName=`AlertDescription`;var BB=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21 12a9 9 0 1 1-6.219-8.56`})}),VB=Xp(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-button text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none 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 cursor-pointer`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background text-foreground 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 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`,red:`bg-red-500 text-white hover:bg-red-600`,yellow:`bg-yellow-500 text-white hover:bg-yellow-600`,green:`bg-green-500 text-white hover:bg-green-600`,blue:`bg-blue-500 text-white hover:bg-blue-600`,cyan:`bg-cyan-500 text-white hover:bg-cyan-600`,purple:`bg-purple-500 text-white hover:bg-purple-600`,pink:`bg-pink-500 text-white hover:bg-pink-600`,orange:`bg-orange-500 text-white hover:bg-orange-600`},size:{xs:`h-6 px-2 py-1 text-xs [&_svg]:size-3 has-[>svg]:px-1.5 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`,sm:`h-7 px-3 py-1.5 text-xs [&_svg]:size-3.5 has-[>svg]:px-2 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`,default:`h-9 px-4 py-2 [&_svg]:size-4 has-[>svg]:px-3 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`,lg:`h-11 px-6 py-3 text-base [&_svg]:size-5 has-[>svg]:px-4 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`,xl:`h-13 px-8 py-4 text-lg [&_svg]:size-6 has-[>svg]:px-6 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`}},defaultVariants:{variant:`default`,size:`default`}}),HB=V.forwardRef(({className:e,variant:t,size:n,icon:r,children:i,loading:a,disabled:o,asChild:s=!1,...c},l)=>{let u=s?w_:`button`,d=V.Children.count(i)===0,f=a?(0,H.jsx)(BB,{className:`animate-spin`}):r;return(0,H.jsx)(u,{"data-slot":`button`,className:$(VB({variant:t,size:n,className:e})),ref:l,disabled:o||a,...c,children:d?f:f?(0,H.jsxs)(`span`,{className:`contents`,children:[f,i]}):i})});HB.displayName=`Button`;var UB=f_,WB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(p_,{className:$(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));WB.displayName=p_.displayName;var GB=V.forwardRef(({className:e,...t},n)=>(0,H.jsxs)(UB,{children:[(0,H.jsx)(WB,{}),(0,H.jsx)(m_,{ref:n,className:$(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...t})]}));GB.displayName=m_.displayName;var KB=({className:e,...t})=>(0,H.jsx)(`div`,{className:$(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});KB.displayName=`AlertDialogHeader`;var qB=({className:e,...t})=>(0,H.jsx)(`div`,{className:$(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});qB.displayName=`AlertDialogFooter`;var JB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(__,{ref:n,className:$(`text-lg font-semibold`,e),...t}));JB.displayName=__.displayName;var YB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(v_,{ref:n,className:$(`text-sm text-muted-foreground`,e),...t}));YB.displayName=v_.displayName;var XB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(h_,{ref:n,className:$(VB(),e),...t}));XB.displayName=h_.displayName;var ZB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(g_,{ref:n,className:$(VB({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));ZB.displayName=g_.displayName;var QB=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(X_,{ref:n,className:$(`relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full`,e),...t}));QB.displayName=X_.displayName;var $B=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Z_,{ref:n,className:$(`aspect-square h-full w-full`,e),...t}));$B.displayName=Z_.displayName;var eV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Q_,{ref:n,className:$(`flex h-full w-full items-center justify-center rounded-full bg-muted`,e),...t}));eV.displayName=Q_.displayName;var tV=Xp(`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 nV({className:e,variant:t,asChild:n=!1,...r}){return(0,H.jsx)(n?w_:`span`,{"data-slot":`badge`,className:$(tV({variant:t}),e),...r})}var rV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m9 18l6-6l-6-6`})}),iV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`circle`,{cx:12,cy:12,r:1}),(0,H.jsx)(`circle`,{cx:19,cy:12,r:1}),(0,H.jsx)(`circle`,{cx:5,cy:12,r:1})]})}),aV=V.forwardRef(({...e},t)=>(0,H.jsx)(`nav`,{ref:t,"aria-label":`breadcrumb`,...e}));aV.displayName=`Breadcrumb`;var oV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(`ol`,{ref:n,className:$(`flex flex-wrap items-center gap-1.5 overflow-wrap-anywhere text-sm text-muted-foreground sm:gap-2.5`,e),...t}));oV.displayName=`BreadcrumbList`;var sV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(`li`,{ref:n,className:$(`inline-flex items-center gap-1.5`,e),...t}));sV.displayName=`BreadcrumbItem`;var cV=V.forwardRef(({asChild:e,className:t,...n},r)=>(0,H.jsx)(e?w_:`a`,{ref:r,className:$(`transition-colors hover:text-foreground`,t),...n}));cV.displayName=`BreadcrumbLink`;var lV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(`span`,{ref:n,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:$(`font-normal text-foreground`,e),...t}));lV.displayName=`BreadcrumbPage`;var uV=({children:e,className:t,...n})=>(0,H.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:$(`[&>svg]:w-3.5 [&>svg]:h-3.5`,t),...n,children:e??(0,H.jsx)(rV,{})});uV.displayName=`BreadcrumbSeparator`;var dV=({className:e,...t})=>(0,H.jsxs)(`span`,{role:`presentation`,"aria-hidden":`true`,className:$(`flex h-9 w-9 items-center justify-center`,e),...t,children:[(0,H.jsx)(iV,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`More`})]});dV.displayName=`BreadcrumbElipssis`;var fV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m12 19l-7-7l7-7m7 7H5`})}),pV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 12h14m-7-7l7 7l-7 7`})}),mV=V.createContext(null);function hV(){let e=V.useContext(mV);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}var gV=V.forwardRef(({orientation:e=`horizontal`,opts:t,setApi:n,plugins:r,className:i,children:a,...o},s)=>{let[c,l]=cy({...t,axis:e===`horizontal`?`x`:`y`},r),[u,d]=V.useState(!1),[f,p]=V.useState(!1),m=V.useCallback(e=>{e&&(d(e.canScrollPrev()),p(e.canScrollNext()))},[]),h=V.useCallback(()=>{l?.scrollPrev()},[l]),g=V.useCallback(()=>{l?.scrollNext()},[l]),_=V.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),h()):e.key===`ArrowRight`&&(e.preventDefault(),g())},[h,g]);return V.useEffect(()=>{!l||!n||n(l)},[l,n]),V.useEffect(()=>{if(l)return m(l),l.on(`reInit`,m),l.on(`select`,m),()=>{l?.off(`select`,m)}},[l,m]),(0,H.jsx)(mV.Provider,{value:{carouselRef:c,api:l,opts:t,orientation:e||(t?.axis===`y`?`vertical`:`horizontal`),scrollPrev:h,scrollNext:g,canScrollPrev:u,canScrollNext:f},children:(0,H.jsx)(`div`,{ref:s,onKeyDownCapture:_,className:$(`relative`,i),role:`region`,"aria-roledescription":`carousel`,...o,children:a})})});gV.displayName=`Carousel`;var _V=V.forwardRef(({className:e,...t},n)=>{let{carouselRef:r,orientation:i}=hV();return(0,H.jsx)(`div`,{ref:r,className:`overflow-hidden`,children:(0,H.jsx)(`div`,{ref:n,className:$(`flex`,i===`horizontal`?`-ml-4`:`-mt-4 flex-col`,e),...t})})});_V.displayName=`CarouselContent`;var vV=V.forwardRef(({className:e,...t},n)=>{let{orientation:r}=hV();return(0,H.jsx)(`div`,{ref:n,role:`group`,"aria-roledescription":`slide`,className:$(`min-w-0 shrink-0 grow-0 basis-full`,r===`horizontal`?`pl-4`:`pt-4`,e),...t})});vV.displayName=`CarouselItem`;var yV=V.forwardRef(({className:e,variant:t=`outline`,size:n=`default`,...r},i)=>{let{orientation:a,scrollPrev:o,canScrollPrev:s}=hV();return(0,H.jsxs)(HB,{ref:i,variant:t,size:n,className:$(`absolute h-8 w-8 rounded-full`,a===`horizontal`?`-left-12 top-1/2 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!s,onClick:o,...r,children:[(0,H.jsx)(fV,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Previous slide`})]})});yV.displayName=`CarouselPrevious`;var bV=V.forwardRef(({className:e,variant:t=`outline`,size:n=`default`,...r},i)=>{let{orientation:a,scrollNext:o,canScrollNext:s}=hV();return(0,H.jsxs)(HB,{ref:i,variant:t,size:n,className:$(`absolute h-8 w-8 rounded-full`,a===`horizontal`?`-right-12 top-1/2 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!s,onClick:o,...r,children:[(0,H.jsx)(pV,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Next slide`})]})});bV.displayName=`CarouselNext`;var xV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M20 6L9 17l-5-5`})}),SV=V.forwardRef(({className:e,name:t,checked:n,value:r,defaultChecked:i,onValueChange:a,onBlur:o,label:s,labelClassName:c,disabled:l,...u},d)=>{let f=r===void 0?n:r,p=V.useRef(null),m=V.useRef(null),h=V.useId();V.useImperativeHandle(d,()=>p.current);let g=e=>{a?.(e===`indeterminate`?!1:e)},_=e=>{e.preventDefault(),!l&&m.current?.click()},v=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{type:`checkbox`,ref:p,name:t,defaultChecked:i===!0,onBlur:o,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),(0,H.jsx)(yy,{ref:m,"data-slot":`checkbox`,checked:f,defaultChecked:i,onCheckedChange:g,disabled:l,"aria-labelledby":s?h:void 0,className:$(`peer border border-muted-foreground/30 bg-input-background 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] shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...u,children:(0,H.jsx)(xy,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,H.jsx)(xV,{className:`size-3.5`})})})]});return s?(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[v,(0,H.jsx)(`label`,{id:h,className:$(`text-sm cursor-pointer select-none`,l&&`cursor-not-allowed opacity-50`,c),onClick:_,children:s})]}):v});SV.displayName=`Checkbox`;var CV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m7 15l5 5l5-5M7 9l5-5l5 5`})}),wV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`circle`,{cx:12,cy:12,r:10}),(0,H.jsx)(`path`,{d:`m15 9l-6 6m0-6l6 6`})]})}),TV={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},EV=e=>`[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`,DV=()=>()=>{throw Error(EV(`uploader`))},OV=()=>e=>TV[e],kV=(0,V.createContext)({});function AV({children:e,authOptions:t,...n}){let r=(0,V.useRef)(void 0);t&&!r.current&&(r.current=Tx(t));let i={uploader:n.uploader??DV(),auth:n.auth??r.current,SD:n.SD??OV()};return(0,H.jsx)(kV.Provider,{value:i,children:e})}function jV(){return(0,V.useContext)(kV)}var MV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,H.jsx)(`path`,{d:`m21 21l-4.34-4.34`}),(0,H.jsx)(`circle`,{cx:11,cy:11,r:8})]})}),NV=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 6L6 18M6 6l12 12`})}),PV=Fg,FV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Ig,{ref:n,className:$(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));FV.displayName=Ig.displayName;var IV=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsxs)(PV,{children:[(0,H.jsx)(FV,{}),(0,H.jsxs)(Lg,{ref:r,className:$(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...n,children:[t,(0,H.jsxs)(Bg,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,H.jsx)(NV,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));IV.displayName=Lg.displayName;var LV=({className:e,...t})=>(0,H.jsx)(`div`,{className:$(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});LV.displayName=`DialogHeader`;var RV=({className:e,...t})=>(0,H.jsx)(`div`,{className:$(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});RV.displayName=`DialogFooter`;var zV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Rg,{ref:n,className:$(`text-lg font-semibold leading-none tracking-tight`,e),...t}));zV.displayName=Rg.displayName;var BV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(zg,{ref:n,className:$(`text-sm text-muted-foreground`,e),...t}));BV.displayName=zg.displayName;var VV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(lS,{ref:n,className:$(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t}));VV.displayName=lS.displayName;var HV=V.forwardRef(({className:e,...t},n)=>(0,H.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,H.jsx)(MV,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,H.jsx)(lS.Input,{ref:n,className:$(`flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));HV.displayName=lS.Input.displayName;var UV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(lS.List,{ref:n,className:$(`max-h-[300px] overflow-y-auto overflow-x-hidden`,e),...t}));UV.displayName=lS.List.displayName;var WV=V.forwardRef((e,t)=>(0,H.jsx)(lS.Empty,{ref:t,className:`py-6 text-center text-sm`,...e}));WV.displayName=lS.Empty.displayName;var GV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(lS.Group,{ref:n,className:$(`overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground`,e),...t}));GV.displayName=lS.Group.displayName;var KV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(lS.Separator,{ref:n,className:$(`-mx-1 h-px bg-border`,e),...t}));KV.displayName=lS.Separator.displayName;var qV=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(lS.Item,{ref:n,className:$(`relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 **:[svg]:pointer-events-none **:[svg]:size-4 **:[svg]:shrink-0`,e),...t}));qV.displayName=lS.Item.displayName;var JV=({className:e,...t})=>(0,H.jsx)(`span`,{className:$(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});JV.displayName=`CommandShortcut`;function YV({...e}){return(0,H.jsx)(AT,{"data-slot":`popover`,...e})}function XV({...e}){return(0,H.jsx)(jT,{"data-slot":`popover-trigger`,...e})}function ZV({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,H.jsx)(MT,{children:(0,H.jsx)(NT,{"data-slot":`popover-content`,align:t,sideOffset:n,className:$(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...r})})}var QV=V.forwardRef(({options:e,name:t,value:n,onValueChange:r,onBlur:i,placeholder:a,searchPlaceholder:o,emptyText:s,disabled:c=!1,className:l,clearable:u=!1},d)=>{let{SD:f}=jV(),[p,m]=V.useState(!1),h=V.useRef(null),g=a??f(`rc.combobox.selectPlaceholder`),_=o??f(`common.searchPlaceholder`),v=s??f(`rc.combobox.noResults`);V.useImperativeHandle(d,()=>h.current);let y=e=>{r?.((e===n?``:e)||void 0),m(!1)},b=e=>{e.preventDefault(),e.stopPropagation(),r?.(void 0),m(!1)},x=!!n;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{type:`hidden`,ref:h,name:t,value:n||``,onBlur:i}),(0,H.jsxs)(YV,{open:p,onOpenChange:m,children:[(0,H.jsx)(XV,{asChild:!0,children:(0,H.jsxs)(HB,{variant:`outline`,role:`combobox`,"aria-expanded":p,disabled:c,className:$(`w-full justify-between`,l),children:[(0,H.jsx)(`span`,{className:`flex-1 truncate text-left`,children:n?e.find(e=>e.value===n)?.label:g}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0 pl-2`,children:[u&&x&&(0,H.jsx)(`span`,{className:`flex items-center justify-center`,onMouseDown:e=>e.stopPropagation(),onClick:b,children:(0,H.jsx)(wV,{className:`h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity`})}),(0,H.jsx)(CV,{className:`h-4 w-4 opacity-50`})]})]})}),(0,H.jsx)(ZV,{className:`w-full p-0`,children:(0,H.jsxs)(VV,{children:[(0,H.jsx)(HV,{placeholder:_,className:`h-9`}),(0,H.jsxs)(UV,{children:[(0,H.jsx)(WV,{children:v}),(0,H.jsx)(GV,{children:e.map(e=>(0,H.jsxs)(qV,{value:e.value,onSelect:y,children:[e.label,(0,H.jsx)(xV,{className:$(`ml-auto`,n===e.value?`opacity-100`:`opacity-0`)})]},e.value))})]})]})})]})]})});QV.displayName=`Combobox`,FT({open:!1,reactNode:null});var $V=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`circle`,{cx:12,cy:12,r:10,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2})}),eH=V.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,H.jsxs)(NO,{ref:i,className:$(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,t&&`pl-8`,e),...r,children:[n,(0,H.jsx)(rV,{className:`ml-auto h-4 w-4`})]}));eH.displayName=NO.displayName;var tH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(PO,{ref:n,className:$(`z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]`,e),...t}));tH.displayName=PO.displayName;var nH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(TO,{children:(0,H.jsx)(EO,{ref:n,className:$(`z-50 max-h-[--radix-context-menu-content-available-height] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]`,e),...t})}));nH.displayName=EO.displayName;var rH=V.forwardRef(({className:e,inset:t,...n},r)=>(0,H.jsx)(OO,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,t&&`pl-8`,e),...n}));rH.displayName=OO.displayName;var iH=V.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,H.jsxs)(kO,{ref:i,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),checked:n,...r,children:[(0,H.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,H.jsx)(jO,{children:(0,H.jsx)(xV,{className:`h-4 w-4`})})}),t]}));iH.displayName=kO.displayName;var aH=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsxs)(AO,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,H.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,H.jsx)(jO,{children:(0,H.jsx)($V,{className:`h-2 w-2 fill-current`})})}),t]}));aH.displayName=AO.displayName;var oH=V.forwardRef(({className:e,inset:t,...n},r)=>(0,H.jsx)(DO,{ref:r,className:$(`px-2 py-1.5 text-sm font-semibold text-foreground`,t&&`pl-8`,e),...n}));oH.displayName=DO.displayName;var sH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(MO,{ref:n,className:$(`-mx-1 my-1 h-px bg-border`,e),...t}));sH.displayName=MO.displayName;var cH=({className:e,...t})=>(0,H.jsx)(`span`,{className:$(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});cH.displayName=`ContextMenuShortcut`;var lH=V.forwardRef(({className:e,type:t,onValueChange:n,onChange:r,...i},a)=>{let o=e=>{n?.(e.target.value),r?.(e)};return(0,H.jsx)(`input`,{type:t,"data-slot":`input`,className:$(`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 px-3 py-1 text-base bg-input-background 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`,e),ref:a,...i,onChange:o})});lH.displayName=`Input`;var uH=({shouldScaleBackground:e=!0,...t})=>(0,H.jsx)(zk.Root,{shouldScaleBackground:e,...t});uH.displayName=`Drawer`,zk.Trigger;var dH=zk.Portal;zk.Close;var fH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(zk.Overlay,{ref:n,className:$(`fixed inset-0 z-50 bg-black/80`,e),...t}));fH.displayName=zk.Overlay.displayName;var pH=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsxs)(dH,{children:[(0,H.jsx)(fH,{}),(0,H.jsxs)(zk.Content,{ref:r,className:$(`fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background`,e),...n,children:[(0,H.jsx)(`div`,{className:`mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted`}),t]})]}));pH.displayName=`DrawerContent`;var mH=({className:e,...t})=>(0,H.jsx)(`div`,{className:$(`grid gap-1.5 p-4 text-center sm:text-left`,e),...t});mH.displayName=`DrawerHeader`;var hH=({className:e,...t})=>(0,H.jsx)(`div`,{className:$(`mt-auto flex flex-col gap-2 p-4`,e),...t});hH.displayName=`DrawerFooter`;var gH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(zk.Title,{ref:n,className:$(`text-lg font-semibold leading-none tracking-tight`,e),...t}));gH.displayName=zk.Title.displayName;var _H=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(zk.Description,{ref:n,className:$(`text-sm text-muted-foreground`,e),...t}));_H.displayName=zk.Description.displayName;var vH=V.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,H.jsxs)(kA,{ref:i,className:$(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,H.jsx)(rV,{className:`ml-auto`})]}));vH.displayName=kA.displayName;var yH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(AA,{ref:n,className:$(`z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]`,e),...t}));yH.displayName=AA.displayName;var bH=V.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,H.jsx)(xA,{children:(0,H.jsx)(SA,{ref:r,sideOffset:t,className:$(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]`,e),...n})}));bH.displayName=SA.displayName;var xH=V.forwardRef(({className:e,inset:t,...n},r)=>(0,H.jsx)(wA,{ref:r,className:$(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...n}));xH.displayName=wA.displayName;var SH=V.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,H.jsxs)(TA,{ref:i,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),checked:n,...r,children:[(0,H.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,H.jsx)(DA,{children:(0,H.jsx)(xV,{className:`h-4 w-4`})})}),t]}));SH.displayName=TA.displayName;var CH=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsxs)(EA,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,H.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,H.jsx)(DA,{children:(0,H.jsx)($V,{className:`h-2 w-2 fill-current`})})}),t]}));CH.displayName=EA.displayName;var wH=V.forwardRef(({className:e,inset:t,...n},r)=>(0,H.jsx)(CA,{ref:r,className:$(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));wH.displayName=CA.displayName;var TH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(OA,{ref:n,className:$(`-mx-1 my-1 h-px bg-muted`,e),...t}));TH.displayName=OA.displayName;var EH=({className:e,...t})=>(0,H.jsx)(`span`,{className:$(`ml-auto text-xs tracking-widest opacity-60`,e),...t});EH.displayName=`DropdownMenuShortcut`;var DH=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21 12a9 9 0 1 1-6.219-8.56`})}),OH=Xp(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),kH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(KA,{ref:n,className:$(OH(),e),...t}));kH.displayName=KA.displayName;var AH=V.createContext(null),jH=()=>{let e=V.useContext(AH),t=V.useContext(MH),{getFieldState:n,formState:r}=UA();if(!e)throw Error(`useFormField should be used within <FormField>`);if(!t)throw Error(`useFormField should be used within <FormItem>`);let i=n(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},MH=V.createContext(null),NH=V.forwardRef(({className:e,...t},n)=>{let r=V.useId();return(0,H.jsx)(MH.Provider,{value:{id:r},children:(0,H.jsx)(`div`,{ref:n,className:$(`space-y-2`,e),...t})})});NH.displayName=`FormItem`;var PH=V.forwardRef(({className:e,...t},n)=>{let{error:r,formItemId:i}=jH();return(0,H.jsx)(kH,{ref:n,className:$(r&&`text-destructive`,e),htmlFor:i,...t})});PH.displayName=`FormLabel`;var FH=V.forwardRef(({...e},t)=>{let{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=jH();return(0,H.jsx)(w_,{ref:t,id:r,"aria-describedby":n?`${i} ${a}`:`${i}`,"aria-invalid":!!n,...e})});FH.displayName=`FormControl`;var IH=V.forwardRef(({className:e,...t},n)=>{let{formDescriptionId:r}=jH();return(0,H.jsx)(`p`,{ref:n,id:r,className:$(`text-sm text-muted-foreground`,e),...t})});IH.displayName=`FormDescription`;var LH=V.forwardRef(({className:e,children:t,...n},r)=>{let{error:i,formMessageId:a}=jH(),o=i?String(i?.message??``):t;return o?(0,H.jsx)(`p`,{ref:r,id:a,className:$(`text-sm font-medium text-destructive`,e),...n,children:o}):null});LH.displayName=`FormMessage`;var RH=V.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,H.jsx)(mj,{ref:i,align:t,sideOffset:n,className:$(`z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]`,e),...r}));RH.displayName=mj.displayName;var zH=e=>(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,H.jsx)(`circle`,{cx:12.1,cy:12.1,r:1,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2})}),BH=V.forwardRef(({className:e,containerClassName:t,...n},r)=>(0,H.jsx)(Nj,{ref:r,containerClassName:$(`flex items-center gap-2 has-[:disabled]:opacity-50`,t),className:$(`disabled:cursor-not-allowed`,e),...n}));BH.displayName=`InputOTP`;var VH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(`div`,{ref:n,className:$(`flex items-center`,e),...t}));VH.displayName=`InputOTPGroup`;var HH=V.forwardRef(({index:e,className:t,...n},r)=>{let{char:i,hasFakeCaret:a,isActive:o}=V.useContext(Mj).slots[e];return(0,H.jsxs)(`div`,{ref:r,className:$(`relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md`,o&&`z-10 ring-2 ring-ring ring-offset-background`,t),...n,children:[i,a&&(0,H.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,H.jsx)(`div`,{className:`h-4 w-px animate-caret-blink bg-foreground duration-1000`})})]})});HH.displayName=`InputOTPSlot`;var UH=V.forwardRef(({...e},t)=>(0,H.jsx)(`div`,{ref:t,role:`separator`,...e,children:(0,H.jsx)(zH,{})}));UH.displayName=`InputOTPSeparator`;var WH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(OM,{ref:n,className:$(`flex h-10 items-center space-x-1 rounded-md border bg-background p-1`,e),...t}));WH.displayName=OM.displayName;var GH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(kM,{ref:n,className:$(`flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,e),...t}));GH.displayName=kM.displayName;var KH=V.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,H.jsxs)(RM,{ref:i,className:$(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,t&&`pl-8`,e),...r,children:[n,(0,H.jsx)(rV,{className:`ml-auto h-4 w-4`})]}));KH.displayName=RM.displayName;var qH=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(zM,{ref:n,className:$(`z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]`,e),...t}));qH.displayName=zM.displayName;var JH=V.forwardRef(({className:e,align:t=`start`,alignOffset:n=-4,sideOffset:r=8,...i},a)=>(0,H.jsx)(AM,{children:(0,H.jsx)(jM,{ref:a,align:t,alignOffset:n,sideOffset:r,className:$(`z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]`,e),...i})}));JH.displayName=jM.displayName;var YH=V.forwardRef(({className:e,inset:t,...n},r)=>(0,H.jsx)(NM,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,t&&`pl-8`,e),...n}));YH.displayName=NM.displayName;var XH=V.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,H.jsxs)(PM,{ref:i,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),checked:n,...r,children:[(0,H.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,H.jsx)(IM,{children:(0,H.jsx)(xV,{className:`h-4 w-4`})})}),t]}));XH.displayName=PM.displayName;var ZH=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsxs)(FM,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,H.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,H.jsx)(IM,{children:(0,H.jsx)($V,{className:`h-2 w-2 fill-current`})})}),t]}));ZH.displayName=FM.displayName;var QH=V.forwardRef(({className:e,inset:t,...n},r)=>(0,H.jsx)(MM,{ref:r,className:$(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));QH.displayName=MM.displayName;var $H=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(LM,{ref:n,className:$(`-mx-1 my-1 h-px bg-muted`,e),...t}));$H.displayName=LM.displayName;var eU=({className:e,...t})=>(0,H.jsx)(`span`,{className:$(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});eU.displayname=`MenubarShortcut`;var tU=V.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,H.jsx)(GM,{ref:i,decorative:n,orientation:t,className:$(`shrink-0 bg-border`,t===`horizontal`?`h-px w-full`:`h-full w-px`,e),...r}));tU.displayName=GM.displayName;function nU(e){return typeof e==`object`&&!!e&&`value`in e}function rU(e,t){let n=e.multiple===!0,r=e.async===!0,i=(0,V.useRef)(null);(0,V.useImperativeHandle)(t,()=>i.current);let[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(``),[l,u]=(0,V.useState)(new Map),d=r&&`onOpenChange`in e?e.onOpenChange:void 0,f=(0,V.useRef)(a);(0,V.useEffect)(()=>{f.current!==a&&(d&&d(a),f.current=a)},[a,d]);let p=(0,V.useCallback)(t=>t==null?``:e.valueKey?e.valueKey(t):String(t),[e.valueKey]),m=(0,V.useMemo)(()=>e.items.map(e=>nU(e)?e:{value:e}),[e.items]),h=(0,V.useMemo)(()=>{let e=new Map;for(let t of m)e.set(p(t.value),t.value);return e},[m,p]),g=(0,V.useCallback)(t=>{if(e.renderItem)return e.renderItem(t);let n=m.find(e=>e.value===t);if(n?.label!==void 0)return n.label;if(r){let e=l.get(p(t));if(e?.label!==void 0)return e.label}return String(t)},[e.renderItem,m,r,l,p]);(0,V.useEffect)(()=>{if(!r)return;let t=n?e.value:[e.value].filter(Boolean),i=new Map;for(let e of t){let t=p(e),n=m.find(t=>t.value===e);n&&i.set(t,n)}u(i)},[r,n,e,m,p]);let _=(0,V.useCallback)(e=>{c(e)},[]),v=r&&`onSearch`in e?e.onSearch:void 0,y=r&&`searchDebounce`in e&&e.searchDebounce!==void 0?e.searchDebounce:300;(0,V.useEffect)(()=>{if(!v)return;let e=setTimeout(()=>{v(s)},s===``?0:y);return()=>clearTimeout(e)},[s,v,y]);let b=(0,V.useMemo)(()=>{if(r){let e=new Map;for(let[t,n]of l)e.set(t,n);for(let t of m)e.set(p(t.value),t);return Array.from(e.values())}else return s?m.filter(e=>{let t=g(e.value);return String(t).toLowerCase().includes(s.toLowerCase())}):m},[r,m,l,s,p,g]);return(0,V.useEffect)(()=>{a||c(``)},[a]),{isMultiple:n,isAsync:r,selectRef:i,isPopoverOpen:a,setIsPopoverOpen:o,searchValue:s,handleSearchChange:_,filteredOptions:b,normalizedItems:m,getKeyForValue:p,valueByKey:h,getItemLabel:g}}function iU(e,t){if(!t||typeof e!=`string`)return e;let n=e.toLowerCase(),r=t.toLowerCase(),i=n.indexOf(r);if(i===-1)return e;let a=e.slice(0,i),o=e.slice(i,i+t.length),s=e.slice(i+t.length);return(0,H.jsxs)(H.Fragment,{children:[a,(0,H.jsx)(`strong`,{className:`font-bold`,children:o}),s]})}function aU({props:e,isMultiple:t,isAsync:n,isPopoverOpen:r,setIsPopoverOpen:i,searchValue:a,handleSearchChange:o,filteredOptions:s,getKeyForValue:c,getItemLabel:l}){let{SD:u}=jV(),[d,f]=(0,V.useState)(null),p=(0,V.useCallback)(e=>{f(e)},[]),[m,h]=(0,V.useState)(null),g=(0,V.useCallback)(e=>{h(e)},[]),_=n&&`onLoadMore`in e?e.onLoadMore:void 0,v=n&&`hasMore`in e?e.hasMore??!1:!1,y=n&&`isLoadingMore`in e?e.isLoadingMore??!1:!1,b=n&&_!==void 0;(0,V.useEffect)(()=>{if(!_||!v||y||!m||!d)return;let e=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&_()},{root:d,threshold:0});return e.observe(m),()=>e.disconnect()},[m,d,_,v,y]);let x=e.searchable??n,S=(0,V.useCallback)(e=>{let t=d;if(!t)return;let n=t.scrollTop<t.scrollHeight-t.clientHeight,r=t.scrollTop>0;(e.deltaY>0&&n||e.deltaY<0&&r)&&e.stopPropagation()},[d]),C=(0,V.useCallback)(n=>{if(!e.disabled)if(t){let t=e.value,r=t.includes(n)?t.filter(e=>e!==n):[...t,n];e.onValueChange(r)}else e.onValueChange?.(n),i(!1)},[t,e,i]),w=(0,V.useCallback)(()=>{if(!t||e.disabled)return;let n=s.filter(e=>!e.disabled);if(e.value.length===n.length)e.onValueChange([]);else{let t=n.map(e=>e.value);e.onValueChange(t)}},[t,e,s]),T=(0,V.useCallback)(()=>{e.disabled||(t?e.onValueChange([]):e.onValueChange?.(void 0))},[t,e]),E=(0,V.useCallback)(n=>t?e.value.includes(n):e.value===n,[t,e]),D=n&&`loading`in e?e.loading:!1,O=n&&`error`in e?e.error:void 0,k=t?e.value.length>0:e.value!==void 0&&e.value!==null&&e.value!==``,A=()=>{if(!t)return null;let n=e.value;return(0,H.jsx)(H.Fragment,{children:n.map(e=>{let t=c(e);return(0,H.jsxs)(nV,{variant:`outline`,className:`m-1 transition-all duration-300 ease-in-out`,children:[l(e),(0,H.jsx)(wV,{className:`ml-2 h-3 w-3 cursor-pointer`,onClick:t=>{t.stopPropagation(),C(e)}})]},t)})})};return(0,H.jsxs)(YV,{open:r,onOpenChange:i,children:[(0,H.jsx)(XV,{asChild:!0,children:(0,H.jsx)(HB,{variant:`outline`,role:`combobox`,"aria-expanded":r,disabled:e.disabled||D,className:$(`flex p-1 rounded-md border border-input min-h-10 h-auto items-center justify-between bg-white hover:bg-white hover:text-inherit [&_svg]:pointer-events-auto w-full`,e.className),children:t&&k?(0,H.jsxs)(`div`,{className:`flex justify-between items-center w-full`,children:[(0,H.jsx)(`div`,{className:`flex items-center gap-1 flex-wrap`,children:A()}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[e.clearable&&(0,H.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e=>{e.stopPropagation(),T()},className:`flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground`,children:(0,H.jsx)(NV,{className:`h-4 w-4`})}),(0,H.jsx)(tU,{orientation:`vertical`,className:`flex min-h-6 h-full`}),(0,H.jsx)(jB,{className:`h-4 mx-2 cursor-pointer text-muted-foreground`})]})]}):!t&&k?(0,H.jsxs)(`div`,{className:`flex justify-between items-center w-full px-2 py-1`,children:[(()=>{let t=e.value;return t==null?null:(0,H.jsx)(`span`,{className:`flex-1 truncate text-left text-sm`,children:l(t)})})(),(0,H.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[e.clearable&&k&&(0,H.jsx)(wV,{className:`h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity`,onPointerDownCapture:T,onMouseDownCapture:T}),(0,H.jsx)(jB,{className:`h-4 w-4 opacity-50`})]})]}):(0,H.jsxs)(`div`,{className:`flex items-center justify-between w-full px-2 py-1`,children:[(0,H.jsx)(`span`,{className:`text-sm text-muted-foreground flex-1 truncate text-left`,children:e.placeholder}),(0,H.jsx)(jB,{className:`h-4 cursor-pointer text-muted-foreground`})]})})}),(0,H.jsx)(ZV,{className:`min-w-40 p-0`,align:`start`,style:{width:`var(--radix-popover-trigger-width)`},children:(0,H.jsxs)(VV,{shouldFilter:!1,children:[x&&(0,H.jsx)(HV,{placeholder:u(`common.searchPlaceholder`),value:a,onValueChange:o}),(0,H.jsx)(UV,{ref:p,onWheel:S,children:D?(0,H.jsx)(WV,{children:(0,H.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,H.jsx)(DH,{className:`h-4 w-4 animate-spin mr-2`})})}):O?(0,H.jsxs)(WV,{children:[`Error: `,O.message]}):s.length===0?(0,H.jsx)(WV,{children:u(`rc.multiSelect.noResults`)}):(0,H.jsxs)(H.Fragment,{children:[t&&!(`hideSelectAll`in e&&e.hideSelectAll)&&(0,H.jsx)(GV,{children:(0,H.jsxs)(qV,{onSelect:w,className:`cursor-pointer`,children:[(0,H.jsx)(`div`,{className:$(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,e.value.length===s.filter(e=>!e.disabled).length?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),children:(0,H.jsx)(xV,{className:`h-4 w-4`})}),(0,H.jsxs)(`span`,{children:[`(`,u(`rc.multiSelect.selectAll`),`)`]})]})}),(0,H.jsx)(GV,{children:s.map(e=>{let n=c(e.value),r=E(e.value);return(0,H.jsxs)(qV,{onSelect:()=>C(e.value),disabled:e.disabled,className:$(`cursor-pointer`,e.disabled&&`opacity-50 cursor-not-allowed`),children:[t&&(0,H.jsx)(`div`,{className:$(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,r?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),children:(0,H.jsx)(xV,{className:`h-4 w-4`})}),!t&&(0,H.jsx)(xV,{className:$(`mr-2 h-4 w-4`,r?`opacity-100`:`opacity-0`)}),(0,H.jsx)(`span`,{children:iU(l(e.value),a)})]},n)})}),b&&(0,H.jsx)(`div`,{ref:g,className:`flex items-center justify-center py-2 text-xs text-muted-foreground`,children:y?(0,H.jsx)(DH,{className:`h-3 w-3 animate-spin`}):null})]})})]})})]})}V.forwardRef(function(e,t){let n=rU(e,t);return(0,H.jsx)(aU,{props:e,isMultiple:n.isMultiple,isAsync:n.isAsync,isPopoverOpen:n.isPopoverOpen,setIsPopoverOpen:n.setIsPopoverOpen,searchValue:n.searchValue,handleSearchChange:n.handleSearchChange,filteredOptions:n.filteredOptions,getKeyForValue:n.getKeyForValue,getItemLabel:n.getItemLabel})});var oU=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsxs)(JN,{ref:r,className:$(`relative z-10 flex max-w-max flex-1 items-center justify-center`,e),...n,children:[t,(0,H.jsx)(dU,{})]}));oU.displayName=JN.displayName;var sU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(YN,{ref:n,className:$(`group flex flex-1 list-none items-center justify-center space-x-1`,e),...t}));sU.displayName=YN.displayName;var cU=Xp(`group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent`),lU=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsxs)(XN,{ref:r,className:$(cU(),`group`,e),...n,children:[t,` `,(0,H.jsx)(jB,{className:`relative top-px ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180`,"aria-hidden":`true`})]}));lU.displayName=XN.displayName;var uU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(QN,{ref:n,className:$(`left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto `,e),...t}));uU.displayName=QN.displayName;var dU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(`div`,{className:$(`absolute left-0 top-full flex justify-center`),children:(0,H.jsx)($N,{className:$(`origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)`,e),ref:n,...t})}));dU.displayName=$N.displayName;var fU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(ZN,{ref:n,className:$(`top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in`,e),...t,children:(0,H.jsx)(`div`,{className:`relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md`})}));fU.displayName=ZN.displayName;var pU=V.forwardRef(({value:e,onValueChange:t,total:n,itemsPerPage:r,className:i,maxVisible:a=6},o)=>{let{SD:s}=jV(),c=Math.ceil(n/r),l=e,u=(l-1)*r+1,d=Math.min(l*r,n);return(0,H.jsxs)(`div`,{ref:o,className:$(`flex items-center justify-between pt-6`,i),children:[(0,H.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:s(`rc.pagination.showing`)(u,d,n)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(HB,{variant:`outline`,size:`sm`,className:`h-8 px-3 text-xs`,disabled:l===1,onClick:()=>t(l-1),children:s(`rc.pagination.previous`)}),(0,H.jsx)(`div`,{className:`flex items-center gap-1`,children:(()=>{let e=Math.max(1,l-Math.floor(a/2)),n=Math.min(c,e+a-1);return n-e+1<a&&(e=Math.max(1,n-a+1)),Array.from({length:n-e+1},(t,n)=>e+n).map(e=>(0,H.jsx)(HB,{variant:`outline`,size:`sm`,className:`h-8 w-8 text-xs ${e===l?`bg-primary text-primary-foreground`:``}`,onClick:()=>t(e),children:e},e))})()}),(0,H.jsx)(HB,{variant:`outline`,size:`sm`,className:`h-8 px-3 text-xs`,disabled:l===c,onClick:()=>t(l+1),children:s(`rc.pagination.next`)})]})]})});pU.displayName=`Pagination`;var mU=V.forwardRef(({className:e,value:t,...n},r)=>(0,H.jsx)(gP,{ref:r,className:$(`relative h-4 w-full overflow-hidden rounded-full bg-secondary`,e),...n,children:(0,H.jsx)(_P,{className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})}));mU.displayName=gP.displayName;var hU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(HP,{className:$(`grid gap-2`,e),...t,ref:n}));hU.displayName=HP.displayName;var gU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(UP,{ref:n,className:$(`aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,H.jsx)(WP,{className:`flex items-center justify-center`,children:(0,H.jsx)(`div`,{className:`h-2 w-2 rounded-full bg-current`})})}));gU.displayName=UP.displayName;var _U=V.forwardRef(({className:e,children:t,...n},r)=>(0,H.jsxs)(gL,{ref:r,className:$(`relative overflow-hidden`,e),...n,children:[(0,H.jsx)(_L,{className:`h-full w-full rounded-[inherit]`,children:t}),(0,H.jsx)(vU,{}),(0,H.jsx)(vL,{})]}));_U.displayName=gL.displayName;var vU=V.forwardRef(({className:e,orientation:t=`vertical`,...n},r)=>(0,H.jsx)(WI,{ref:r,orientation:t,className:$(`flex touch-none select-none transition-colors`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent p-px`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent p-px`,e),...n,children:(0,H.jsx)(tL,{className:`relative flex-1 rounded-full bg-border`})}));vU.displayName=WI.displayName;var yU=Fg,bU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Ig,{className:$(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));bU.displayName=Ig.displayName;var xU=Xp(`fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500`,{variants:{side:{top:`inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,bottom:`inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,left:`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,right:`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`}},defaultVariants:{side:`right`}}),SU=V.forwardRef(({side:e=`right`,className:t,children:n,...r},i)=>(0,H.jsxs)(yU,{children:[(0,H.jsx)(bU,{}),(0,H.jsxs)(Lg,{ref:i,className:$(xU({side:e}),t),...r,children:[n,(0,H.jsxs)(Bg,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,H.jsx)(NV,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));SU.displayName=Lg.displayName;var CU=({className:e,...t})=>(0,H.jsx)(`div`,{className:$(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});CU.displayName=`SheetHeader`;var wU=({className:e,...t})=>(0,H.jsx)(`div`,{className:$(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});wU.displayName=`SheetFooter`;var TU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Rg,{ref:n,className:$(`text-lg font-semibold text-foreground`,e),...t}));TU.displayName=Rg.displayName;var EU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(zg,{ref:n,className:$(`text-sm text-muted-foreground`,e),...t}));EU.displayName=zg.displayName;var DU=V.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,H.jsx)($L,{ref:r,sideOffset:t,className:$(`z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]`,e),...n}));DU.displayName=$L.displayName,V.createContext(null);var OU=V.forwardRef(({className:e,name:t,value:n,defaultValue:r,onValueChange:i,onBlur:a,...o},s)=>{let c=V.useRef(null);V.useImperativeHandle(s,()=>c.current);let l=e=>{i?.(e[0])},u=MB(n),d=MB(r);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{type:`range`,ref:c,name:t,defaultValue:d?.[0],onBlur:a,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),(0,H.jsxs)(IR,{value:u,defaultValue:d,onValueChange:l,className:$(`relative flex w-full touch-none select-none items-center`,e),...o,children:[(0,H.jsx)(LR,{className:`relative h-2 w-full grow overflow-hidden rounded-full bg-secondary`,children:(0,H.jsx)(RR,{className:`absolute h-full bg-primary`})}),(0,H.jsx)(zR,{className:`block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`})]})]})});OU.displayName=`Slider`;var kU=V.forwardRef(({className:e,name:t,checked:n,value:r,defaultChecked:i,onValueChange:a,onBlur:o,...s},c)=>{let l=r===void 0?n:r,u=V.useRef(null);V.useImperativeHandle(c,()=>u.current);let d=e=>{a?.(e)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{type:`checkbox`,ref:u,name:t,defaultChecked:i,onBlur:o,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),(0,H.jsx)(ZR,{checked:l,defaultChecked:i,onCheckedChange:d,className:$(`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...s,children:(0,H.jsx)(QR,{className:$(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0`)})})]})});kU.displayName=`Switch`;var AU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(mz,{ref:n,className:$(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));AU.displayName=mz.displayName;var jU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(hz,{ref:n,className:$(`inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm`,e),...t}));jU.displayName=hz.displayName;var MU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(gz,{ref:n,className:$(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));MU.displayName=gz.displayName;var NU=V.forwardRef(({className:e,onValueChange:t,onChange:n,...r},i)=>{let a=e=>{t?.(e.target.value),n?.(e)};return(0,H.jsx)(`textarea`,{className:$(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:i,...r,onChange:a})});NU.displayName=`Textarea`;var PU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(aB,{ref:n,className:$(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]`,e),...t}));PU.displayName=aB.displayName;var FU=Xp(`group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),IU=V.forwardRef(({className:e,variant:t,...n},r)=>(0,H.jsx)(oB,{ref:r,className:$(FU({variant:t}),e),...n}));IU.displayName=oB.displayName;var LU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(lB,{ref:n,className:$(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive`,e),...t}));LU.displayName=lB.displayName;var RU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(uB,{ref:n,className:$(`absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...t,children:(0,H.jsx)(NV,{className:`h-4 w-4`})}));RU.displayName=uB.displayName;var zU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(sB,{ref:n,className:$(`text-sm font-semibold`,e),...t}));zU.displayName=sB.displayName;var BU=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(cB,{ref:n,className:$(`text-sm opacity-90`,e),...t}));BU.displayName=cB.displayName;var VU=Xp(`inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-accent hover:text-accent-foreground`},size:{default:`h-10 px-3 min-w-10`,sm:`h-9 px-2.5 min-w-9`,lg:`h-11 px-5 min-w-11`}},defaultVariants:{variant:`default`,size:`default`}}),HU=V.forwardRef(({className:e,variant:t,size:n,value:r,pressed:i,onValueChange:a,onPressedChange:o,...s},c)=>{let l=r===void 0?i:r;return(0,H.jsx)(pB,{ref:c,pressed:l,onPressedChange:e=>{a?.(e),o?.(e)},className:$(VU({variant:t,size:n,className:e})),...s})});HU.displayName=pB.displayName;var UU=V.createContext({size:`default`,variant:`default`}),WU=V.forwardRef(({className:e,variant:t,size:n,children:r,...i},a)=>(0,H.jsx)(kB,{ref:a,className:$(`flex items-center justify-center gap-1`,e),...i,children:(0,H.jsx)(UU.Provider,{value:{variant:t,size:n},children:r})}));WU.displayName=kB.displayName;var GU=V.forwardRef(({className:e,children:t,variant:n,size:r,...i},a)=>{let o=V.useContext(UU);return(0,H.jsx)(AB,{ref:a,className:$(VU({variant:o.variant||n,size:o.size||r}),e),...i,children:t})});GU.displayName=AB.displayName;var KU=e=>ie(e);function qU({children:e}){return(0,H.jsx)(AV,{SD:KU,children:e})}var JU=_()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:YU});function YU(){let{queryClient:e}=JU.useRouteContext();return(0,H.jsxs)(`html`,{lang:`en`,children:[(0,H.jsxs)(`head`,{children:[(0,H.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,H.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.googleapis.com`}),(0,H.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:``}),(0,H.jsx)(`link`,{href:`https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=DM+Mono:wght@400;500&display=swap`,rel:`stylesheet`}),(0,H.jsx)(w,{})]}),(0,H.jsxs)(`body`,{children:[(0,H.jsx)(`div`,{id:`root`,children:(0,H.jsx)(k,{client:e,children:(0,H.jsx)(qU,{children:(0,H.jsx)(Qu,{children:(0,H.jsx)(h,{})})})})}),(0,H.jsx)(O,{})]})]})}var XU=D(`/tokens`)({component:T(()=>he(()=>import(`./tokens-DU2Iyxxd.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`)}),ZU=D(`/settings`)({component:T(()=>he(()=>import(`./settings-D3tDSAck.js`),__vite__mapDeps([8,1,2,3,4,6,7])),`component`)}),QU=()=>he(()=>import(`./monit-D-JwXXoA.js`),__vite__mapDeps([9,1,2,3,4,10,11])),$U=I({level:z([`all`,`warn`,`error`]).optional().default(`all`).catch(()=>`all`)}),eW=D(`/monit`)({validateSearch:$U,component:T(QU,`component`)}),tW=ae(I({type:F(),role:F().optional(),content:te().optional(),name:F().optional(),arguments:F().optional(),call_id:F().optional(),output:F().optional()})),nW=fe([I({accessToken:F(),refreshToken:F(),expiresAt:pe(),accountUuid:F()}),I({accessToken:F(),refreshToken:F(),idToken:F().optional(),accessTokenExpiresAt:pe(),idTokenExpiresAt:pe().optional(),accountId:F(),planType:F().optional()})]),rW=ae(I({name:F(),description:F().optional(),inputSchema:te()})),iW=z([`id-desc`,`id-asc`,`created_at-desc`,`created_at-asc`,`ttft_ms-desc`,`ttft_ms-asc`,`duration_ms-desc`,`duration_ms-asc`,`input_tokens-desc`,`input_tokens-asc`,`output_tokens-desc`,`output_tokens-asc`,`cache_read_tokens-desc`,`cache_read_tokens-asc`,`cache_creation_tokens-desc`,`cache_creation_tokens-asc`,`cost_usd-desc`,`cost_usd-asc`]).describe(`RequestLogOrderBy`),aW=z([`id`,`token_name`,`user_prompt`]).describe(`RequestLogSearchField`),oW=z([`running`,`succeeded`,`error`,`aborted`]).describe(`RequestLogStatus`),sW=z([`generate`,`tool_call`]).describe(`RequestLogStepType`),cW=z([`id-asc`]).describe(`RequestLogStepOrderBy`),lW=z([`id`]).describe(`RequestLogStepSearchField`),uW=z([`key-asc`]).describe(`SettingOrderBy`),dW=z([`key`]).describe(`SettingSearchField`),fW=z([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),pW=z([`id`,`name`]).describe(`TokenSearchField`);I({id:L(),created_at:me(),token_name:F().max(100).nullable(),project_name:F().max(50).nullable(),model_name:F().max(255).nullable(),requested_model_name:F().max(255).nullable(),fallback_count:L().nullable(),user_prompt:F().nullable(),system_prompt:F().nullable(),response:F(),input_tokens:L(),output_tokens:L(),cache_read_tokens:L(),cache_creation_tokens:L(),cache_creation_5m_tokens:L().nullable(),cache_creation_1h_tokens:L().nullable(),duration_ms:L(),ttft_ms:L(),cost_usd:L().nullable(),cost_source:F().max(20).nullable(),image_cost_usd:L().nullable(),image_cost_method:F().max(100).nullable(),service_tier:F().max(20).nullable(),effort:F().max(10).nullable(),history:tW.nullable(),tools:rW.nullable(),json_schema:F().nullable(),status:oW,error_message:F().nullable(),response_json_ok:ne().nullable(),tool_call_count:L(),is_image_generation:ne(),is_structured:ne()}),I({id:L(),created_at:me(),request_log_id:L(),step_index:L(),type:sW,model_name:F().max(255).nullable(),requested_model_name:F().max(255).nullable(),fallback_count:L().nullable(),input_tokens:L().nullable(),output_tokens:L().nullable(),cache_read_tokens:L().nullable(),cache_creation_tokens:L().nullable(),cache_creation_5m_tokens:L().nullable(),cache_creation_1h_tokens:L().nullable(),cost_usd:L().nullable(),cost_source:F().max(20).nullable(),duration_ms:L().nullable(),ttft_ms:L().nullable(),finish_reason:F().max(20).nullable(),reasoning_text:F().nullable(),reasoning_tokens:L().nullable(),tool_call_index:L().nullable(),tool_call_id:F().max(100).nullable(),tool_name:F().max(100).nullable(),tool_args:F().nullable(),tool_result:F().nullable(),tool_duration_ms:L().nullable(),error:F().nullable()}),I({id:L(),created_at:me(),key:F().max(100),value:F(),updated_at:me().nullable()}),I({id:L(),created_at:me(),provider:F().max(20),credentials:nW,name:F(),active:ne(),reauth_required:ne(),ord:L(),quota_threshold:L().nullable(),weight:L(),keepalive_enabled:ne()});var mW=I({num:pe().int().nonnegative(),page:pe().int().min(1),search:aW,keyword:F(),orderBy:iW,queryMode:ue,id:re(pe().int().positive()),sonamuFilter:de(),token_name:F().max(100).nullable(),project_name:F().max(50).nullable(),model_name:F().max(255).nullable()}).partial();I({num:pe().int().nonnegative(),page:pe().int().min(1),search:lW,keyword:F(),orderBy:cW,queryMode:ue,id:re(pe().int().positive()),sonamuFilter:de(),request_log_id:L()}).partial(),I({num:pe().int().nonnegative(),page:pe().int().min(1),search:dW,keyword:F(),orderBy:uW,queryMode:ue,id:re(pe().int().positive()),sonamuFilter:de(),key:F().max(100)}).partial(),I({num:pe().int().nonnegative(),page:pe().int().min(1),search:pW,keyword:F(),orderBy:fW,queryMode:ue,id:re(pe().int().positive()),sonamuFilter:de()}).partial(),I({id:L(),created_at:me(),token_name:F().max(100).nullable(),project_name:F().max(50).nullable(),model_name:F().max(255).nullable(),requested_model_name:F().max(255).nullable(),fallback_count:L().nullable(),user_prompt:F().nullable(),system_prompt:F().nullable(),response:F(),input_tokens:L(),output_tokens:L(),cache_read_tokens:L(),cache_creation_tokens:L(),cache_creation_5m_tokens:L().nullable(),cache_creation_1h_tokens:L().nullable(),duration_ms:L(),ttft_ms:L(),cost_usd:L().nullable(),cost_source:F().max(20).nullable(),image_cost_usd:L().nullable(),image_cost_method:F().max(100).nullable(),effort:F().max(10).nullable(),service_tier:F().max(20).nullable(),history:tW.nullable(),tools:rW.nullable(),status:oW,response_json_ok:ne().nullable(),error_message:F().nullable(),tool_call_count:L(),is_image_generation:ne(),is_structured:ne()}),I({id:L(),created_at:me(),token_name:F().max(100).nullable(),project_name:F().max(50).nullable(),model_name:F().max(255).nullable(),requested_model_name:F().max(255).nullable(),fallback_count:L().nullable(),input_tokens:L(),output_tokens:L(),cache_read_tokens:L(),cache_creation_tokens:L(),cache_creation_5m_tokens:L().nullable(),cache_creation_1h_tokens:L().nullable(),duration_ms:L(),ttft_ms:L(),cost_usd:L().nullable(),cost_source:F().max(20).nullable(),image_cost_usd:L().nullable(),image_cost_method:F().max(100).nullable(),effort:F().max(10).nullable(),service_tier:F().max(20).nullable(),status:oW,response_json_ok:ne().nullable(),tool_call_count:L(),is_image_generation:ne(),is_structured:ne()}),I({id:L(),token_name:F().max(100).nullable(),model_name:F().max(255).nullable(),input_tokens:L(),output_tokens:L(),cache_read_tokens:L(),cache_creation_tokens:L(),cache_creation_5m_tokens:L().nullable(),cache_creation_1h_tokens:L().nullable(),cost_usd:L().nullable(),cost_source:F().max(20).nullable()}),z([`A`,`P`,`C`]),I({id:L(),created_at:me(),step_index:L(),type:sW,model_name:F().max(255).nullable(),requested_model_name:F().max(255).nullable(),fallback_count:L().nullable(),input_tokens:L().nullable(),output_tokens:L().nullable(),cache_read_tokens:L().nullable(),cache_creation_tokens:L().nullable(),cache_creation_5m_tokens:L().nullable(),cache_creation_1h_tokens:L().nullable(),cost_usd:L().nullable(),cost_source:F().max(20).nullable(),duration_ms:L().nullable(),ttft_ms:L().nullable(),finish_reason:F().max(20).nullable(),reasoning_text:F().nullable(),reasoning_tokens:L().nullable(),tool_call_index:L().nullable(),tool_call_id:F().max(100).nullable(),tool_name:F().max(100).nullable(),tool_args:F().nullable(),tool_result:F().nullable(),tool_duration_ms:L().nullable(),error:F().nullable()}),I({id:L(),created_at:me(),step_index:L(),type:sW,model_name:F().max(255).nullable(),requested_model_name:F().max(255).nullable(),fallback_count:L().nullable(),input_tokens:L().nullable(),output_tokens:L().nullable(),cache_read_tokens:L().nullable(),cache_creation_tokens:L().nullable(),cache_creation_5m_tokens:L().nullable(),cache_creation_1h_tokens:L().nullable(),cost_usd:L().nullable(),cost_source:F().max(20).nullable(),duration_ms:L().nullable(),ttft_ms:L().nullable(),finish_reason:F().max(20).nullable(),reasoning_tokens:L().nullable(),tool_call_index:L().nullable(),tool_call_id:F().max(100).nullable(),tool_name:F().max(100).nullable(),tool_duration_ms:L().nullable(),error:F().nullable()}),I({id:L(),tool_args:F().nullable()}),z([`A`,`T`,`I`]),I({id:L(),created_at:me(),key:F().max(100),value:F(),updated_at:me().nullable()}),z([`A`]),I({id:L(),created_at:me(),provider:F().max(20),credentials:nW,name:F(),active:ne(),reauth_required:ne(),ord:L(),quota_threshold:L().nullable(),weight:L(),keepalive_enabled:ne()}),z([`A`]);var hW=()=>he(()=>import(`./logs-B2SmWJXA.js`),__vite__mapDeps([12,1,2,3,4,10,13,11])),gW=I({token:F().optional(),project:F().optional(),model:F().optional(),sort:iW.optional(),page:mW.shape.page.default(1)}),_W=D(`/logs`)({validateSearch:gW,component:T(hW,`component`)}),vW=D(`/`)({component:T(()=>he(()=>import(`./routes-C5r4gTvY.js`),__vite__mapDeps([14,1,2,3,4,5,10,6])),`component`)}),yW=()=>he(()=>import(`./show-Cah_kUKC.js`),__vite__mapDeps([15,1,2,3,4,10,13])),bW=I({id:pe()}),xW=D(`/requests/show`)({validateSearch:bW,component:T(yW,`component`)}),SW=XU.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>JU}),CW=ZU.update({id:`/settings`,path:`/settings`,getParentRoute:()=>JU}),wW=eW.update({id:`/monit`,path:`/monit`,getParentRoute:()=>JU}),TW=_W.update({id:`/logs`,path:`/logs`,getParentRoute:()=>JU}),EW={IndexRoute:vW.update({id:`/`,path:`/`,getParentRoute:()=>JU}),LogsRoute:TW,MonitRoute:wW,SettingsRoute:CW,TokensRoute:SW,RequestsShowRoute:xW.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>JU})},DW=JU._addFileChildren(EW)._addFileTypes(),OW=new xe({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),kW=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),R):void 0;kW&&_e(OW,kW);var AW=window.__SONAMU_SSR_CONFIG__,jW=b({routeTree:DW,context:{queryClient:OW},defaultPreload:`intent`});(async()=>{await jW.load(),document.documentElement.innerHTML&&kW?AW?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),Se.createRoot(document).render((0,H.jsx)(E,{router:jW}))):Se.hydrateRoot(document,(0,H.jsx)(E,{router:jW})):Se.createRoot(document).render((0,H.jsx)(E,{router:jW}))})(),window.__TANSTACK_QUERY_CLIENT__=OW;export{eW as a,xu as c,ds as d,Te as f,iW as i,vu as l,_W as n,lH as o,mW as r,wf as s,xW as t,hu as u};
|