gemi 0.45.0 → 0.50.0-rc.2
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/dist/app/App.d.ts +1 -1
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/auth/AuthController.d.ts +107 -0
- package/dist/auth/AuthController.d.ts.map +1 -0
- package/dist/auth/{AuthenticationServiceContainer.d.ts → AuthManager.d.ts} +12 -7
- package/dist/auth/AuthManager.d.ts.map +1 -0
- package/dist/auth/AuthServiceProvider.d.ts +5 -0
- package/dist/auth/AuthServiceProvider.d.ts.map +1 -0
- package/dist/auth/config.d.ts +32 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/requests.d.ts +24 -0
- package/dist/auth/requests.d.ts.map +1 -0
- package/dist/auth/{AuthenticationServiceProvider.d.ts → routes.d.ts} +3 -33
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/bin/gemi.js +19631 -51226
- package/dist/bin/gemi.js.map +10 -74
- package/dist/bin/migrate/classBody.d.ts +31 -0
- package/dist/bin/migrate/classBody.d.ts.map +1 -0
- package/dist/bin/migrate/imports.d.ts +37 -0
- package/dist/bin/migrate/imports.d.ts.map +1 -0
- package/dist/bin/migrate/index.d.ts +6 -0
- package/dist/bin/migrate/index.d.ts.map +1 -0
- package/dist/bin/migrate/lex.d.ts +23 -0
- package/dist/bin/migrate/lex.d.ts.map +1 -0
- package/dist/bin/migrate/tables.d.ts +38 -0
- package/dist/bin/migrate/tables.d.ts.map +1 -0
- package/dist/broadcasting/index.js +1 -1
- package/dist/bun/plugin.js +2 -2
- package/dist/bun/plugin.js.map +1 -1
- package/dist/bun/preload.js +2 -2
- package/dist/bun/preload.js.map +1 -1
- package/dist/chunk-01gbjyc5.js +4 -0
- package/dist/{chunk-tyjhatbq.js.map → chunk-01gbjyc5.js.map} +2 -2
- package/dist/chunk-0e8313cy.js +5 -0
- package/dist/{chunk-b0ca3dzf.js.map → chunk-0e8313cy.js.map} +2 -2
- package/dist/chunk-0g7fds80.js +4 -0
- package/dist/{chunk-8jns0zmx.js.map → chunk-0g7fds80.js.map} +2 -2
- package/dist/{chunk-snp18f2m.js → chunk-0j1vfxj7.js} +3 -3
- package/dist/{chunk-snp18f2m.js.map → chunk-0j1vfxj7.js.map} +1 -1
- package/dist/chunk-0j8rgg32.js +4 -0
- package/dist/{chunk-atv6nybp.js.map → chunk-0j8rgg32.js.map} +16 -8
- package/dist/chunk-1jzj2t3t.js +5 -0
- package/dist/chunk-1jzj2t3t.js.map +10 -0
- package/dist/{chunk-4k7p344e.js → chunk-2mza564z.js} +2 -2
- package/dist/{chunk-4k7p344e.js.map → chunk-2mza564z.js.map} +1 -1
- package/dist/{chunk-n4wrg0sn.js → chunk-4a47a3tt.js} +3 -3
- package/dist/{chunk-f18weffa.js.map → chunk-4a47a3tt.js.map} +1 -1
- package/dist/chunk-4b8kjq68.js +5 -0
- package/dist/chunk-4b8kjq68.js.map +10 -0
- package/dist/chunk-4y8vkbtw.js +34 -0
- package/dist/chunk-4y8vkbtw.js.map +242 -0
- package/dist/chunk-563jg281.js +5 -0
- package/dist/chunk-563jg281.js.map +11 -0
- package/dist/chunk-5em8db18.js +5 -0
- package/dist/chunk-5em8db18.js.map +10 -0
- package/dist/{chunk-1nkxmecw.js → chunk-5f88sbt2.js} +3 -3
- package/dist/{chunk-1nkxmecw.js.map → chunk-5f88sbt2.js.map} +1 -1
- package/dist/{chunk-6av6dnxx.js → chunk-64smn3fn.js} +2 -2
- package/dist/{chunk-6av6dnxx.js.map → chunk-64smn3fn.js.map} +2 -2
- package/dist/{chunk-w54fj10r.js → chunk-6q2xys8x.js} +1 -1
- package/dist/chunk-7hh953xm.js +5 -0
- package/dist/chunk-7hh953xm.js.map +10 -0
- package/dist/chunk-7w6qsfm3.js +5 -0
- package/dist/chunk-7w6qsfm3.js.map +10 -0
- package/dist/{chunk-a3bmbfn3.js → chunk-9eg4q6hm.js} +2 -2
- package/dist/{chunk-a3bmbfn3.js.map → chunk-9eg4q6hm.js.map} +1 -1
- package/dist/{chunk-2a4ze3n3.js → chunk-a0hk8r8n.js} +3 -3
- package/dist/{chunk-2a4ze3n3.js.map → chunk-a0hk8r8n.js.map} +1 -1
- package/dist/{chunk-jrnbyhgq.js → chunk-ctffrrx4.js} +4 -4
- package/dist/{chunk-jrnbyhgq.js.map → chunk-ctffrrx4.js.map} +1 -1
- package/dist/{chunk-vpqq7v9e.js → chunk-eq02jfj2.js} +2 -2
- package/dist/{chunk-vpqq7v9e.js.map → chunk-eq02jfj2.js.map} +1 -1
- package/dist/chunk-g250akbq.js +4 -0
- package/dist/chunk-g250akbq.js.map +13 -0
- package/dist/{chunk-wtydwxgg.js → chunk-g7tytfm9.js} +3 -3
- package/dist/{chunk-wtydwxgg.js.map → chunk-g7tytfm9.js.map} +1 -1
- package/dist/chunk-h3b5b2rm.js +4 -0
- package/dist/{chunk-wed042aw.js.map → chunk-h3b5b2rm.js.map} +2 -2
- package/dist/{chunk-2cew23ww.js → chunk-jek07yr8.js} +3 -3
- package/dist/{chunk-2cew23ww.js.map → chunk-jek07yr8.js.map} +1 -1
- package/dist/chunk-jzqeb93s.js +4 -0
- package/dist/{chunk-2pazt3hc.js.map → chunk-jzqeb93s.js.map} +2 -2
- package/dist/chunk-k0rg0bh0.js +5 -0
- package/dist/chunk-k0rg0bh0.js.map +10 -0
- package/dist/chunk-k1xs9cjj.js +5 -0
- package/dist/chunk-k1xs9cjj.js.map +12 -0
- package/dist/{chunk-396qq8ge.js → chunk-kpzrdjqs.js} +2 -2
- package/dist/{chunk-396qq8ge.js.map → chunk-kpzrdjqs.js.map} +3 -3
- package/dist/{chunk-sv4v623e.js → chunk-ktdrrvqm.js} +3 -3
- package/dist/{chunk-sv4v623e.js.map → chunk-ktdrrvqm.js.map} +1 -1
- package/dist/chunk-m4nm4zy6.js +5 -0
- package/dist/{chunk-7bggj8g7.js.map → chunk-m4nm4zy6.js.map} +2 -2
- package/dist/{chunk-f18weffa.js → chunk-n5q0gwd9.js} +2 -2
- package/dist/{chunk-n4wrg0sn.js.map → chunk-n5q0gwd9.js.map} +1 -1
- package/dist/chunk-pda081kg.js +4 -0
- package/dist/{chunk-y4q11zr2.js.map → chunk-pda081kg.js.map} +2 -2
- package/dist/chunk-qb70bkja.js +4 -0
- package/dist/{chunk-vh6dnbty.js.map → chunk-qb70bkja.js.map} +2 -2
- package/dist/chunk-qwy7b1v6.js +5 -0
- package/dist/{chunk-tjzbw6eg.js.map → chunk-qwy7b1v6.js.map} +2 -2
- package/dist/chunk-sqafdycr.js +23 -0
- package/dist/chunk-sqafdycr.js.map +33 -0
- package/dist/{chunk-0r110r6m.js → chunk-t9ydh7x3.js} +3 -3
- package/dist/{chunk-0r110r6m.js.map → chunk-t9ydh7x3.js.map} +1 -1
- package/dist/chunk-vvp2dr94.js +5 -0
- package/dist/chunk-vvp2dr94.js.map +12 -0
- package/dist/{chunk-mped4eh6.js → chunk-w7kvrp0q.js} +4 -4
- package/dist/{chunk-mped4eh6.js.map → chunk-w7kvrp0q.js.map} +1 -1
- package/dist/{chunk-wjhh4pf0.js → chunk-wqzg9229.js} +3 -3
- package/dist/{chunk-wjhh4pf0.js.map → chunk-wqzg9229.js.map} +1 -1
- package/dist/{chunk-27tkdqp6.js → chunk-xdsjdz4a.js} +4 -4
- package/dist/{chunk-27tkdqp6.js.map → chunk-xdsjdz4a.js.map} +2 -2
- package/dist/chunk-xvfy2e73.js +4 -0
- package/dist/{chunk-ww5vyb4s.js.map → chunk-xvfy2e73.js.map} +2 -2
- package/dist/chunk-xvr6bezx.js +6 -0
- package/dist/{chunk-tvp3xgfq.js.map → chunk-xvr6bezx.js.map} +2 -2
- package/dist/{chunk-cmnhs4mh.js → chunk-y1h1tf4f.js} +3 -3
- package/dist/{chunk-cmnhs4mh.js.map → chunk-y1h1tf4f.js.map} +1 -1
- package/dist/chunk-ya4rt5nk.js +79 -0
- package/dist/{chunk-jxpwexpz.js.map → chunk-ya4rt5nk.js.map} +33 -24
- package/dist/chunk-ye31dsgf.js +5 -0
- package/dist/chunk-ye31dsgf.js.map +11 -0
- package/dist/chunk-z78ksnx2.js +5 -0
- package/dist/chunk-z78ksnx2.js.map +10 -0
- package/dist/chunk-zx3ypgvw.js +4 -0
- package/dist/{chunk-yyn0qk1w.js.map → chunk-zx3ypgvw.js.map} +1 -1
- package/dist/client/rpc.d.ts +1 -1
- package/dist/client/rpc.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/container/Container.d.ts +33 -0
- package/dist/container/Container.d.ts.map +1 -0
- package/dist/container/index.d.ts +2 -0
- package/dist/container/index.d.ts.map +1 -0
- package/dist/container/index.js +4 -0
- package/dist/container/index.js.map +9 -0
- package/dist/database/DatabaseManager.d.ts +14 -0
- package/dist/database/DatabaseManager.d.ts.map +1 -0
- package/dist/database/DatabaseServiceProvider.d.ts +5 -0
- package/dist/database/DatabaseServiceProvider.d.ts.map +1 -0
- package/dist/database/config.d.ts +11 -0
- package/dist/database/config.d.ts.map +1 -0
- package/dist/database/dialect.d.ts +11 -0
- package/dist/database/dialect.d.ts.map +1 -0
- package/dist/database/index.d.ts +5 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +4 -0
- package/dist/database/index.js.map +9 -0
- package/dist/email/Email.d.ts.map +1 -1
- package/dist/email/index.js +3 -3
- package/dist/email/index.js.map +3 -3
- package/dist/facades/Auth.d.ts +4 -1
- package/dist/facades/Auth.d.ts.map +1 -1
- package/dist/facades/Broadcast.d.ts +4 -1
- package/dist/facades/Broadcast.d.ts.map +1 -1
- package/dist/facades/DB.d.ts +12 -0
- package/dist/facades/DB.d.ts.map +1 -0
- package/dist/facades/Facade.d.ts +29 -0
- package/dist/facades/Facade.d.ts.map +1 -0
- package/dist/facades/Lang.d.ts +10 -0
- package/dist/facades/Lang.d.ts.map +1 -0
- package/dist/facades/Log.d.ts +4 -1
- package/dist/facades/Log.d.ts.map +1 -1
- package/dist/facades/Prefetch.d.ts +4 -1
- package/dist/facades/Prefetch.d.ts.map +1 -1
- package/dist/facades/RateLimiter.d.ts +4 -2
- package/dist/facades/RateLimiter.d.ts.map +1 -1
- package/dist/facades/Redis.d.ts +4 -1
- package/dist/facades/Redis.d.ts.map +1 -1
- package/dist/facades/{FileStorage.d.ts → Storage.d.ts} +5 -2
- package/dist/facades/Storage.d.ts.map +1 -0
- package/dist/facades/index.d.ts +4 -2
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/Application.d.ts +44 -0
- package/dist/foundation/Application.d.ts.map +1 -0
- package/dist/foundation/app.d.ts +15 -0
- package/dist/foundation/app.d.ts.map +1 -0
- package/dist/foundation/index.d.ts +3 -0
- package/dist/foundation/index.d.ts.map +1 -0
- package/dist/foundation/index.js +4 -0
- package/dist/foundation/index.js.map +9 -0
- package/dist/http/AuthenticationMiddlware.d.ts.map +1 -1
- package/dist/http/RateLimitMiddleware.d.ts.map +1 -1
- package/dist/http/index.d.ts +1 -1
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/http/middleware-config.d.ts +8 -0
- package/dist/http/middleware-config.d.ts.map +1 -0
- package/dist/i18n/I18nRouter.d.ts.map +1 -1
- package/dist/i18n/TranslationServiceProvider.d.ts +5 -0
- package/dist/i18n/TranslationServiceProvider.d.ts.map +1 -0
- package/dist/i18n/Translator.d.ts +17 -0
- package/dist/i18n/Translator.d.ts.map +1 -0
- package/dist/i18n/config.d.ts +13 -0
- package/dist/i18n/config.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +3 -1
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +3 -3
- package/dist/kernel/Kernel.d.ts +46 -33
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/KernelContext.d.ts.map +1 -1
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/index.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +5 -7
- package/dist/kernel/providers.d.ts +11 -0
- package/dist/kernel/providers.d.ts.map +1 -0
- package/dist/server/Server.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +3 -3
- package/dist/services/cron/ScheduleServiceProvider.d.ts +12 -0
- package/dist/services/cron/ScheduleServiceProvider.d.ts.map +1 -0
- package/dist/services/cron/Scheduler.d.ts +22 -0
- package/dist/services/cron/Scheduler.d.ts.map +1 -0
- package/dist/services/cron/config.d.ts +7 -0
- package/dist/services/cron/config.d.ts.map +1 -0
- package/dist/services/email/MailManager.d.ts +13 -0
- package/dist/services/email/MailManager.d.ts.map +1 -0
- package/dist/services/email/MailServiceProvider.d.ts +5 -0
- package/dist/services/email/MailServiceProvider.d.ts.map +1 -0
- package/dist/services/email/config.d.ts +9 -0
- package/dist/services/email/config.d.ts.map +1 -0
- package/dist/services/file-storage/FilesystemManager.d.ts +8 -0
- package/dist/services/file-storage/FilesystemManager.d.ts.map +1 -0
- package/dist/services/file-storage/FilesystemServiceProvider.d.ts +5 -0
- package/dist/services/file-storage/FilesystemServiceProvider.d.ts.map +1 -0
- package/dist/services/file-storage/config.d.ts +7 -0
- package/dist/services/file-storage/config.d.ts.map +1 -0
- package/dist/services/image-optimization/ImageManager.d.ts +16 -0
- package/dist/services/image-optimization/ImageManager.d.ts.map +1 -0
- package/dist/services/image-optimization/ImageServiceProvider.d.ts +5 -0
- package/dist/services/image-optimization/ImageServiceProvider.d.ts.map +1 -0
- package/dist/services/image-optimization/config.d.ts +7 -0
- package/dist/services/image-optimization/config.d.ts.map +1 -0
- package/dist/services/index.d.ts +37 -10
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +44 -2
- package/dist/services/index.js.map +159 -3
- package/dist/services/kernel-id/KernelId.d.ts +11 -0
- package/dist/services/kernel-id/KernelId.d.ts.map +1 -0
- package/dist/services/kernel-id/KernelIdServiceProvider.d.ts +2 -3
- package/dist/services/kernel-id/KernelIdServiceProvider.d.ts.map +1 -1
- package/dist/services/logging/LogManager.d.ts +28 -0
- package/dist/services/logging/LogManager.d.ts.map +1 -0
- package/dist/services/logging/LogServiceProvider.d.ts +13 -0
- package/dist/services/logging/LogServiceProvider.d.ts.map +1 -0
- package/dist/services/logging/LoggingRouter.d.ts.map +1 -1
- package/dist/services/logging/config.d.ts +9 -0
- package/dist/services/logging/config.d.ts.map +1 -0
- package/dist/services/middleware/MiddlewareRegistry.d.ts +11 -0
- package/dist/services/middleware/MiddlewareRegistry.d.ts.map +1 -0
- package/dist/services/middleware/MiddlewareServiceProvider.d.ts +5 -0
- package/dist/services/middleware/MiddlewareServiceProvider.d.ts.map +1 -0
- package/dist/services/pubsub/{BroadcastingServiceContainer.d.ts → BroadcastManager.d.ts} +7 -7
- package/dist/services/pubsub/BroadcastManager.d.ts.map +1 -0
- package/dist/services/pubsub/BroadcastServiceProvider.d.ts +5 -0
- package/dist/services/pubsub/BroadcastServiceProvider.d.ts.map +1 -0
- package/dist/services/pubsub/config.d.ts +7 -0
- package/dist/services/pubsub/config.d.ts.map +1 -0
- package/dist/services/queue/Job.d.ts.map +1 -1
- package/dist/services/queue/{QueueServiceContainer.d.ts → QueueManager.d.ts} +6 -7
- package/dist/services/queue/QueueManager.d.ts.map +1 -0
- package/dist/services/queue/QueueServiceProvider.d.ts +2 -5
- package/dist/services/queue/QueueServiceProvider.d.ts.map +1 -1
- package/dist/services/queue/config.d.ts +8 -0
- package/dist/services/queue/config.d.ts.map +1 -0
- package/dist/services/rate-limiter/{RateLimiterServiceContainer.d.ts → RateLimiter.d.ts} +10 -9
- package/dist/services/rate-limiter/RateLimiter.d.ts.map +1 -0
- package/dist/services/rate-limiter/RateLimiterServiceProvider.d.ts +2 -12
- package/dist/services/rate-limiter/RateLimiterServiceProvider.d.ts.map +1 -1
- package/dist/services/rate-limiter/config.d.ts +15 -0
- package/dist/services/rate-limiter/config.d.ts.map +1 -0
- package/dist/services/rate-limiter/drivers/RedisRateLimiterDriver.d.ts +6 -4
- package/dist/services/rate-limiter/drivers/RedisRateLimiterDriver.d.ts.map +1 -1
- package/dist/services/redis/RedisManager.d.ts +9 -0
- package/dist/services/redis/RedisManager.d.ts.map +1 -0
- package/dist/services/redis/RedisServiceProvider.d.ts +2 -5
- package/dist/services/redis/RedisServiceProvider.d.ts.map +1 -1
- package/dist/services/redis/config.d.ts +8 -0
- package/dist/services/redis/config.d.ts.map +1 -0
- package/dist/services/router/{ApiRouterServiceContainer.d.ts → ApiRouteDispatcher.d.ts} +8 -7
- package/dist/services/router/ApiRouteDispatcher.d.ts.map +1 -0
- package/dist/services/router/RouteServiceProvider.d.ts +18 -0
- package/dist/services/router/RouteServiceProvider.d.ts.map +1 -0
- package/dist/services/router/{ViewRouterServiceContainer.d.ts → ViewRouteDispatcher.d.ts} +6 -8
- package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -0
- package/dist/services/router/config.d.ts +25 -0
- package/dist/services/router/config.d.ts.map +1 -0
- package/dist/support/Repository.d.ts +15 -0
- package/dist/support/Repository.d.ts.map +1 -0
- package/dist/support/ServiceProvider.d.ts +13 -0
- package/dist/support/ServiceProvider.d.ts.map +1 -0
- package/dist/support/index.d.ts +5 -0
- package/dist/support/index.d.ts.map +1 -0
- package/dist/support/index.js +4 -0
- package/dist/support/index.js.map +10 -0
- package/dist/support/loadConfig.d.ts +4 -0
- package/dist/support/loadConfig.d.ts.map +1 -0
- package/dist/support/withDefaults.d.ts +13 -0
- package/dist/support/withDefaults.d.ts.map +1 -0
- package/package.json +5 -1
- package/dist/auth/AuthenticationServiceContainer.d.ts.map +0 -1
- package/dist/auth/AuthenticationServiceProvider.d.ts.map +0 -1
- package/dist/chunk-2pazt3hc.js +0 -4
- package/dist/chunk-4z53shav.js +0 -5
- package/dist/chunk-4z53shav.js.map +0 -15
- package/dist/chunk-63gmzy5r.js +0 -5
- package/dist/chunk-63gmzy5r.js.map +0 -12
- package/dist/chunk-7bggj8g7.js +0 -5
- package/dist/chunk-8jns0zmx.js +0 -4
- package/dist/chunk-atv6nybp.js +0 -4
- package/dist/chunk-b0ca3dzf.js +0 -5
- package/dist/chunk-jxpwexpz.js +0 -79
- package/dist/chunk-m0earq80.js +0 -5
- package/dist/chunk-m0earq80.js.map +0 -11
- package/dist/chunk-p5r0t9jh.js +0 -5
- package/dist/chunk-p5r0t9jh.js.map +0 -10
- package/dist/chunk-pf4r36w2.js +0 -5
- package/dist/chunk-pf4r36w2.js.map +0 -10
- package/dist/chunk-ppn0j67g.js +0 -4
- package/dist/chunk-ppn0j67g.js.map +0 -13
- package/dist/chunk-tjzbw6eg.js +0 -5
- package/dist/chunk-tvp3xgfq.js +0 -6
- package/dist/chunk-tyjhatbq.js +0 -4
- package/dist/chunk-v0qh5dqv.js +0 -75
- package/dist/chunk-v0qh5dqv.js.map +0 -416
- package/dist/chunk-vh6dnbty.js +0 -4
- package/dist/chunk-wed042aw.js +0 -4
- package/dist/chunk-ww5vyb4s.js +0 -4
- package/dist/chunk-xdk6y558.js +0 -5
- package/dist/chunk-xdk6y558.js.map +0 -10
- package/dist/chunk-xkrthw08.js +0 -23
- package/dist/chunk-xkrthw08.js.map +0 -10
- package/dist/chunk-y4q11zr2.js +0 -4
- package/dist/chunk-yyn0qk1w.js +0 -4
- package/dist/facades/FileStorage.d.ts.map +0 -1
- package/dist/facades/I18n.d.ts +0 -7
- package/dist/facades/I18n.d.ts.map +0 -1
- package/dist/http/MiddlewareServiceProvider.d.ts +0 -8
- package/dist/http/MiddlewareServiceProvider.d.ts.map +0 -1
- package/dist/i18n/I18nServiceContainer.d.ts +0 -13
- package/dist/i18n/I18nServiceContainer.d.ts.map +0 -1
- package/dist/i18n/I18nServiceProvider.d.ts +0 -13
- package/dist/i18n/I18nServiceProvider.d.ts.map +0 -1
- package/dist/services/ServiceContainer.d.ts +0 -7
- package/dist/services/ServiceContainer.d.ts.map +0 -1
- package/dist/services/ServiceProvider.d.ts +0 -4
- package/dist/services/ServiceProvider.d.ts.map +0 -1
- package/dist/services/Singleton.d.ts +0 -4
- package/dist/services/Singleton.d.ts.map +0 -1
- package/dist/services/cron/CronServiceContainer.d.ts +0 -13
- package/dist/services/cron/CronServiceContainer.d.ts.map +0 -1
- package/dist/services/cron/CronServiceProvider.d.ts +0 -10
- package/dist/services/cron/CronServiceProvider.d.ts.map +0 -1
- package/dist/services/email/EmailServiceContainer.d.ts +0 -8
- package/dist/services/email/EmailServiceContainer.d.ts.map +0 -1
- package/dist/services/email/EmailServiceProvider.d.ts +0 -9
- package/dist/services/email/EmailServiceProvider.d.ts.map +0 -1
- package/dist/services/file-storage/FileStorageServiceContainer.d.ts +0 -8
- package/dist/services/file-storage/FileStorageServiceContainer.d.ts.map +0 -1
- package/dist/services/file-storage/FileStorageServiceProvider.d.ts +0 -7
- package/dist/services/file-storage/FileStorageServiceProvider.d.ts.map +0 -1
- package/dist/services/image-optimization/ImageOptimizationServiceContainer.d.ts +0 -14
- package/dist/services/image-optimization/ImageOptimizationServiceContainer.d.ts.map +0 -1
- package/dist/services/image-optimization/ImageOptimizationServiceProvider.d.ts +0 -7
- package/dist/services/image-optimization/ImageOptimizationServiceProvider.d.ts.map +0 -1
- package/dist/services/kernel-id/KernelIdServiceContainer.d.ts +0 -8
- package/dist/services/kernel-id/KernelIdServiceContainer.d.ts.map +0 -1
- package/dist/services/logging/LoggingServiceContainer.d.ts +0 -22
- package/dist/services/logging/LoggingServiceContainer.d.ts.map +0 -1
- package/dist/services/logging/LoggingServiceProvider.d.ts +0 -9
- package/dist/services/logging/LoggingServiceProvider.d.ts.map +0 -1
- package/dist/services/middleware/MiddlewareServiceContainer.d.ts +0 -10
- package/dist/services/middleware/MiddlewareServiceContainer.d.ts.map +0 -1
- package/dist/services/pubsub/BroadcastingServiceContainer.d.ts.map +0 -1
- package/dist/services/pubsub/BroadcastingServiceProvider.d.ts +0 -7
- package/dist/services/pubsub/BroadcastingServiceProvider.d.ts.map +0 -1
- package/dist/services/queue/QueueServiceContainer.d.ts.map +0 -1
- package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts.map +0 -1
- package/dist/services/redis/RedisServiceContainer.d.ts +0 -10
- package/dist/services/redis/RedisServiceContainer.d.ts.map +0 -1
- package/dist/services/router/ApiRouterServiceContainer.d.ts.map +0 -1
- package/dist/services/router/ApiRouterServiceProvider.d.ts +0 -11
- package/dist/services/router/ApiRouterServiceProvider.d.ts.map +0 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +0 -1
- package/dist/services/router/ViewRouterServiceProvider.d.ts +0 -13
- package/dist/services/router/ViewRouterServiceProvider.d.ts.map +0 -1
- package/dist/services/singleton/SingletonServiceContainer.d.ts +0 -8
- package/dist/services/singleton/SingletonServiceContainer.d.ts.map +0 -1
- package/dist/services/singleton/SingletonServiceProvider.d.ts +0 -7
- package/dist/services/singleton/SingletonServiceProvider.d.ts.map +0 -1
- /package/dist/{chunk-w54fj10r.js.map → chunk-6q2xys8x.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{i as B0}from"./chunk-a0hk8r8n.js";import{qa as q0}from"./chunk-wqzg9229.js";import{Qc as WJ,Sc as m1}from"./chunk-n5q0gwd9.js";var FJ=WJ((OZ)=>{Object.defineProperty(OZ,"__esModule",{value:!0});var FZ=B0();function D0(Z){return{sourceType:(0,FZ.getOption)(Z,"sourceType","module"),strictMode:(0,FZ.getOption)(Z,"strictMode",!1),allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic"]}}OZ.default=D0});var U0=WJ((R0)=>{Object.defineProperty(R0,"__esModule",{value:!0});function N0(Z,X){if(Z==null)return{};var J={};for(var Q in Z)if({}.hasOwnProperty.call(Z,Q)){if(X.indexOf(Q)!==-1)continue;J[Q]=Z[Q]}return J}class E{constructor(Z,X,J){this.line=void 0,this.column=void 0,this.index=void 0,this.line=Z,this.column=X,this.index=J}}class QJ{constructor(Z,X){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=Z,this.end=X}}function _(Z,X){let{line:J,column:Q,index:V}=Z;return new E(J,Q+X,V+X)}var BZ="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",T0={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:BZ},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:BZ}},DZ={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},UJ=(Z)=>Z.type==="UpdateExpression"?DZ.UpdateExpression[`${Z.prefix}`]:DZ[Z.type],I0={AccessorIsGenerator:({kind:Z})=>`A ${Z}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:Z})=>`Missing initializer in ${Z} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:Z})=>`\`${Z}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:Z,exportName:X})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
3
3
|
- Did you mean \`export { '${Z}' as '${X}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:Z})=>`'${Z==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:Z})=>`Unsyntactic ${Z==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:Z})=>`A string literal cannot be used as an imported binding.
|
|
4
4
|
- Did you mean \`import { "${Z}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:Z})=>`Expected number in radix ${Z}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:Z})=>`Escape sequence in keyword ${Z}.`,InvalidIdentifier:({identifierName:Z})=>`Invalid identifier ${Z}.`,InvalidLhs:({ancestor:Z})=>`Invalid left-hand side in ${UJ(Z)}.`,InvalidLhsBinding:({ancestor:Z})=>`Binding invalid left-hand side in ${UJ(Z)}.`,InvalidLhsOptionalChaining:({ancestor:Z})=>`Invalid optional chaining in the left-hand side of ${UJ(Z)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:Z})=>`Unexpected character '${Z}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:Z})=>`Private name #${Z} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:Z})=>`Label '${Z}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:Z})=>`This experimental syntax requires enabling the parser plugin: ${Z.map((X)=>JSON.stringify(X)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:Z})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${Z.map((X)=>JSON.stringify(X)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:Z})=>`Duplicate key "${Z}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:Z})=>`An export name cannot include a lone surrogate, found '\\u${Z.toString(16)}'.`,ModuleExportUndefined:({localName:Z})=>`Export '${Z}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:Z})=>`Private names are only allowed in property accesses (\`obj.#${Z}\`) or in \`in\` expressions (\`#${Z} in obj\`).`,PrivateNameRedeclaration:({identifierName:Z})=>`Duplicate private name #${Z}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:Z})=>`Unexpected keyword '${Z}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:Z})=>`Unexpected reserved word '${Z}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:Z,unexpected:X})=>`Unexpected token${X?` '${X}'.`:""}${Z?`, expected "${Z}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:Z,onlyValidPropertyName:X})=>`The only valid meta property for ${Z} is ${Z}.${X}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:Z})=>`Identifier '${Z}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},C0={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:Z})=>`Assigning to '${Z}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:Z})=>`Binding '${Z}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},M0={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:Z})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(Z)}\`.`},$0=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),S0=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:Z})=>`Invalid topic token ${Z}. In order to use ${Z} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${Z}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:Z})=>`Hack-style pipe body cannot be an unparenthesized ${UJ({type:Z})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),A0=["message"];function vZ(Z,X,J){Object.defineProperty(Z,X,{enumerable:!1,configurable:!0,value:J})}function P0({toMessage:Z,code:X,reasonCode:J,syntaxPlugin:Q}){let V=J==="MissingPlugin"||J==="MissingOneOfPlugins",Y={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};if(Y[J])J=Y[J];return function W(j,U){let R=SyntaxError();if(R.code=X,R.reasonCode=J,R.loc=j,R.pos=j.index,R.syntaxPlugin=Q,V)R.missingPlugin=U.missingPlugin;return vZ(R,"clone",function(K={}){var G;let{line:F,column:v,index:M}=(G=K.loc)!=null?G:j;return W(new E(F,v,M),Object.assign({},U,K.details))}),vZ(R,"details",U),Object.defineProperty(R,"message",{configurable:!0,get(){let H=`${Z(U)} (${j.line}:${j.column})`;return this.message=H,H},set(H){Object.defineProperty(this,"message",{value:H,writable:!0})}}),R}}function g(Z,X){if(Array.isArray(Z))return(Q)=>g(Q,Z[0]);let J={};for(let Q of Object.keys(Z)){let V=Z[Q],Y=typeof V==="string"?{message:()=>V}:typeof V==="function"?{message:V}:V,{message:W}=Y,j=N0(Y,A0),U=typeof W==="string"?()=>W:W;J[Q]=P0(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:Q,toMessage:U},X?{syntaxPlugin:X}:{},j))}return J}var q=Object.assign({},g(T0),g(I0),g(C0),g(M0),g`pipelineOperator`(S0));function w0(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function _0(Z){let X=w0();if(Z==null)return X;if(Z.annexB!=null&&Z.annexB!==!1)throw Error("The `annexB` option can only be set to `false`.");for(let J of Object.keys(X))if(Z[J]!=null)X[J]=Z[J];if(X.startLine===1){if(Z.startIndex==null&&X.startColumn>0)X.startIndex=X.startColumn;else if(Z.startColumn==null&&X.startIndex>0)X.startColumn=X.startIndex}else if(Z.startColumn==null||Z.startIndex==null){if(Z.startIndex!=null)throw Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.")}if(X.sourceType==="commonjs"){if(Z.allowAwaitOutsideFunction!=null)throw Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(Z.allowReturnOutsideFunction!=null)throw Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(Z.allowNewTargetOutsideFunction!=null)throw Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return X}var{defineProperty:k0}=Object,NZ=(Z,X)=>{if(Z)k0(Z,X,{enumerable:!1,value:Z[X]})};function s(Z){return NZ(Z.loc.start,"index"),NZ(Z.loc.end,"index"),Z}var L0=(Z)=>class extends Z{parse(){let J=s(super.parse());if(this.optionFlags&256)J.tokens=J.tokens.map(s);return J}parseRegExpLiteral({pattern:J,flags:Q}){let V=null;try{V=new RegExp(J,Q)}catch(W){}let Y=this.estreeParseLiteral(V);return Y.regex={pattern:J,flags:Q},Y}parseBigIntLiteral(J){let Q;try{Q=BigInt(J)}catch(Y){Q=null}let V=this.estreeParseLiteral(Q);return V.bigint=String(V.value||J),V}parseDecimalLiteral(J){let V=this.estreeParseLiteral(null);return V.decimal=String(V.value||J),V}estreeParseLiteral(J){return this.parseLiteral(J,"Literal")}parseStringLiteral(J){return this.estreeParseLiteral(J)}parseNumericLiteral(J){return this.estreeParseLiteral(J)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(J){return this.estreeParseLiteral(J)}estreeParseChainExpression(J,Q){let V=this.startNodeAtNode(J);return V.expression=J,this.finishNodeAt(V,"ChainExpression",Q)}directiveToStmt(J){let Q=J.value;delete J.value,this.castNodeTo(Q,"Literal"),Q.raw=Q.extra.raw,Q.value=Q.extra.expressionValue;let V=this.castNodeTo(J,"ExpressionStatement");return V.expression=Q,V.directive=Q.extra.rawValue,delete Q.extra,V}fillOptionalPropertiesForTSESLint(J){}cloneEstreeStringLiteral(J){let{start:Q,end:V,loc:Y,range:W,raw:j,value:U}=J,R=Object.create(J.constructor.prototype);return R.type="Literal",R.start=Q,R.end=V,R.loc=Y,R.range=W,R.raw=j,R.value=U,R}initFunction(J,Q){super.initFunction(J,Q),J.expression=!1}checkDeclaration(J){if(J!=null&&this.isObjectProperty(J))this.checkDeclaration(J.value);else super.checkDeclaration(J)}getObjectOrClassMethodParams(J){return J.value.params}isValidDirective(J){var Q;return J.type==="ExpressionStatement"&&J.expression.type==="Literal"&&typeof J.expression.value==="string"&&!((Q=J.expression.extra)!=null&&Q.parenthesized)}parseBlockBody(J,Q,V,Y,W){super.parseBlockBody(J,Q,V,Y,W);let j=J.directives.map((U)=>this.directiveToStmt(U));J.body=j.concat(J.body),delete J.directives}parsePrivateName(){let J=super.parsePrivateName();if(!this.getPluginOption("estree","classFeatures"))return J;return this.convertPrivateNameToPrivateIdentifier(J)}convertPrivateNameToPrivateIdentifier(J){let Q=super.getPrivateNameSV(J);return delete J.id,J.name=Q,this.castNodeTo(J,"PrivateIdentifier")}isPrivateName(J){if(!this.getPluginOption("estree","classFeatures"))return super.isPrivateName(J);return J.type==="PrivateIdentifier"}getPrivateNameSV(J){if(!this.getPluginOption("estree","classFeatures"))return super.getPrivateNameSV(J);return J.name}parseLiteral(J,Q){let V=super.parseLiteral(J,Q);return V.raw=V.extra.raw,delete V.extra,V}parseFunctionBody(J,Q,V=!1){super.parseFunctionBody(J,Q,V),J.expression=J.body.type!=="BlockStatement"}parseMethod(J,Q,V,Y,W,j,U=!1){let R=this.startNode();R.kind=J.kind,R=super.parseMethod(R,Q,V,Y,W,j,U),delete R.kind;let{typeParameters:H}=J;if(H)delete J.typeParameters,R.typeParameters=H,this.resetStartLocationFromNode(R,H);let K=this.castNodeTo(R,"FunctionExpression");if(J.value=K,j==="ClassPrivateMethod")J.computed=!1;if(j==="ObjectMethod"){if(J.kind==="method")J.kind="init";return J.shorthand=!1,this.finishNode(J,"Property")}else return this.finishNode(J,"MethodDefinition")}nameIsConstructor(J){if(J.type==="Literal")return J.value==="constructor";return super.nameIsConstructor(J)}parseClassProperty(...J){let Q=super.parseClassProperty(...J);if(!this.getPluginOption("estree","classFeatures"))return Q;return this.castNodeTo(Q,"PropertyDefinition"),Q}parseClassPrivateProperty(...J){let Q=super.parseClassPrivateProperty(...J);if(!this.getPluginOption("estree","classFeatures"))return Q;return this.castNodeTo(Q,"PropertyDefinition"),Q.computed=!1,Q}parseClassAccessorProperty(J){let Q=super.parseClassAccessorProperty(J);if(!this.getPluginOption("estree","classFeatures"))return Q;if(Q.abstract&&this.hasPlugin("typescript"))delete Q.abstract,this.castNodeTo(Q,"TSAbstractAccessorProperty");else this.castNodeTo(Q,"AccessorProperty");return Q}parseObjectProperty(J,Q,V,Y){let W=super.parseObjectProperty(J,Q,V,Y);if(W)W.kind="init",this.castNodeTo(W,"Property");return W}finishObjectProperty(J){return J.kind="init",this.finishNode(J,"Property")}isValidLVal(J,Q,V,Y){return J==="Property"?"value":super.isValidLVal(J,Q,V,Y)}isAssignable(J,Q){if(J!=null&&this.isObjectProperty(J))return this.isAssignable(J.value,Q);return super.isAssignable(J,Q)}toAssignable(J,Q=!1){if(J!=null&&this.isObjectProperty(J)){let{key:V,value:Y}=J;if(this.isPrivateName(V))this.classScope.usePrivateName(this.getPrivateNameSV(V),V.loc.start);this.toAssignable(Y,Q)}else super.toAssignable(J,Q)}toAssignableObjectExpressionProp(J,Q,V){if(J.type==="Property"&&(J.kind==="get"||J.kind==="set"))this.raise(q.PatternHasAccessor,J.key);else if(J.type==="Property"&&J.method)this.raise(q.PatternHasMethod,J.key);else super.toAssignableObjectExpressionProp(J,Q,V)}finishCallExpression(J,Q){let V=super.finishCallExpression(J,Q);if(V.callee.type==="Import"){var Y,W;this.castNodeTo(V,"ImportExpression"),V.source=V.arguments[0],V.options=(Y=V.arguments[1])!=null?Y:null,V.attributes=(W=V.arguments[1])!=null?W:null,delete V.arguments,delete V.callee}else if(V.type==="OptionalCallExpression")this.castNodeTo(V,"CallExpression");else V.optional=!1;return V}toReferencedArguments(J){if(J.type==="ImportExpression")return;super.toReferencedArguments(J)}parseExport(J,Q){let V=this.state.lastTokStartLoc,Y=super.parseExport(J,Q);switch(Y.type){case"ExportAllDeclaration":Y.exported=null;break;case"ExportNamedDeclaration":if(Y.specifiers.length===1&&Y.specifiers[0].type==="ExportNamespaceSpecifier")this.castNodeTo(Y,"ExportAllDeclaration"),Y.exported=Y.specifiers[0].exported,delete Y.specifiers;case"ExportDefaultDeclaration":{var W;let{declaration:j}=Y;if((j==null?void 0:j.type)==="ClassDeclaration"&&((W=j.decorators)==null?void 0:W.length)>0&&j.start===Y.start)this.resetStartLocation(Y,V)}break}return Y}stopParseSubscript(J,Q){let V=super.stopParseSubscript(J,Q);if(Q.optionalChainMember)return this.estreeParseChainExpression(V,J.loc.end);return V}parseMember(J,Q,V,Y,W){let j=super.parseMember(J,Q,V,Y,W);if(j.type==="OptionalMemberExpression")this.castNodeTo(j,"MemberExpression");else j.optional=!1;return j}isOptionalMemberExpression(J){if(J.type==="ChainExpression")return J.expression.type==="MemberExpression";return super.isOptionalMemberExpression(J)}hasPropertyAsPrivateName(J){if(J.type==="ChainExpression")J=J.expression;return super.hasPropertyAsPrivateName(J)}isObjectProperty(J){return J.type==="Property"&&J.kind==="init"&&!J.method}isObjectMethod(J){return J.type==="Property"&&(J.method||J.kind==="get"||J.kind==="set")}castNodeTo(J,Q){let V=super.castNodeTo(J,Q);return this.fillOptionalPropertiesForTSESLint(V),V}cloneIdentifier(J){let Q=super.cloneIdentifier(J);return this.fillOptionalPropertiesForTSESLint(Q),Q}cloneStringLiteral(J){if(J.type==="Literal")return this.cloneEstreeStringLiteral(J);return super.cloneStringLiteral(J)}finishNodeAt(J,Q,V){return s(super.finishNodeAt(J,Q,V))}finishNode(J,Q){let V=super.finishNode(J,Q);return this.fillOptionalPropertiesForTSESLint(V),V}resetStartLocation(J,Q){super.resetStartLocation(J,Q),s(J)}resetEndLocation(J,Q=this.state.lastTokEndLoc){super.resetEndLocation(J,Q),s(J)}};class a{constructor(Z,X){this.token=void 0,this.preserveSpace=void 0,this.token=Z,this.preserveSpace=!!X}}var $={brace:new a("{"),j_oTag:new a("<tag"),j_cTag:new a("</tag"),j_expr:new a("<tag>...</tag>",!0)};$.template=new a("`",!0);var T=!0,z=!0,OJ=!0,n=!0,x=!0,g0=!0;class SJ{constructor(Z,X={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=Z,this.keyword=X.keyword,this.beforeExpr=!!X.beforeExpr,this.startsExpr=!!X.startsExpr,this.rightAssociative=!!X.rightAssociative,this.isLoop=!!X.isLoop,this.isAssign=!!X.isAssign,this.prefix=!!X.prefix,this.postfix=!!X.postfix,this.binop=X.binop!=null?X.binop:null,this.updateContext=null}}var AJ=new Map;function C(Z,X={}){X.keyword=Z;let J=B(Z,X);return AJ.set(Z,J),J}function w(Z,X){return B(Z,{beforeExpr:T,binop:X})}var JJ=-1,f=[],PJ=[],wJ=[],_J=[],kJ=[],LJ=[];function B(Z,X={}){var J,Q,V,Y;return++JJ,PJ.push(Z),wJ.push((J=X.binop)!=null?J:-1),_J.push((Q=X.beforeExpr)!=null?Q:!1),kJ.push((V=X.startsExpr)!=null?V:!1),LJ.push((Y=X.prefix)!=null?Y:!1),f.push(new SJ(Z,X)),JJ}function I(Z,X={}){var J,Q,V,Y;return++JJ,AJ.set(Z,JJ),PJ.push(Z),wJ.push((J=X.binop)!=null?J:-1),_J.push((Q=X.beforeExpr)!=null?Q:!1),kJ.push((V=X.startsExpr)!=null?V:!1),LJ.push((Y=X.prefix)!=null?Y:!1),f.push(new SJ("name",X)),JJ}var h0={bracketL:B("[",{beforeExpr:T,startsExpr:z}),bracketHashL:B("#[",{beforeExpr:T,startsExpr:z}),bracketBarL:B("[|",{beforeExpr:T,startsExpr:z}),bracketR:B("]"),bracketBarR:B("|]"),braceL:B("{",{beforeExpr:T,startsExpr:z}),braceBarL:B("{|",{beforeExpr:T,startsExpr:z}),braceHashL:B("#{",{beforeExpr:T,startsExpr:z}),braceR:B("}"),braceBarR:B("|}"),parenL:B("(",{beforeExpr:T,startsExpr:z}),parenR:B(")"),comma:B(",",{beforeExpr:T}),semi:B(";",{beforeExpr:T}),colon:B(":",{beforeExpr:T}),doubleColon:B("::",{beforeExpr:T}),dot:B("."),question:B("?",{beforeExpr:T}),questionDot:B("?."),arrow:B("=>",{beforeExpr:T}),template:B("template"),ellipsis:B("...",{beforeExpr:T}),backQuote:B("`",{startsExpr:z}),dollarBraceL:B("${",{beforeExpr:T,startsExpr:z}),templateTail:B("...`",{startsExpr:z}),templateNonTail:B("...${",{beforeExpr:T,startsExpr:z}),at:B("@"),hash:B("#",{startsExpr:z}),interpreterDirective:B("#!..."),eq:B("=",{beforeExpr:T,isAssign:n}),assign:B("_=",{beforeExpr:T,isAssign:n}),slashAssign:B("_=",{beforeExpr:T,isAssign:n}),xorAssign:B("_=",{beforeExpr:T,isAssign:n}),moduloAssign:B("_=",{beforeExpr:T,isAssign:n}),incDec:B("++/--",{prefix:x,postfix:g0,startsExpr:z}),bang:B("!",{beforeExpr:T,prefix:x,startsExpr:z}),tilde:B("~",{beforeExpr:T,prefix:x,startsExpr:z}),doubleCaret:B("^^",{startsExpr:z}),doubleAt:B("@@",{startsExpr:z}),pipeline:w("|>",0),nullishCoalescing:w("??",1),logicalOR:w("||",1),logicalAND:w("&&",2),bitwiseOR:w("|",3),bitwiseXOR:w("^",4),bitwiseAND:w("&",5),equality:w("==/!=/===/!==",6),lt:w("</>/<=/>=",7),gt:w("</>/<=/>=",7),relational:w("</>/<=/>=",7),bitShift:w("<</>>/>>>",8),bitShiftL:w("<</>>/>>>",8),bitShiftR:w("<</>>/>>>",8),plusMin:B("+/-",{beforeExpr:T,binop:9,prefix:x,startsExpr:z}),modulo:B("%",{binop:10,startsExpr:z}),star:B("*",{binop:10}),slash:w("/",10),exponent:B("**",{beforeExpr:T,binop:11,rightAssociative:!0}),_in:C("in",{beforeExpr:T,binop:7}),_instanceof:C("instanceof",{beforeExpr:T,binop:7}),_break:C("break"),_case:C("case",{beforeExpr:T}),_catch:C("catch"),_continue:C("continue"),_debugger:C("debugger"),_default:C("default",{beforeExpr:T}),_else:C("else",{beforeExpr:T}),_finally:C("finally"),_function:C("function",{startsExpr:z}),_if:C("if"),_return:C("return",{beforeExpr:T}),_switch:C("switch"),_throw:C("throw",{beforeExpr:T,prefix:x,startsExpr:z}),_try:C("try"),_var:C("var"),_const:C("const"),_with:C("with"),_new:C("new",{beforeExpr:T,startsExpr:z}),_this:C("this",{startsExpr:z}),_super:C("super",{startsExpr:z}),_class:C("class",{startsExpr:z}),_extends:C("extends",{beforeExpr:T}),_export:C("export"),_import:C("import",{startsExpr:z}),_null:C("null",{startsExpr:z}),_true:C("true",{startsExpr:z}),_false:C("false",{startsExpr:z}),_typeof:C("typeof",{beforeExpr:T,prefix:x,startsExpr:z}),_void:C("void",{beforeExpr:T,prefix:x,startsExpr:z}),_delete:C("delete",{beforeExpr:T,prefix:x,startsExpr:z}),_do:C("do",{isLoop:OJ,beforeExpr:T}),_for:C("for",{isLoop:OJ}),_while:C("while",{isLoop:OJ}),_as:I("as",{startsExpr:z}),_assert:I("assert",{startsExpr:z}),_async:I("async",{startsExpr:z}),_await:I("await",{startsExpr:z}),_defer:I("defer",{startsExpr:z}),_from:I("from",{startsExpr:z}),_get:I("get",{startsExpr:z}),_let:I("let",{startsExpr:z}),_meta:I("meta",{startsExpr:z}),_of:I("of",{startsExpr:z}),_sent:I("sent",{startsExpr:z}),_set:I("set",{startsExpr:z}),_source:I("source",{startsExpr:z}),_static:I("static",{startsExpr:z}),_using:I("using",{startsExpr:z}),_yield:I("yield",{startsExpr:z}),_asserts:I("asserts",{startsExpr:z}),_checks:I("checks",{startsExpr:z}),_exports:I("exports",{startsExpr:z}),_global:I("global",{startsExpr:z}),_implements:I("implements",{startsExpr:z}),_intrinsic:I("intrinsic",{startsExpr:z}),_infer:I("infer",{startsExpr:z}),_is:I("is",{startsExpr:z}),_mixins:I("mixins",{startsExpr:z}),_proto:I("proto",{startsExpr:z}),_require:I("require",{startsExpr:z}),_satisfies:I("satisfies",{startsExpr:z}),_keyof:I("keyof",{startsExpr:z}),_readonly:I("readonly",{startsExpr:z}),_unique:I("unique",{startsExpr:z}),_abstract:I("abstract",{startsExpr:z}),_declare:I("declare",{startsExpr:z}),_enum:I("enum",{startsExpr:z}),_module:I("module",{startsExpr:z}),_namespace:I("namespace",{startsExpr:z}),_interface:I("interface",{startsExpr:z}),_type:I("type",{startsExpr:z}),_opaque:I("opaque",{startsExpr:z}),name:B("name",{startsExpr:z}),placeholder:B("%%",{startsExpr:z}),string:B("string",{startsExpr:z}),num:B("num",{startsExpr:z}),bigint:B("bigint",{startsExpr:z}),decimal:B("decimal",{startsExpr:z}),regexp:B("regexp",{startsExpr:z}),privateName:B("#name",{startsExpr:z}),eof:B("eof"),jsxName:B("jsxName"),jsxText:B("jsxText",{beforeExpr:T}),jsxTagStart:B("jsxTagStart",{startsExpr:z}),jsxTagEnd:B("jsxTagEnd")};function S(Z){return Z>=93&&Z<=133}function b0(Z){return Z<=92}function k(Z){return Z>=58&&Z<=133}function LZ(Z){return Z>=58&&Z<=137}function u0(Z){return _J[Z]}function o(Z){return kJ[Z]}function E0(Z){return Z>=29&&Z<=33}function TZ(Z){return Z>=129&&Z<=131}function f0(Z){return Z>=90&&Z<=92}function gJ(Z){return Z>=58&&Z<=92}function y0(Z){return Z>=39&&Z<=59}function x0(Z){return Z===34}function m0(Z){return LJ[Z]}function c0(Z){return Z>=121&&Z<=123}function l0(Z){return Z>=124&&Z<=130}function c(Z){return PJ[Z]}function qJ(Z){return wJ[Z]}function p0(Z){return Z===57}function KJ(Z){return Z>=24&&Z<=25}function b(Z){return f[Z]}f[8].updateContext=(Z)=>{Z.pop()};f[5].updateContext=f[7].updateContext=f[23].updateContext=(Z)=>{Z.push($.brace)};f[22].updateContext=(Z)=>{if(Z[Z.length-1]===$.template)Z.pop();else Z.push($.template)};f[143].updateContext=(Z)=>{Z.push($.j_expr,$.j_oTag)};var hJ="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",gZ="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",i0=new RegExp("["+hJ+"]"),a0=new RegExp("["+hJ+gZ+"]");hJ=gZ=null;var hZ=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],d0=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function IJ(Z,X){let J=65536;for(let Q=0,V=X.length;Q<V;Q+=2){if(J+=X[Q],J>Z)return!1;if(J+=X[Q+1],J>=Z)return!0}return!1}function h(Z){if(Z<65)return Z===36;if(Z<=90)return!0;if(Z<97)return Z===95;if(Z<=122)return!0;if(Z<=65535)return Z>=170&&i0.test(String.fromCharCode(Z));return IJ(Z,hZ)}function i(Z){if(Z<48)return Z===36;if(Z<58)return!0;if(Z<65)return!1;if(Z<=90)return!0;if(Z<97)return Z===95;if(Z<=122)return!0;if(Z<=65535)return Z>=170&&a0.test(String.fromCharCode(Z));return IJ(Z,hZ)||IJ(Z,d0)}var bJ={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},t0=new Set(bJ.keyword),s0=new Set(bJ.strict),n0=new Set(bJ.strictBind);function bZ(Z,X){return X&&Z==="await"||Z==="enum"}function uZ(Z,X){return bZ(Z,X)||s0.has(Z)}function EZ(Z){return n0.has(Z)}function fZ(Z,X){return uZ(Z,X)||EZ(Z)}function r0(Z){return t0.has(Z)}function o0(Z,X,J){return Z===64&&X===64&&h(J)}var e0=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function J1(Z){return e0.has(Z)}class GJ{constructor(Z){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=Z}}class zJ{constructor(Z,X){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=Z,this.inModule=X}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let Z=this.currentThisScopeFlags();return(Z&64)>0&&(Z&2)===0}get inStaticBlock(){for(let Z=this.scopeStack.length-1;;Z--){let{flags:X}=this.scopeStack[Z];if(X&128)return!0;if(X&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(Z){return new GJ(Z)}enter(Z){this.scopeStack.push(this.createScope(Z))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(Z){return!!(Z.flags&130||!this.parser.inModule&&Z.flags&1)}declareName(Z,X,J){let Q=this.currentScope();if(X&8||X&16){this.checkRedeclarationInScope(Q,Z,X,J);let V=Q.names.get(Z)||0;if(X&16)V=V|4;else{if(!Q.firstLexicalName)Q.firstLexicalName=Z;V=V|2}if(Q.names.set(Z,V),X&8)this.maybeExportDefined(Q,Z)}else if(X&4){for(let V=this.scopeStack.length-1;V>=0;--V)if(Q=this.scopeStack[V],this.checkRedeclarationInScope(Q,Z,X,J),Q.names.set(Z,(Q.names.get(Z)||0)|1),this.maybeExportDefined(Q,Z),Q.flags&1667)break}if(this.parser.inModule&&Q.flags&1)this.undefinedExports.delete(Z)}maybeExportDefined(Z,X){if(this.parser.inModule&&Z.flags&1)this.undefinedExports.delete(X)}checkRedeclarationInScope(Z,X,J,Q){if(this.isRedeclaredInScope(Z,X,J))this.parser.raise(q.VarRedeclaration,Q,{identifierName:X})}isRedeclaredInScope(Z,X,J){if(!(J&1))return!1;if(J&8)return Z.names.has(X);let Q=Z.names.get(X)||0;if(J&16)return(Q&2)>0||!this.treatFunctionsAsVarInScope(Z)&&(Q&1)>0;return(Q&2)>0&&!(Z.flags&8&&Z.firstLexicalName===X)||!this.treatFunctionsAsVarInScope(Z)&&(Q&4)>0}checkLocalExport(Z){let{name:X}=Z;if(!this.scopeStack[0].names.has(X))this.undefinedExports.set(X,Z.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let Z=this.scopeStack.length-1;;Z--){let{flags:X}=this.scopeStack[Z];if(X&1667)return X}}currentThisScopeFlags(){for(let Z=this.scopeStack.length-1;;Z--){let{flags:X}=this.scopeStack[Z];if(X&1731&&!(X&4))return X}}}class yZ extends GJ{constructor(...Z){super(...Z);this.declareFunctions=new Set}}class xZ extends zJ{createScope(Z){return new yZ(Z)}declareName(Z,X,J){let Q=this.currentScope();if(X&2048){this.checkRedeclarationInScope(Q,Z,X,J),this.maybeExportDefined(Q,Z),Q.declareFunctions.add(Z);return}super.declareName(Z,X,J)}isRedeclaredInScope(Z,X,J){if(super.isRedeclaredInScope(Z,X,J))return!0;if(J&2048&&!Z.declareFunctions.has(X)){let Q=Z.names.get(X);return(Q&4)>0||(Q&2)>0}return!1}checkLocalExport(Z){if(!this.scopeStack[0].declareFunctions.has(Z.name))super.checkLocalExport(Z)}}var Z1=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),D=g`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:Z})=>`Cannot overwrite reserved type ${Z}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:Z,enumName:X})=>`Boolean enum members need to be initialized. Use either \`${Z} = true,\` or \`${Z} = false,\` in enum \`${X}\`.`,EnumDuplicateMemberName:({memberName:Z,enumName:X})=>`Enum member names need to be unique, but the name \`${Z}\` has already been used before in enum \`${X}\`.`,EnumInconsistentMemberValues:({enumName:Z})=>`Enum \`${Z}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:Z,enumName:X})=>`Enum type \`${Z}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${X}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:Z})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${Z}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:Z,memberName:X,explicitType:J})=>`Enum \`${Z}\` has type \`${J}\`, so the initializer of \`${X}\` needs to be a ${J} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:Z,memberName:X})=>`Symbol enum members cannot be initialized. Use \`${X},\` in enum \`${Z}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:Z,memberName:X})=>`The enum member initializer for \`${X}\` needs to be a literal (either a boolean, number, or string) in enum \`${Z}\`.`,EnumInvalidMemberName:({enumName:Z,memberName:X,suggestion:J})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${X}\`, consider using \`${J}\`, in enum \`${Z}\`.`,EnumNumberMemberNotInitialized:({enumName:Z,memberName:X})=>`Number enum members need to be initialized, e.g. \`${X} = 1\` in enum \`${Z}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:Z})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${Z}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:Z})=>`Unexpected reserved type ${Z}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:Z,suggestion:X})=>`\`declare export ${Z}\` is not supported. Use \`${X}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Q1(Z){return Z.type==="DeclareExportAllDeclaration"||Z.type==="DeclareExportDeclaration"&&(!Z.declaration||Z.declaration.type!=="TypeAlias"&&Z.declaration.type!=="InterfaceDeclaration")}function IZ(Z){return Z.importKind==="type"||Z.importKind==="typeof"}var X1={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function V1(Z,X){let J=[],Q=[];for(let V=0;V<Z.length;V++)(X(Z[V],V,Z)?J:Q).push(Z[V]);return[J,Q]}var Y1=/\*?\s*@((?:no)?flow)\b/,W1=(Z)=>class extends Z{constructor(...J){super(...J);this.flowPragma=void 0}getScopeHandler(){return xZ}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(J,Q){if(J!==134&&J!==13&&J!==28){if(this.flowPragma===void 0)this.flowPragma=null}super.finishToken(J,Q)}addComment(J){if(this.flowPragma===void 0){let Q=Y1.exec(J.value);if(!Q);else if(Q[1]==="flow")this.flowPragma="flow";else if(Q[1]==="noflow")this.flowPragma="noflow";else throw Error("Unexpected flow pragma")}super.addComment(J)}flowParseTypeInitialiser(J){let Q=this.state.inType;this.state.inType=!0,this.expect(J||14);let V=this.flowParseType();return this.state.inType=Q,V}flowParsePredicate(){let J=this.startNode(),Q=this.state.startLoc;if(this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>Q.index+1)this.raise(D.UnexpectedSpaceBetweenModuloChecks,Q);if(this.eat(10))return J.value=super.parseExpression(),this.expect(11),this.finishNode(J,"DeclaredPredicate");else return this.finishNode(J,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let J=this.state.inType;this.state.inType=!0,this.expect(14);let Q=null,V=null;if(this.match(54))this.state.inType=J,V=this.flowParsePredicate();else if(Q=this.flowParseType(),this.state.inType=J,this.match(54))V=this.flowParsePredicate();return[Q,V]}flowParseDeclareClass(J){return this.next(),this.flowParseInterfaceish(J,!0),this.finishNode(J,"DeclareClass")}flowParseDeclareFunction(J){this.next();let Q=J.id=this.parseIdentifier(),V=this.startNode(),Y=this.startNode();if(this.match(47))V.typeParameters=this.flowParseTypeParameterDeclaration();else V.typeParameters=null;this.expect(10);let W=this.flowParseFunctionTypeParams();return V.params=W.params,V.rest=W.rest,V.this=W._this,this.expect(11),[V.returnType,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),Y.typeAnnotation=this.finishNode(V,"FunctionTypeAnnotation"),Q.typeAnnotation=this.finishNode(Y,"TypeAnnotation"),this.resetEndLocation(Q),this.semicolon(),this.scope.declareName(J.id.name,2048,J.id.loc.start),this.finishNode(J,"DeclareFunction")}flowParseDeclare(J,Q){if(this.match(80))return this.flowParseDeclareClass(J);else if(this.match(68))return this.flowParseDeclareFunction(J);else if(this.match(74))return this.flowParseDeclareVariable(J);else if(this.eatContextual(127))if(this.match(16))return this.flowParseDeclareModuleExports(J);else{if(Q)this.raise(D.NestedDeclareModule,this.state.lastTokStartLoc);return this.flowParseDeclareModule(J)}else if(this.isContextual(130))return this.flowParseDeclareTypeAlias(J);else if(this.isContextual(131))return this.flowParseDeclareOpaqueType(J);else if(this.isContextual(129))return this.flowParseDeclareInterface(J);else if(this.match(82))return this.flowParseDeclareExportDeclaration(J,Q);throw this.unexpected()}flowParseDeclareVariable(J){return this.next(),J.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(J.id.name,5,J.id.loc.start),this.semicolon(),this.finishNode(J,"DeclareVariable")}flowParseDeclareModule(J){if(this.scope.enter(0),this.match(134))J.id=super.parseExprAtom();else J.id=this.parseIdentifier();let Q=J.body=this.startNode(),V=Q.body=[];this.expect(5);while(!this.match(8)){let j=this.startNode();if(this.match(83)){if(this.next(),!this.isContextual(130)&&!this.match(87))this.raise(D.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc);V.push(super.parseImport(j))}else this.expectContextual(125,D.UnsupportedStatementInDeclareModule),V.push(this.flowParseDeclare(j,!0))}this.scope.exit(),this.expect(8),this.finishNode(Q,"BlockStatement");let Y=null,W=!1;return V.forEach((j)=>{if(Q1(j)){if(Y==="CommonJS")this.raise(D.AmbiguousDeclareModuleKind,j);Y="ES"}else if(j.type==="DeclareModuleExports"){if(W)this.raise(D.DuplicateDeclareModuleExports,j);if(Y==="ES")this.raise(D.AmbiguousDeclareModuleKind,j);Y="CommonJS",W=!0}}),J.kind=Y||"CommonJS",this.finishNode(J,"DeclareModule")}flowParseDeclareExportDeclaration(J,Q){if(this.expect(82),this.eat(65)){if(this.match(68)||this.match(80))J.declaration=this.flowParseDeclare(this.startNode());else J.declaration=this.flowParseType(),this.semicolon();return J.default=!0,this.finishNode(J,"DeclareExportDeclaration")}else{if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!Q){let V=this.state.value;throw this.raise(D.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:V,suggestion:X1[V]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return J.declaration=this.flowParseDeclare(this.startNode()),J.default=!1,this.finishNode(J,"DeclareExportDeclaration");else if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))if(J=this.parseExport(J,null),J.type==="ExportNamedDeclaration")return J.default=!1,delete J.exportKind,this.castNodeTo(J,"DeclareExportDeclaration");else return this.castNodeTo(J,"DeclareExportAllDeclaration")}throw this.unexpected()}flowParseDeclareModuleExports(J){return this.next(),this.expectContextual(111),J.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(J,"DeclareModuleExports")}flowParseDeclareTypeAlias(J){this.next();let Q=this.flowParseTypeAlias(J);return this.castNodeTo(Q,"DeclareTypeAlias"),Q}flowParseDeclareOpaqueType(J){this.next();let Q=this.flowParseOpaqueType(J,!0);return this.castNodeTo(Q,"DeclareOpaqueType"),Q}flowParseDeclareInterface(J){return this.next(),this.flowParseInterfaceish(J,!1),this.finishNode(J,"DeclareInterface")}flowParseInterfaceish(J,Q){if(J.id=this.flowParseRestrictedIdentifier(!Q,!0),this.scope.declareName(J.id.name,Q?17:8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;if(J.extends=[],this.eat(81))do J.extends.push(this.flowParseInterfaceExtends());while(!Q&&this.eat(12));if(Q){if(J.implements=[],J.mixins=[],this.eatContextual(117))do J.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do J.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}J.body=this.flowParseObjectType({allowStatic:Q,allowExact:!1,allowSpread:!1,allowProto:Q,allowInexact:!1})}flowParseInterfaceExtends(){let J=this.startNode();if(J.id=this.flowParseQualifiedTypeIdentifier(),this.match(47))J.typeParameters=this.flowParseTypeParameterInstantiation();else J.typeParameters=null;return this.finishNode(J,"InterfaceExtends")}flowParseInterface(J){return this.flowParseInterfaceish(J,!1),this.finishNode(J,"InterfaceDeclaration")}checkNotUnderscore(J){if(J==="_")this.raise(D.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(J,Q,V){if(!Z1.has(J))return;this.raise(V?D.AssignReservedType:D.UnexpectedReservedType,Q,{reservedType:J})}flowParseRestrictedIdentifier(J,Q){return this.checkReservedType(this.state.value,this.state.startLoc,Q),this.parseIdentifier(J)}flowParseTypeAlias(J){if(J.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(J.id.name,8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;return J.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(J,"TypeAlias")}flowParseOpaqueType(J,Q){if(this.expectContextual(130),J.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(J.id.name,8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;if(J.supertype=null,this.match(14))J.supertype=this.flowParseTypeInitialiser(14);if(J.impltype=null,!Q)J.impltype=this.flowParseTypeInitialiser(29);return this.semicolon(),this.finishNode(J,"OpaqueType")}flowParseTypeParameter(J=!1){let Q=this.state.startLoc,V=this.startNode(),Y=this.flowParseVariance(),W=this.flowParseTypeAnnotatableIdentifier();if(V.name=W.name,V.variance=Y,V.bound=W.typeAnnotation,this.match(29))this.eat(29),V.default=this.flowParseType();else if(J)this.raise(D.MissingTypeParamDefault,Q);return this.finishNode(V,"TypeParameter")}flowParseTypeParameterDeclaration(){let J=this.state.inType,Q=this.startNode();if(Q.params=[],this.state.inType=!0,this.match(47)||this.match(143))this.next();else this.unexpected();let V=!1;do{let Y=this.flowParseTypeParameter(V);if(Q.params.push(Y),Y.default)V=!0;if(!this.match(48))this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=J,this.finishNode(Q,"TypeParameterDeclaration")}flowInTopLevelContext(J){if(this.curContext()!==$.brace){let Q=this.state.context;this.state.context=[Q[0]];try{return J()}finally{this.state.context=Q}}else return J()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()!==47)return;return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let J=this.startNode(),Q=this.state.inType;if(this.state.inType=!0,J.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let V=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!1;while(!this.match(48))if(J.params.push(this.flowParseType()),!this.match(48))this.expect(12);this.state.noAnonFunctionType=V}),this.state.inType=Q,!this.state.inType&&this.curContext()===$.brace)this.reScan_lt_gt();return this.expect(48),this.finishNode(J,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let J=this.startNode(),Q=this.state.inType;J.params=[],this.state.inType=!0,this.expect(47);while(!this.match(48))if(J.params.push(this.flowParseTypeOrImplicitInstantiation()),!this.match(48))this.expect(12);return this.expect(48),this.state.inType=Q,this.finishNode(J,"TypeParameterInstantiation")}flowParseInterfaceType(){let J=this.startNode();if(this.expectContextual(129),J.extends=[],this.eat(81))do J.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return J.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(J,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(J,Q,V){if(J.static=Q,this.lookahead().type===14)J.id=this.flowParseObjectPropertyKey(),J.key=this.flowParseTypeInitialiser();else J.id=null,J.key=this.flowParseType();return this.expect(3),J.value=this.flowParseTypeInitialiser(),J.variance=V,this.finishNode(J,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(J,Q){if(J.static=Q,J.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10))J.method=!0,J.optional=!1,J.value=this.flowParseObjectTypeMethodish(this.startNodeAt(J.loc.start));else{if(J.method=!1,this.eat(17))J.optional=!0;J.value=this.flowParseTypeInitialiser()}return this.finishNode(J,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(J){if(J.params=[],J.rest=null,J.typeParameters=null,J.this=null,this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();if(this.expect(10),this.match(78)){if(J.this=this.flowParseFunctionTypeParam(!0),J.this.name=null,!this.match(11))this.expect(12)}while(!this.match(11)&&!this.match(21))if(J.params.push(this.flowParseFunctionTypeParam(!1)),!this.match(11))this.expect(12);if(this.eat(21))J.rest=this.flowParseFunctionTypeParam(!1);return this.expect(11),J.returnType=this.flowParseTypeInitialiser(),this.finishNode(J,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(J,Q){let V=this.startNode();return J.static=Q,J.value=this.flowParseObjectTypeMethodish(V),this.finishNode(J,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:J,allowExact:Q,allowSpread:V,allowProto:Y,allowInexact:W}){let j=this.state.inType;this.state.inType=!0;let U=this.startNode();U.callProperties=[],U.properties=[],U.indexers=[],U.internalSlots=[];let R,H,K=!1;if(Q&&this.match(6))this.expect(6),R=9,H=!0;else this.expect(5),R=8,H=!1;U.exact=H;while(!this.match(R)){let F=!1,v=null,M=null,N=this.startNode();if(Y&&this.isContextual(118)){let P=this.lookahead();if(P.type!==14&&P.type!==17)this.next(),v=this.state.startLoc,J=!1}if(J&&this.isContextual(106)){let P=this.lookahead();if(P.type!==14&&P.type!==17)this.next(),F=!0}let A=this.flowParseVariance();if(this.eat(0)){if(v!=null)this.unexpected(v);if(this.eat(0)){if(A)this.unexpected(A.loc.start);U.internalSlots.push(this.flowParseObjectTypeInternalSlot(N,F))}else U.indexers.push(this.flowParseObjectTypeIndexer(N,F,A))}else if(this.match(10)||this.match(47)){if(v!=null)this.unexpected(v);if(A)this.unexpected(A.loc.start);U.callProperties.push(this.flowParseObjectTypeCallProperty(N,F))}else{let P="init";if(this.isContextual(99)||this.isContextual(104)){let y=this.lookahead();if(LZ(y.type))P=this.state.value,this.next()}let l=this.flowParseObjectTypeProperty(N,F,v,A,P,V,W!=null?W:!H);if(l===null)K=!0,M=this.state.lastTokStartLoc;else U.properties.push(l)}if(this.flowObjectTypeSemicolon(),M&&!this.match(8)&&!this.match(9))this.raise(D.UnexpectedExplicitInexactInObject,M)}if(this.expect(R),V)U.inexact=K;let G=this.finishNode(U,"ObjectTypeAnnotation");return this.state.inType=j,G}flowParseObjectTypeProperty(J,Q,V,Y,W,j,U){if(this.eat(21)){if(this.match(12)||this.match(13)||this.match(8)||this.match(9)){if(!j)this.raise(D.InexactInsideNonObject,this.state.lastTokStartLoc);else if(!U)this.raise(D.InexactInsideExact,this.state.lastTokStartLoc);if(Y)this.raise(D.InexactVariance,Y);return null}if(!j)this.raise(D.UnexpectedSpreadType,this.state.lastTokStartLoc);if(V!=null)this.unexpected(V);if(Y)this.raise(D.SpreadVariance,Y);return J.argument=this.flowParseType(),this.finishNode(J,"ObjectTypeSpreadProperty")}else{J.key=this.flowParseObjectPropertyKey(),J.static=Q,J.proto=V!=null,J.kind=W;let R=!1;if(this.match(47)||this.match(10)){if(J.method=!0,V!=null)this.unexpected(V);if(Y)this.unexpected(Y.loc.start);if(J.value=this.flowParseObjectTypeMethodish(this.startNodeAt(J.loc.start)),W==="get"||W==="set")this.flowCheckGetterSetterParams(J);if(!j&&J.key.name==="constructor"&&J.value.this)this.raise(D.ThisParamBannedInConstructor,J.value.this)}else{if(W!=="init")this.unexpected();if(J.method=!1,this.eat(17))R=!0;J.value=this.flowParseTypeInitialiser(),J.variance=Y}return J.optional=R,this.finishNode(J,"ObjectTypeProperty")}}flowCheckGetterSetterParams(J){let Q=J.kind==="get"?0:1,V=J.value.params.length+(J.value.rest?1:0);if(J.value.this)this.raise(J.kind==="get"?D.GetterMayNotHaveThisParam:D.SetterMayNotHaveThisParam,J.value.this);if(V!==Q)this.raise(J.kind==="get"?q.BadGetterArity:q.BadSetterArity,J);if(J.kind==="set"&&J.value.rest)this.raise(q.BadSetterRestParameter,J)}flowObjectTypeSemicolon(){if(!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9))this.unexpected()}flowParseQualifiedTypeIdentifier(J,Q){J!=null||(J=this.state.startLoc);let V=Q||this.flowParseRestrictedIdentifier(!0);while(this.eat(16)){let Y=this.startNodeAt(J);Y.qualification=V,Y.id=this.flowParseRestrictedIdentifier(!0),V=this.finishNode(Y,"QualifiedTypeIdentifier")}return V}flowParseGenericType(J,Q){let V=this.startNodeAt(J);if(V.typeParameters=null,V.id=this.flowParseQualifiedTypeIdentifier(J,Q),this.match(47))V.typeParameters=this.flowParseTypeParameterInstantiation();return this.finishNode(V,"GenericTypeAnnotation")}flowParseTypeofType(){let J=this.startNode();return this.expect(87),J.argument=this.flowParsePrimaryType(),this.finishNode(J,"TypeofTypeAnnotation")}flowParseTupleType(){let J=this.startNode();J.types=[],this.expect(0);while(this.state.pos<this.length&&!this.match(3)){if(J.types.push(this.flowParseType()),this.match(3))break;this.expect(12)}return this.expect(3),this.finishNode(J,"TupleTypeAnnotation")}flowParseFunctionTypeParam(J){let Q=null,V=!1,Y=null,W=this.startNode(),j=this.lookahead(),U=this.state.type===78;if(j.type===14||j.type===17){if(U&&!J)this.raise(D.ThisParamMustBeFirst,W);if(Q=this.parseIdentifier(U),this.eat(17)){if(V=!0,U)this.raise(D.ThisParamMayNotBeOptional,W)}Y=this.flowParseTypeInitialiser()}else Y=this.flowParseType();return W.name=Q,W.optional=V,W.typeAnnotation=Y,this.finishNode(W,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(J){let Q=this.startNodeAt(J.loc.start);return Q.name=null,Q.optional=!1,Q.typeAnnotation=J,this.finishNode(Q,"FunctionTypeParam")}flowParseFunctionTypeParams(J=[]){let Q=null,V=null;if(this.match(78)){if(V=this.flowParseFunctionTypeParam(!0),V.name=null,!this.match(11))this.expect(12)}while(!this.match(11)&&!this.match(21))if(J.push(this.flowParseFunctionTypeParam(!1)),!this.match(11))this.expect(12);if(this.eat(21))Q=this.flowParseFunctionTypeParam(!1);return{params:J,rest:Q,_this:V}}flowIdentToTypeAnnotation(J,Q,V){switch(V.name){case"any":return this.finishNode(Q,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(Q,"BooleanTypeAnnotation");case"mixed":return this.finishNode(Q,"MixedTypeAnnotation");case"empty":return this.finishNode(Q,"EmptyTypeAnnotation");case"number":return this.finishNode(Q,"NumberTypeAnnotation");case"string":return this.finishNode(Q,"StringTypeAnnotation");case"symbol":return this.finishNode(Q,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(V.name),this.flowParseGenericType(J,V)}}flowParsePrimaryType(){let J=this.state.startLoc,Q=this.startNode(),V,Y,W=!1,j=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,Y=this.flowParseTupleType(),this.state.noAnonFunctionType=j,Y;case 47:{let U=this.startNode();return U.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),V=this.flowParseFunctionTypeParams(),U.params=V.params,U.rest=V.rest,U.this=V._this,this.expect(11),this.expect(19),U.returnType=this.flowParseType(),this.finishNode(U,"FunctionTypeAnnotation")}case 10:{let U=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(S(this.state.type)||this.match(78)){let R=this.lookahead().type;W=R!==17&&R!==14}else W=!0;if(W)if(this.state.noAnonFunctionType=!1,Y=this.flowParseType(),this.state.noAnonFunctionType=j,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),Y;else this.eat(12);if(Y)V=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(Y)]);else V=this.flowParseFunctionTypeParams();return U.params=V.params,U.rest=V.rest,U.this=V._this,this.expect(11),this.expect(19),U.returnType=this.flowParseType(),U.typeParameters=null,this.finishNode(U,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return Q.value=this.match(85),this.next(),this.finishNode(Q,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",Q);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",Q);throw this.raise(D.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(Q,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(Q,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(Q,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(Q,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(gJ(this.state.type)){let U=c(this.state.type);return this.next(),super.createIdentifier(Q,U)}else if(S(this.state.type)){if(this.isContextual(129))return this.flowParseInterfaceType();return this.flowIdentToTypeAnnotation(J,Q,this.parseIdentifier())}}throw this.unexpected()}flowParsePostfixType(){let J=this.state.startLoc,Q=this.flowParsePrimaryType(),V=!1;while((this.match(0)||this.match(18))&&!this.canInsertSemicolon()){let Y=this.startNodeAt(J),W=this.eat(18);if(V=V||W,this.expect(0),!W&&this.match(3))Y.elementType=Q,this.next(),Q=this.finishNode(Y,"ArrayTypeAnnotation");else if(Y.objectType=Q,Y.indexType=this.flowParseType(),this.expect(3),V)Y.optional=W,Q=this.finishNode(Y,"OptionalIndexedAccessType");else Q=this.finishNode(Y,"IndexedAccessType")}return Q}flowParsePrefixType(){let J=this.startNode();if(this.eat(17))return J.typeAnnotation=this.flowParsePrefixType(),this.finishNode(J,"NullableTypeAnnotation");else return this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let J=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let Q=this.startNodeAt(J.loc.start);return Q.params=[this.reinterpretTypeAsFunctionTypeParam(J)],Q.rest=null,Q.this=null,Q.returnType=this.flowParseType(),Q.typeParameters=null,this.finishNode(Q,"FunctionTypeAnnotation")}return J}flowParseIntersectionType(){let J=this.startNode();this.eat(45);let Q=this.flowParseAnonFunctionWithoutParens();J.types=[Q];while(this.eat(45))J.types.push(this.flowParseAnonFunctionWithoutParens());return J.types.length===1?Q:this.finishNode(J,"IntersectionTypeAnnotation")}flowParseUnionType(){let J=this.startNode();this.eat(43);let Q=this.flowParseIntersectionType();J.types=[Q];while(this.eat(43))J.types.push(this.flowParseIntersectionType());return J.types.length===1?Q:this.finishNode(J,"UnionTypeAnnotation")}flowParseType(){let J=this.state.inType;this.state.inType=!0;let Q=this.flowParseUnionType();return this.state.inType=J,Q}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let J=this.state.startLoc,Q=this.parseIdentifier();return this.flowParseGenericType(J,Q)}else return this.flowParseType()}flowParseTypeAnnotation(){let J=this.startNode();return J.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(J,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(J){let Q=J?this.parseIdentifier():this.flowParseRestrictedIdentifier();if(this.match(14))Q.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(Q);return Q}typeCastToParameter(J){return J.expression.typeAnnotation=J.typeAnnotation,this.resetEndLocation(J.expression,J.typeAnnotation.loc.end),J.expression}flowParseVariance(){let J=null;if(this.match(53)){if(J=this.startNode(),this.state.value==="+")J.kind="plus";else J.kind="minus";return this.next(),this.finishNode(J,"Variance")}return J}parseFunctionBody(J,Q,V=!1){if(Q){this.forwardNoArrowParamsConversionAt(J,()=>super.parseFunctionBody(J,!0,V));return}super.parseFunctionBody(J,!1,V)}parseFunctionBodyAndFinish(J,Q,V=!1){if(this.match(14)){let Y=this.startNode();[Y.typeAnnotation,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),J.returnType=Y.typeAnnotation?this.finishNode(Y,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(J,Q,V)}parseStatementLike(J){if(this.state.strict&&this.isContextual(129)){let V=this.lookahead();if(k(V.type)){let Y=this.startNode();return this.next(),this.flowParseInterface(Y)}}else if(this.isContextual(126)){let V=this.startNode();return this.next(),this.flowParseEnumDeclaration(V)}let Q=super.parseStatementLike(J);if(this.flowPragma===void 0&&!this.isValidDirective(Q))this.flowPragma=null;return Q}parseExpressionStatement(J,Q,V){if(Q.type==="Identifier"){if(Q.name==="declare"){if(this.match(80)||S(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(J)}else if(S(this.state.type)){if(Q.name==="interface")return this.flowParseInterface(J);else if(Q.name==="type")return this.flowParseTypeAlias(J);else if(Q.name==="opaque")return this.flowParseOpaqueType(J,!1)}}return super.parseExpressionStatement(J,Q,V)}shouldParseExportDeclaration(){let{type:J}=this.state;if(J===126||TZ(J))return!this.state.containsEsc;return super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:J}=this.state;if(J===126||TZ(J))return this.state.containsEsc;return super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let J=this.startNode();return this.next(),this.flowParseEnumDeclaration(J)}return super.parseExportDefaultExpression()}parseConditional(J,Q,V){if(!this.match(17))return J;if(this.state.maybeInArrowParameters){let G=this.lookaheadCharCode();if(G===44||G===61||G===58||G===41)return this.setOptionalParametersError(V),J}this.expect(17);let Y=this.state.clone(),W=this.state.noArrowAt,j=this.startNodeAt(Q),{consequent:U,failed:R}=this.tryParseConditionalConsequent(),[H,K]=this.getArrowLikeExpressions(U);if(R||K.length>0){let G=[...W];if(K.length>0){this.state=Y,this.state.noArrowAt=G;for(let F=0;F<K.length;F++)G.push(K[F].start);({consequent:U,failed:R}=this.tryParseConditionalConsequent()),[H,K]=this.getArrowLikeExpressions(U)}if(R&&H.length>1)this.raise(D.AmbiguousConditionalArrow,Y.startLoc);if(R&&H.length===1)this.state=Y,G.push(H[0].start),this.state.noArrowAt=G,{consequent:U,failed:R}=this.tryParseConditionalConsequent()}return this.getArrowLikeExpressions(U,!0),this.state.noArrowAt=W,this.expect(14),j.test=J,j.consequent=U,j.alternate=this.forwardNoArrowParamsConversionAt(j,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(j,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let J=this.parseMaybeAssignAllowIn(),Q=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:J,failed:Q}}getArrowLikeExpressions(J,Q){let V=[J],Y=[];while(V.length!==0){let W=V.pop();if(W.type==="ArrowFunctionExpression"&&W.body.type!=="BlockStatement"){if(W.typeParameters||!W.returnType)this.finishArrowValidation(W);else Y.push(W);V.push(W.body)}else if(W.type==="ConditionalExpression")V.push(W.consequent),V.push(W.alternate)}if(Q)return Y.forEach((W)=>this.finishArrowValidation(W)),[Y,[]];return V1(Y,(W)=>W.params.every((j)=>this.isAssignable(j,!0)))}finishArrowValidation(J){var Q;this.toAssignableList(J.params,(Q=J.extra)==null?void 0:Q.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(J,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(J,Q){let V;if(this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(J.start)))this.state.noArrowParamsConversionAt.push(this.state.start),V=Q(),this.state.noArrowParamsConversionAt.pop();else V=Q();return V}parseParenItem(J,Q){let V=super.parseParenItem(J,Q);if(this.eat(17))V.optional=!0,this.resetEndLocation(J);if(this.match(14)){let Y=this.startNodeAt(Q);return Y.expression=V,Y.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(Y,"TypeCastExpression")}return V}assertModuleNodeAllowed(J){if(J.type==="ImportDeclaration"&&(J.importKind==="type"||J.importKind==="typeof")||J.type==="ExportNamedDeclaration"&&J.exportKind==="type"||J.type==="ExportAllDeclaration"&&J.exportKind==="type")return;super.assertModuleNodeAllowed(J)}parseExportDeclaration(J){if(this.isContextual(130)){J.exportKind="type";let Q=this.startNode();if(this.next(),this.match(5))return J.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(J),null;else return this.flowParseTypeAlias(Q)}else if(this.isContextual(131)){J.exportKind="type";let Q=this.startNode();return this.next(),this.flowParseOpaqueType(Q,!1)}else if(this.isContextual(129)){J.exportKind="type";let Q=this.startNode();return this.next(),this.flowParseInterface(Q)}else if(this.isContextual(126)){J.exportKind="value";let Q=this.startNode();return this.next(),this.flowParseEnumDeclaration(Q)}else return super.parseExportDeclaration(J)}eatExportStar(J){if(super.eatExportStar(J))return!0;if(this.isContextual(130)&&this.lookahead().type===55)return J.exportKind="type",this.next(),this.next(),!0;return!1}maybeParseExportNamespaceSpecifier(J){let{startLoc:Q}=this.state,V=super.maybeParseExportNamespaceSpecifier(J);if(V&&J.exportKind==="type")this.unexpected(Q);return V}parseClassId(J,Q,V){if(super.parseClassId(J,Q,V),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration()}parseClassMember(J,Q,V){let{startLoc:Y}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(J,Q))return;Q.declare=!0}if(super.parseClassMember(J,Q,V),Q.declare){if(Q.type!=="ClassProperty"&&Q.type!=="ClassPrivateProperty"&&Q.type!=="PropertyDefinition")this.raise(D.DeclareClassElement,Y);else if(Q.value)this.raise(D.DeclareClassFieldInitializer,Q.value)}}isIterator(J){return J==="iterator"||J==="asyncIterator"}readIterator(){let J=super.readWord1(),Q="@@"+J;if(!this.isIterator(J)||!this.state.inType)this.raise(q.InvalidIdentifier,this.state.curPosition(),{identifierName:Q});this.finishToken(132,Q)}getTokenFromCode(J){let Q=this.input.charCodeAt(this.state.pos+1);if(J===123&&Q===124)this.finishOp(6,2);else if(this.state.inType&&(J===62||J===60))this.finishOp(J===62?48:47,1);else if(this.state.inType&&J===63)if(Q===46)this.finishOp(18,2);else this.finishOp(17,1);else if(o0(J,Q,this.input.charCodeAt(this.state.pos+2)))this.state.pos+=2,this.readIterator();else super.getTokenFromCode(J)}isAssignable(J,Q){if(J.type==="TypeCastExpression")return this.isAssignable(J.expression,Q);else return super.isAssignable(J,Q)}toAssignable(J,Q=!1){if(!Q&&J.type==="AssignmentExpression"&&J.left.type==="TypeCastExpression")J.left=this.typeCastToParameter(J.left);super.toAssignable(J,Q)}toAssignableList(J,Q,V){for(let Y=0;Y<J.length;Y++){let W=J[Y];if((W==null?void 0:W.type)==="TypeCastExpression")J[Y]=this.typeCastToParameter(W)}super.toAssignableList(J,Q,V)}toReferencedList(J,Q){for(let Y=0;Y<J.length;Y++){var V;let W=J[Y];if(W&&W.type==="TypeCastExpression"&&!((V=W.extra)!=null&&V.parenthesized)&&(J.length>1||!Q))this.raise(D.TypeCastInPattern,W.typeAnnotation)}return J}parseArrayLike(J,Q,V){let Y=super.parseArrayLike(J,Q,V);if(V!=null&&!this.state.maybeInArrowParameters)this.toReferencedList(Y.elements);return Y}isValidLVal(J,Q,V,Y){return J==="TypeCastExpression"||super.isValidLVal(J,Q,V,Y)}parseClassProperty(J){if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();return super.parseClassProperty(J)}parseClassPrivateProperty(J){if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();return super.parseClassPrivateProperty(J)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(J){return!this.match(14)&&super.isNonstaticConstructor(J)}pushClassMethod(J,Q,V,Y,W,j){if(Q.variance)this.unexpected(Q.variance.loc.start);if(delete Q.variance,this.match(47))Q.typeParameters=this.flowParseTypeParameterDeclaration();if(super.pushClassMethod(J,Q,V,Y,W,j),Q.params&&W){let U=Q.params;if(U.length>0&&this.isThisParam(U[0]))this.raise(D.ThisParamBannedInConstructor,Q)}else if(Q.type==="MethodDefinition"&&W&&Q.value.params){let U=Q.value.params;if(U.length>0&&this.isThisParam(U[0]))this.raise(D.ThisParamBannedInConstructor,Q)}}pushClassPrivateMethod(J,Q,V,Y){if(Q.variance)this.unexpected(Q.variance.loc.start);if(delete Q.variance,this.match(47))Q.typeParameters=this.flowParseTypeParameterDeclaration();super.pushClassPrivateMethod(J,Q,V,Y)}parseClassSuper(J){if(super.parseClassSuper(J),J.superClass&&(this.match(47)||this.match(51)))J.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression();if(this.isContextual(113)){this.next();let Q=J.implements=[];do{let V=this.startNode();if(V.id=this.flowParseRestrictedIdentifier(!0),this.match(47))V.typeParameters=this.flowParseTypeParameterInstantiation();else V.typeParameters=null;Q.push(this.finishNode(V,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(J){super.checkGetterSetterParams(J);let Q=this.getObjectOrClassMethodParams(J);if(Q.length>0){let V=Q[0];if(this.isThisParam(V)&&J.kind==="get")this.raise(D.GetterMayNotHaveThisParam,V);else if(this.isThisParam(V))this.raise(D.SetterMayNotHaveThisParam,V)}}parsePropertyNamePrefixOperator(J){J.variance=this.flowParseVariance()}parseObjPropValue(J,Q,V,Y,W,j,U){if(J.variance)this.unexpected(J.variance.loc.start);delete J.variance;let R;if(this.match(47)&&!j){if(R=this.flowParseTypeParameterDeclaration(),!this.match(10))this.unexpected()}let H=super.parseObjPropValue(J,Q,V,Y,W,j,U);if(R)(H.value||H).typeParameters=R;return H}parseFunctionParamType(J){if(this.eat(17)){if(J.type!=="Identifier")this.raise(D.PatternIsOptional,J);if(this.isThisParam(J))this.raise(D.ThisParamMayNotBeOptional,J);J.optional=!0}if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();else if(this.isThisParam(J))this.raise(D.ThisParamAnnotationRequired,J);if(this.match(29)&&this.isThisParam(J))this.raise(D.ThisParamNoDefault,J);return this.resetEndLocation(J),J}parseMaybeDefault(J,Q){let V=super.parseMaybeDefault(J,Q);if(V.type==="AssignmentPattern"&&V.typeAnnotation&&V.right.start<V.typeAnnotation.start)this.raise(D.TypeBeforeInitializer,V.typeAnnotation);return V}checkImportReflection(J){if(super.checkImportReflection(J),J.module&&J.importKind!=="value")this.raise(D.ImportReflectionHasImportType,J.specifiers[0].loc.start)}parseImportSpecifierLocal(J,Q,V){Q.local=IZ(J)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),J.specifiers.push(this.finishImportSpecifier(Q,V))}isPotentialImportPhase(J){if(super.isPotentialImportPhase(J))return!0;if(this.isContextual(130)){if(!J)return!0;let Q=this.lookaheadCharCode();return Q===123||Q===42}return!J&&this.isContextual(87)}applyImportPhase(J,Q,V,Y){if(super.applyImportPhase(J,Q,V,Y),Q){if(!V&&this.match(65))return;J.exportKind=V==="type"?V:"value"}else{if(V==="type"&&this.match(55))this.unexpected();J.importKind=V==="type"||V==="typeof"?V:"value"}}parseImportSpecifier(J,Q,V,Y,W){let j=J.imported,U=null;if(j.type==="Identifier"){if(j.name==="type")U="type";else if(j.name==="typeof")U="typeof"}let R=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let K=this.parseIdentifier(!0);if(U!==null&&!k(this.state.type))J.imported=K,J.importKind=U,J.local=this.cloneIdentifier(K);else J.imported=j,J.importKind=null,J.local=this.parseIdentifier()}else{if(U!==null&&k(this.state.type))J.imported=this.parseIdentifier(!0),J.importKind=U;else{if(Q)throw this.raise(q.ImportBindingIsString,J,{importName:j.value});J.imported=j,J.importKind=null}if(this.eatContextual(93))J.local=this.parseIdentifier();else R=!0,J.local=this.cloneIdentifier(J.imported)}let H=IZ(J);if(V&&H)this.raise(D.ImportTypeShorthandOnlyInPureImport,J);if(V||H)this.checkReservedType(J.local.name,J.local.loc.start,!0);if(R&&!V&&!H)this.checkReservedWord(J.local.name,J.loc.start,!0,!0);return this.finishImportSpecifier(J,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(J,Q){let V=J.kind;if(V!=="get"&&V!=="set"&&this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();super.parseFunctionParams(J,Q)}parseVarId(J,Q){if(super.parseVarId(J,Q),this.match(14))J.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(J.id)}parseAsyncArrowFromCallExpression(J,Q){if(this.match(14)){let V=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,J.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=V}return super.parseAsyncArrowFromCallExpression(J,Q)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(J,Q){var V;let Y=null,W;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(Y=this.state.clone(),W=this.tryParse(()=>super.parseMaybeAssign(J,Q),Y),!W.error)return W.node;let{context:R}=this.state,H=R[R.length-1];if(H===$.j_oTag||H===$.j_expr)R.pop()}if((V=W)!=null&&V.error||this.match(47)){var j,U;Y=Y||this.state.clone();let R,H=this.tryParse((G)=>{var F;R=this.flowParseTypeParameterDeclaration();let v=this.forwardNoArrowParamsConversionAt(R,()=>{let N=super.parseMaybeAssign(J,Q);return this.resetStartLocationFromNode(N,R),N});if((F=v.extra)!=null&&F.parenthesized)G();let M=this.maybeUnwrapTypeCastExpression(v);if(M.type!=="ArrowFunctionExpression")G();return M.typeParameters=R,this.resetStartLocationFromNode(M,R),v},Y),K=null;if(H.node&&this.maybeUnwrapTypeCastExpression(H.node).type==="ArrowFunctionExpression"){if(!H.error&&!H.aborted){if(H.node.async)this.raise(D.UnexpectedTypeParameterBeforeAsyncArrowFunction,R);return H.node}K=H.node}if((j=W)!=null&&j.node)return this.state=W.failState,W.node;if(K)return this.state=H.failState,K;if((U=W)!=null&&U.thrown)throw W.error;if(H.thrown)throw H.error;throw this.raise(D.UnexpectedTokenAfterTypeParameter,R)}return super.parseMaybeAssign(J,Q)}parseArrow(J){if(this.match(14)){let Q=this.tryParse(()=>{let V=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let Y=this.startNode();if([Y.typeAnnotation,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=V,this.canInsertSemicolon())this.unexpected();if(!this.match(19))this.unexpected();return Y});if(Q.thrown)return null;if(Q.error)this.state=Q.failState;J.returnType=Q.node.typeAnnotation?this.finishNode(Q.node,"TypeAnnotation"):null}return super.parseArrow(J)}shouldParseArrow(J){return this.match(14)||super.shouldParseArrow(J)}setArrowFunctionParameters(J,Q){if(this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(J.start)))J.params=Q;else super.setArrowFunctionParameters(J,Q)}checkParams(J,Q,V,Y=!0){if(V&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(J.start)))return;for(let W=0;W<J.params.length;W++)if(this.isThisParam(J.params[W])&&W>0)this.raise(D.ThisParamMustBeFirst,J.params[W]);super.checkParams(J,Q,V,Y)}parseParenAndDistinguishExpression(J){return super.parseParenAndDistinguishExpression(J&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(J,Q,V){if(J.type==="Identifier"&&J.name==="async"&&this.state.noArrowAt.includes(Q.index)){this.next();let Y=this.startNodeAt(Q);Y.callee=J,Y.arguments=super.parseCallExpressionArguments(),J=this.finishNode(Y,"CallExpression")}else if(J.type==="Identifier"&&J.name==="async"&&this.match(47)){let Y=this.state.clone(),W=this.tryParse((U)=>this.parseAsyncArrowWithTypeParameters(Q)||U(),Y);if(!W.error&&!W.aborted)return W.node;let j=this.tryParse(()=>super.parseSubscripts(J,Q,V),Y);if(j.node&&!j.error)return j.node;if(W.node)return this.state=W.failState,W.node;if(j.node)return this.state=j.failState,j.node;throw W.error||j.error}return super.parseSubscripts(J,Q,V)}parseSubscript(J,Q,V,Y){if(this.match(18)&&this.isLookaheadToken_lt()){if(Y.optionalChainMember=!0,V)return Y.stop=!0,J;this.next();let W=this.startNodeAt(Q);return W.callee=J,W.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),W.arguments=this.parseCallExpressionArguments(),W.optional=!0,this.finishCallExpression(W,!0)}else if(!V&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let W=this.startNodeAt(Q);W.callee=J;let j=this.tryParse(()=>{if(W.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),W.arguments=super.parseCallExpressionArguments(),Y.optionalChainMember)W.optional=!1;return this.finishCallExpression(W,Y.optionalChainMember)});if(j.node){if(j.error)this.state=j.failState;return j.node}}return super.parseSubscript(J,Q,V,Y)}parseNewCallee(J){super.parseNewCallee(J);let Q=null;if(this.shouldParseTypes()&&this.match(47))Q=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node;J.typeArguments=Q}parseAsyncArrowWithTypeParameters(J){let Q=this.startNodeAt(J);if(this.parseFunctionParams(Q,!1),!this.parseArrow(Q))return;return super.parseArrowExpression(Q,void 0,!0)}readToken_mult_modulo(J){let Q=this.input.charCodeAt(this.state.pos+1);if(J===42&&Q===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(J)}readToken_pipe_amp(J){let Q=this.input.charCodeAt(this.state.pos+1);if(J===124&&Q===125){this.finishOp(9,2);return}super.readToken_pipe_amp(J)}parseTopLevel(J,Q){let V=super.parseTopLevel(J,Q);if(this.state.hasFlowComment)this.raise(D.UnterminatedFlowComment,this.state.curPosition());return V}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(D.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let J=this.skipFlowComment();if(J)this.state.pos+=J,this.state.hasFlowComment=!0;return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:J}=this.state,Q=2;while([32,9].includes(this.input.charCodeAt(J+Q)))Q++;let V=this.input.charCodeAt(Q+J),Y=this.input.charCodeAt(Q+J+1);if(V===58&&Y===58)return Q+2;if(this.input.slice(Q+J,Q+J+12)==="flow-include")return Q+12;if(V===58&&Y!==58)return Q;return!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(q.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(J,{enumName:Q,memberName:V}){this.raise(D.EnumBooleanMemberNotInitialized,J,{memberName:V,enumName:Q})}flowEnumErrorInvalidMemberInitializer(J,Q){return this.raise(!Q.explicitType?D.EnumInvalidMemberInitializerUnknownType:Q.explicitType==="symbol"?D.EnumInvalidMemberInitializerSymbolType:D.EnumInvalidMemberInitializerPrimaryType,J,Q)}flowEnumErrorNumberMemberNotInitialized(J,Q){this.raise(D.EnumNumberMemberNotInitialized,J,Q)}flowEnumErrorStringMemberInconsistentlyInitialized(J,Q){this.raise(D.EnumStringMemberInconsistentlyInitialized,J,Q)}flowEnumMemberInit(){let J=this.state.startLoc,Q=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let V=this.parseNumericLiteral(this.state.value);if(Q())return{type:"number",loc:V.loc.start,value:V};return{type:"invalid",loc:J}}case 134:{let V=this.parseStringLiteral(this.state.value);if(Q())return{type:"string",loc:V.loc.start,value:V};return{type:"invalid",loc:J}}case 85:case 86:{let V=this.parseBooleanLiteral(this.match(85));if(Q())return{type:"boolean",loc:V.loc.start,value:V};return{type:"invalid",loc:J}}default:return{type:"invalid",loc:J}}}flowEnumMemberRaw(){let J=this.state.startLoc,Q=this.parseIdentifier(!0),V=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:J};return{id:Q,init:V}}flowEnumCheckExplicitTypeMismatch(J,Q,V){let{explicitType:Y}=Q;if(Y===null)return;if(Y!==V)this.flowEnumErrorInvalidMemberInitializer(J,Q)}flowEnumMembers({enumName:J,explicitType:Q}){let V=new Set,Y={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},W=!1;while(!this.match(8)){if(this.eat(21)){W=!0;break}let j=this.startNode(),{id:U,init:R}=this.flowEnumMemberRaw(),H=U.name;if(H==="")continue;if(/^[a-z]/.test(H))this.raise(D.EnumInvalidMemberName,U,{memberName:H,suggestion:H[0].toUpperCase()+H.slice(1),enumName:J});if(V.has(H))this.raise(D.EnumDuplicateMemberName,U,{memberName:H,enumName:J});V.add(H);let K={enumName:J,explicitType:Q,memberName:H};switch(j.id=U,R.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(R.loc,K,"boolean"),j.init=R.value,Y.booleanMembers.push(this.finishNode(j,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(R.loc,K,"number"),j.init=R.value,Y.numberMembers.push(this.finishNode(j,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(R.loc,K,"string"),j.init=R.value,Y.stringMembers.push(this.finishNode(j,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(R.loc,K);case"none":switch(Q){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(R.loc,K);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(R.loc,K);break;default:Y.defaultedMembers.push(this.finishNode(j,"EnumDefaultedMember"))}}if(!this.match(8))this.expect(12)}return{members:Y,hasUnknownMembers:W}}flowEnumStringMembers(J,Q,{enumName:V}){if(J.length===0)return Q;else if(Q.length===0)return J;else if(Q.length>J.length){for(let Y of J)this.flowEnumErrorStringMemberInconsistentlyInitialized(Y,{enumName:V});return Q}else{for(let Y of Q)this.flowEnumErrorStringMemberInconsistentlyInitialized(Y,{enumName:V});return J}}flowEnumParseExplicitType({enumName:J}){if(!this.eatContextual(102))return null;if(!S(this.state.type))throw this.raise(D.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:J});let{value:Q}=this.state;if(this.next(),Q!=="boolean"&&Q!=="number"&&Q!=="string"&&Q!=="symbol")this.raise(D.EnumInvalidExplicitType,this.state.startLoc,{enumName:J,invalidEnumType:Q});return Q}flowEnumBody(J,Q){let V=Q.name,Y=Q.loc.start,W=this.flowEnumParseExplicitType({enumName:V});this.expect(5);let{members:j,hasUnknownMembers:U}=this.flowEnumMembers({enumName:V,explicitType:W});switch(J.hasUnknownMembers=U,W){case"boolean":return J.explicitType=!0,J.members=j.booleanMembers,this.expect(8),this.finishNode(J,"EnumBooleanBody");case"number":return J.explicitType=!0,J.members=j.numberMembers,this.expect(8),this.finishNode(J,"EnumNumberBody");case"string":return J.explicitType=!0,J.members=this.flowEnumStringMembers(j.stringMembers,j.defaultedMembers,{enumName:V}),this.expect(8),this.finishNode(J,"EnumStringBody");case"symbol":return J.members=j.defaultedMembers,this.expect(8),this.finishNode(J,"EnumSymbolBody");default:{let R=()=>{return J.members=[],this.expect(8),this.finishNode(J,"EnumStringBody")};J.explicitType=!1;let H=j.booleanMembers.length,K=j.numberMembers.length,G=j.stringMembers.length,F=j.defaultedMembers.length;if(!H&&!K&&!G&&!F)return R();else if(!H&&!K)return J.members=this.flowEnumStringMembers(j.stringMembers,j.defaultedMembers,{enumName:V}),this.expect(8),this.finishNode(J,"EnumStringBody");else if(!K&&!G&&H>=F){for(let v of j.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(v.loc.start,{enumName:V,memberName:v.id.name});return J.members=j.booleanMembers,this.expect(8),this.finishNode(J,"EnumBooleanBody")}else if(!H&&!G&&K>=F){for(let v of j.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(v.loc.start,{enumName:V,memberName:v.id.name});return J.members=j.numberMembers,this.expect(8),this.finishNode(J,"EnumNumberBody")}else return this.raise(D.EnumInconsistentMemberValues,Y,{enumName:V}),R()}}}flowParseEnumDeclaration(J){let Q=this.parseIdentifier();return J.id=Q,J.body=this.flowEnumBody(this.startNode(),Q),this.finishNode(J,"EnumDeclaration")}jsxParseOpeningElementAfterName(J){if(this.shouldParseTypes()){if(this.match(47)||this.match(51))J.typeArguments=this.flowParseTypeParameterInstantiationInExpression()}return super.jsxParseOpeningElementAfterName(J)}isLookaheadToken_lt(){let J=this.nextTokenStart();if(this.input.charCodeAt(J)===60){let Q=this.input.charCodeAt(J+1);return Q!==60&&Q!==61}return!1}reScan_lt_gt(){let{type:J}=this.state;if(J===47)this.state.pos-=1,this.readToken_lt();else if(J===48)this.state.pos-=1,this.readToken_gt()}reScan_lt(){let{type:J}=this.state;if(J===51)return this.state.pos-=2,this.finishOp(47,1),47;return J}maybeUnwrapTypeCastExpression(J){return J.type==="TypeCastExpression"?J.expression:J}},j1={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},R1=/\r\n|[\r\n\u2028\u2029]/,jJ=new RegExp(R1.source,"g");function t(Z){switch(Z){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function CZ(Z,X,J){for(let Q=X;Q<J;Q++)if(t(Z.charCodeAt(Q)))return!0;return!1}var BJ=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,DJ=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function U1(Z){switch(Z){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var p=g`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:Z})=>`Expected corresponding JSX closing tag for <${Z}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:Z,HTMLEntity:X})=>`Unexpected token \`${Z}\`. Did you mean \`${X}\` or \`{'${Z}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function m(Z){return Z?Z.type==="JSXOpeningFragment"||Z.type==="JSXClosingFragment":!1}function d(Z){if(Z.type==="JSXIdentifier")return Z.name;if(Z.type==="JSXNamespacedName")return Z.namespace.name+":"+Z.name.name;if(Z.type==="JSXMemberExpression")return d(Z.object)+"."+d(Z.property);throw Error("Node had unexpected type: "+Z.type)}var q1=(Z)=>class extends Z{jsxReadToken(){let J="",Q=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedJsxContent,this.state.startLoc);let V=this.input.charCodeAt(this.state.pos);switch(V){case 60:case 123:if(this.state.pos===this.state.start){if(V===60&&this.state.canStartJSXElement)++this.state.pos,this.finishToken(143);else super.getTokenFromCode(V);return}J+=this.input.slice(Q,this.state.pos),this.finishToken(142,J);return;case 38:J+=this.input.slice(Q,this.state.pos),J+=this.jsxReadEntity(),Q=this.state.pos;break;case 62:case 125:default:if(t(V))J+=this.input.slice(Q,this.state.pos),J+=this.jsxReadNewLine(!0),Q=this.state.pos;else++this.state.pos}}}jsxReadNewLine(J){let Q=this.input.charCodeAt(this.state.pos),V;if(++this.state.pos,Q===13&&this.input.charCodeAt(this.state.pos)===10)++this.state.pos,V=J?`
|
|
5
5
|
`:`\r
|
|
@@ -8,4 +8,4 @@ import{f as B0}from"./chunk-2a4ze3n3.js";import{Nb as q0}from"./chunk-wjhh4pf0.j
|
|
|
8
8
|
`);case 114:return j("\r");case 120:{let R;return{code:R,pos:X}=CJ(Z,X,J,Q,2,!1,W,Y),j(R===null?null:String.fromCharCode(R))}case 117:{let R;return{code:R,pos:X}=tZ(Z,X,J,Q,W,Y),j(R===null?null:String.fromCodePoint(R))}case 116:return j("\t");case 98:return j("\b");case 118:return j("\v");case 102:return j("\f");case 13:if(Z.charCodeAt(X)===10)++X;case 10:J=X,++Q;case 8232:case 8233:return j("");case 56:case 57:if(V)return j(null);else Y.strictNumericEscape(X-1,J,Q);default:if(U>=48&&U<=55){let R=X-1,K=/^[0-7]+/.exec(Z.slice(R,X+2))[0],G=parseInt(K,8);if(G>255)K=K.slice(0,-1),G=parseInt(K,8);X+=K.length-1;let F=Z.charCodeAt(X);if(K!=="0"||F===56||F===57)if(V)return j(null);else Y.strictNumericEscape(R,J,Q);return j(String.fromCharCode(G))}return j(String.fromCharCode(U))}}function CJ(Z,X,J,Q,V,Y,W,j){let U=X,R;if({n:R,pos:X}=dZ(Z,X,J,Q,16,V,Y,!1,j,!W),R===null)if(W)j.invalidEscapeSequence(U,J,Q);else X=U-1;return{code:R,pos:X}}function dZ(Z,X,J,Q,V,Y,W,j,U,R){let H=X,K=V===16?MZ.hex:MZ.decBinOct,G=V===16?RJ.hex:V===10?RJ.dec:V===8?RJ.oct:RJ.bin,F=!1,v=0;for(let M=0,N=Y==null?1/0:Y;M<N;++M){let A=Z.charCodeAt(X),P;if(A===95&&j!=="bail"){let l=Z.charCodeAt(X-1),y=Z.charCodeAt(X+1);if(!j){if(R)return{n:null,pos:X};U.numericSeparatorInEscapeSequence(X,J,Q)}else if(Number.isNaN(y)||!G(y)||K.has(l)||K.has(y)){if(R)return{n:null,pos:X};U.unexpectedNumericSeparator(X,J,Q)}++X;continue}if(A>=97)P=A-97+10;else if(A>=65)P=A-65+10;else if(K1(A))P=A-48;else P=1/0;if(P>=V)if(P<=9&&R)return{n:null,pos:X};else if(P<=9&&U.invalidDigit(X,J,Q,V))P=0;else if(W)P=0,F=!0;else break;++X,v=v*V+P}if(X===H||Y!=null&&X-H!==Y||F)return{n:null,pos:X};return{n:v,pos:X}}function tZ(Z,X,J,Q,V,Y){let W=Z.charCodeAt(X),j;if(W===123){if(++X,{code:j,pos:X}=CJ(Z,X,J,Q,Z.indexOf("}",X)-X,!0,V,Y),++X,j!==null&&j>1114111)if(V)Y.invalidCodePoint(X,J,Q);else return{code:null,pos:X}}else({code:j,pos:X}=CJ(Z,X,J,Q,4,!1,V,Y));return{code:j,pos:X}}function r(Z,X,J){return new E(J,Z-X,Z)}var F1=new Set([103,109,115,105,121,117,100,118]);class u{constructor(Z){let X=Z.startIndex||0;this.type=Z.type,this.value=Z.value,this.start=X+Z.start,this.end=X+Z.end,this.loc=new QJ(Z.startLoc,Z.endLoc)}}class sZ extends aZ{constructor(Z,X){super();this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(J,Q,V,Y)=>{if(!(this.optionFlags&2048))return!1;return this.raise(q.InvalidDigit,r(J,Q,V),{radix:Y}),!0},numericSeparatorInEscapeSequence:this.errorBuilder(q.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(q.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(q.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(q.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(J,Q,V)=>{this.recordStrictModeErrors(q.StrictNumericEscape,r(J,Q,V))},unterminated:(J,Q,V)=>{throw this.raise(q.UnterminatedString,r(J-1,Q,V))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(q.StrictNumericEscape),unterminated:(J,Q,V)=>{throw this.raise(q.UnterminatedTemplate,r(J,Q,V))}}),this.state=new uJ,this.state.init(Z),this.input=X,this.length=X.length,this.comments=[],this.isLookahead=!1}pushToken(Z){this.tokens.length=this.state.tokensLength,this.tokens.push(Z),++this.state.tokensLength}next(){if(this.checkKeywordEscapes(),this.optionFlags&256)this.pushToken(new u(this.state));this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(Z){if(this.match(Z))return this.next(),!0;else return!1}match(Z){return this.state.type===Z}createLookaheadState(Z){return{pos:Z.pos,value:null,type:Z.type,start:Z.start,end:Z.end,context:[this.curContext()],inType:Z.inType,startLoc:Z.startLoc,lastTokEndLoc:Z.lastTokEndLoc,curLine:Z.curLine,lineStart:Z.lineStart,curPosition:Z.curPosition}}lookahead(){let Z=this.state;this.state=this.createLookaheadState(Z),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let X=this.state;return this.state=Z,X}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(Z){return BJ.lastIndex=Z,BJ.test(this.input)?BJ.lastIndex:Z}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(Z){return this.input.charCodeAt(this.nextTokenStartSince(Z))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(Z){return DJ.lastIndex=Z,DJ.test(this.input)?DJ.lastIndex:Z}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(Z){let X=this.input.charCodeAt(Z);if((X&64512)===55296&&++Z<this.input.length){let J=this.input.charCodeAt(Z);if((J&64512)===56320)X=65536+((X&1023)<<10)+(J&1023)}return X}setStrict(Z){if(this.state.strict=Z,Z)this.state.strictErrors.forEach(([X,J])=>this.raise(X,J)),this.state.strictErrors.clear()}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,!this.isLookahead)this.state.startLoc=this.state.curPosition();if(this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(Z){let X;if(!this.isLookahead)X=this.state.curPosition();let J=this.state.pos,Q=this.input.indexOf(Z,J+2);if(Q===-1)throw this.raise(q.UnterminatedComment,this.state.curPosition());this.state.pos=Q+Z.length,jJ.lastIndex=J+2;while(jJ.test(this.input)&&jJ.lastIndex<=Q)++this.state.curLine,this.state.lineStart=jJ.lastIndex;if(this.isLookahead)return;let V={type:"CommentBlock",value:this.input.slice(J+2,Q),start:this.sourceToOffsetPos(J),end:this.sourceToOffsetPos(Q+Z.length),loc:new QJ(X,this.state.curPosition())};if(this.optionFlags&256)this.pushToken(V);return V}skipLineComment(Z){let X=this.state.pos,J;if(!this.isLookahead)J=this.state.curPosition();let Q=this.input.charCodeAt(this.state.pos+=Z);if(this.state.pos<this.length)while(!t(Q)&&++this.state.pos<this.length)Q=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let V=this.state.pos,W={type:"CommentLine",value:this.input.slice(X+Z,V),start:this.sourceToOffsetPos(X),end:this.sourceToOffsetPos(V),loc:new QJ(J,this.state.curPosition())};if(this.optionFlags&256)this.pushToken(W);return W}skipSpace(){let Z=this.state.pos,X=this.optionFlags&4096?[]:null;J:while(this.state.pos<this.length){let J=this.input.charCodeAt(this.state.pos);switch(J){case 32:case 160:case 9:++this.state.pos;break;case 13:if(this.input.charCodeAt(this.state.pos+1)===10)++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let Q=this.skipBlockComment("*/");if(Q!==void 0)this.addComment(Q),X==null||X.push(Q);break}case 47:{let Q=this.skipLineComment(2);if(Q!==void 0)this.addComment(Q),X==null||X.push(Q);break}default:break J}break;default:if(U1(J))++this.state.pos;else if(J===45&&!this.inModule&&this.optionFlags&8192){let Q=this.state.pos;if(this.input.charCodeAt(Q+1)===45&&this.input.charCodeAt(Q+2)===62&&(Z===0||this.state.lineStart>Z)){let V=this.skipLineComment(3);if(V!==void 0)this.addComment(V),X==null||X.push(V)}else break J}else if(J===60&&!this.inModule&&this.optionFlags&8192){let Q=this.state.pos;if(this.input.charCodeAt(Q+1)===33&&this.input.charCodeAt(Q+2)===45&&this.input.charCodeAt(Q+3)===45){let V=this.skipLineComment(4);if(V!==void 0)this.addComment(V),X==null||X.push(V)}else break J}else break J}}if((X==null?void 0:X.length)>0){let J=this.state.pos,Q={start:this.sourceToOffsetPos(Z),end:this.sourceToOffsetPos(J),comments:X,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(Q)}}finishToken(Z,X){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let J=this.state.type;if(this.state.type=Z,this.state.value=X,!this.isLookahead)this.updateContext(J)}replaceToken(Z){this.state.type=Z,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let Z=this.state.pos+1,X=this.codePointAtPos(Z);if(X>=48&&X<=57)throw this.raise(q.UnexpectedDigitAfterHash,this.state.curPosition());if(X===123||X===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(X===123?q.RecordExpressionHashIncorrectStartSyntaxType:q.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());if(this.state.pos+=2,X===123)this.finishToken(7);else this.finishToken(1)}else if(h(X))++this.state.pos,this.finishToken(139,this.readWord1(X));else if(X===92)++this.state.pos,this.finishToken(139,this.readWord1());else this.finishOp(27,1)}readToken_dot(){let Z=this.input.charCodeAt(this.state.pos+1);if(Z>=48&&Z<=57){this.readNumber(!0);return}if(Z===46&&this.input.charCodeAt(this.state.pos+2)===46)this.state.pos+=3,this.finishToken(21);else++this.state.pos,this.finishToken(16)}readToken_slash(){if(this.input.charCodeAt(this.state.pos+1)===61)this.finishOp(31,2);else this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let Z=this.input.charCodeAt(this.state.pos+1);if(Z!==33)return!1;let X=this.state.pos;this.state.pos+=1;while(!t(Z)&&++this.state.pos<this.length)Z=this.input.charCodeAt(this.state.pos);let J=this.input.slice(X+2,this.state.pos);return this.finishToken(28,J),!0}readToken_mult_modulo(Z){let X=Z===42?55:54,J=1,Q=this.input.charCodeAt(this.state.pos+1);if(Z===42&&Q===42)J++,Q=this.input.charCodeAt(this.state.pos+2),X=57;if(Q===61&&!this.state.inType)J++,X=Z===37?33:30;this.finishOp(X,J)}readToken_pipe_amp(Z){let X=this.input.charCodeAt(this.state.pos+1);if(X===Z){if(this.input.charCodeAt(this.state.pos+2)===61)this.finishOp(30,3);else this.finishOp(Z===124?41:42,2);return}if(Z===124){if(X===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&X===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(q.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&X===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(q.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(X===61){this.finishOp(30,2);return}this.finishOp(Z===124?43:45,1)}readToken_caret(){let Z=this.input.charCodeAt(this.state.pos+1);if(Z===61&&!this.state.inType)this.finishOp(32,2);else if(Z===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])){if(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94)this.unexpected()}else this.finishOp(44,1)}readToken_atSign(){if(this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}]))this.finishOp(38,2);else this.finishOp(26,1)}readToken_plus_min(Z){let X=this.input.charCodeAt(this.state.pos+1);if(X===Z){this.finishOp(34,2);return}if(X===61)this.finishOp(30,2);else this.finishOp(53,1)}readToken_lt(){let{pos:Z}=this.state,X=this.input.charCodeAt(Z+1);if(X===60){if(this.input.charCodeAt(Z+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(X===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:Z}=this.state,X=this.input.charCodeAt(Z+1);if(X===62){let J=this.input.charCodeAt(Z+2)===62?3:2;if(this.input.charCodeAt(Z+J)===61){this.finishOp(30,J+1);return}this.finishOp(52,J);return}if(X===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(Z){let X=this.input.charCodeAt(this.state.pos+1);if(X===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(Z===61&&X===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(Z===61?29:35,1)}readToken_question(){let Z=this.input.charCodeAt(this.state.pos+1),X=this.input.charCodeAt(this.state.pos+2);if(Z===63)if(X===61)this.finishOp(30,3);else this.finishOp(40,2);else if(Z===46&&!(X>=48&&X<=57))this.state.pos+=2,this.finishToken(18);else++this.state.pos,this.finishToken(17)}getTokenFromCode(Z){switch(Z){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(q.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(q.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:if(this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58)this.finishOp(15,2);else++this.state.pos,this.finishToken(14);return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let X=this.input.charCodeAt(this.state.pos+1);if(X===120||X===88){this.readRadixNumber(16);return}if(X===111||X===79){this.readRadixNumber(8);return}if(X===98||X===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(Z);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(Z);return;case 124:case 38:this.readToken_pipe_amp(Z);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(Z);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(Z);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(h(Z)){this.readWord(Z);return}}throw this.raise(q.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(Z)})}finishOp(Z,X){let J=this.input.slice(this.state.pos,this.state.pos+X);this.state.pos+=X,this.finishToken(Z,J)}readRegexp(){let Z=this.state.startLoc,X=this.state.start+1,J,Q,{pos:V}=this.state;for(;;++V){if(V>=this.length)throw this.raise(q.UnterminatedRegExp,_(Z,1));let U=this.input.charCodeAt(V);if(t(U))throw this.raise(q.UnterminatedRegExp,_(Z,1));if(J)J=!1;else{if(U===91)Q=!0;else if(U===93&&Q)Q=!1;else if(U===47&&!Q)break;J=U===92}}let Y=this.input.slice(X,V);++V;let W="",j=()=>_(Z,V+2-X);while(V<this.length){let U=this.codePointAtPos(V),R=String.fromCharCode(U);if(F1.has(U)){if(U===118){if(W.includes("u"))this.raise(q.IncompatibleRegExpUVFlags,j())}else if(U===117){if(W.includes("v"))this.raise(q.IncompatibleRegExpUVFlags,j())}if(W.includes(R))this.raise(q.DuplicateRegExpFlags,j())}else if(i(U)||U===92)this.raise(q.MalformedRegExpFlags,j());else break;++V,W+=R}this.state.pos=V,this.finishToken(138,{pattern:Y,flags:W})}readInt(Z,X,J=!1,Q=!0){let{n:V,pos:Y}=dZ(this.input,this.state.pos,this.state.lineStart,this.state.curLine,Z,X,J,Q,this.errorHandlers_readInt,!1);return this.state.pos=Y,V}readRadixNumber(Z){let X=this.state.pos,J=this.state.curPosition(),Q=!1;this.state.pos+=2;let V=this.readInt(Z);if(V==null)this.raise(q.InvalidDigit,_(J,2),{radix:Z});let Y=this.input.charCodeAt(this.state.pos);if(Y===110)++this.state.pos,Q=!0;else if(Y===109)throw this.raise(q.InvalidDecimal,J);if(h(this.codePointAtPos(this.state.pos)))throw this.raise(q.NumberIdentifier,this.state.curPosition());if(Q){let W=this.input.slice(X,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,W);return}this.finishToken(135,V)}readNumber(Z){let X=this.state.pos,J=this.state.curPosition(),Q=!1,V=!1,Y=!1,W=!1;if(!Z&&this.readInt(10)===null)this.raise(q.InvalidNumber,this.state.curPosition());let j=this.state.pos-X>=2&&this.input.charCodeAt(X)===48;if(j){let G=this.input.slice(X,this.state.pos);if(this.recordStrictModeErrors(q.StrictOctalLiteral,J),!this.state.strict){let F=G.indexOf("_");if(F>0)this.raise(q.ZeroDigitNumericSeparator,_(J,F))}W=j&&!/[89]/.test(G)}let U=this.input.charCodeAt(this.state.pos);if(U===46&&!W)++this.state.pos,this.readInt(10),Q=!0,U=this.input.charCodeAt(this.state.pos);if((U===69||U===101)&&!W){if(U=this.input.charCodeAt(++this.state.pos),U===43||U===45)++this.state.pos;if(this.readInt(10)===null)this.raise(q.InvalidOrMissingExponent,J);Q=!0,Y=!0,U=this.input.charCodeAt(this.state.pos)}if(U===110){if(Q||j)this.raise(q.InvalidBigIntLiteral,J);++this.state.pos,V=!0}if(U===109){if(this.expectPlugin("decimal",this.state.curPosition()),Y||j)this.raise(q.InvalidDecimal,J);++this.state.pos;var R=!0}if(h(this.codePointAtPos(this.state.pos)))throw this.raise(q.NumberIdentifier,this.state.curPosition());let H=this.input.slice(X,this.state.pos).replace(/[_mn]/g,"");if(V){this.finishToken(136,H);return}if(R){this.finishToken(137,H);return}let K=W?parseInt(H,8):parseFloat(H);this.finishToken(135,K)}readCodePoint(Z){let{code:X,pos:J}=tZ(this.input,this.state.pos,this.state.lineStart,this.state.curLine,Z,this.errorHandlers_readCodePoint);return this.state.pos=J,X}readString(Z){let{str:X,pos:J,curLine:Q,lineStart:V}=$Z(Z===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=J+1,this.state.lineStart=V,this.state.curLine=Q,this.finishToken(134,X)}readTemplateContinuation(){if(!this.match(8))this.unexpected(null,8);this.state.pos--,this.readTemplateToken()}readTemplateToken(){let Z=this.input[this.state.pos],{str:X,firstInvalidLoc:J,pos:Q,curLine:V,lineStart:Y}=$Z("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);if(this.state.pos=Q+1,this.state.lineStart=Y,this.state.curLine=V,J)this.state.firstInvalidTemplateEscapePos=new E(J.curLine,J.pos-J.lineStart,this.sourceToOffsetPos(J.pos));if(this.input.codePointAt(Q)===96)this.finishToken(24,J?null:Z+X+"`");else this.state.pos++,this.finishToken(25,J?null:Z+X+"${")}recordStrictModeErrors(Z,X){let J=X.index;if(this.state.strict&&!this.state.strictErrors.has(J))this.raise(Z,X);else this.state.strictErrors.set(J,[Z,X])}readWord1(Z){this.state.containsEsc=!1;let X="",J=this.state.pos,Q=this.state.pos;if(Z!==void 0)this.state.pos+=Z<=65535?1:2;while(this.state.pos<this.length){let V=this.codePointAtPos(this.state.pos);if(i(V))this.state.pos+=V<=65535?1:2;else if(V===92){this.state.containsEsc=!0,X+=this.input.slice(Q,this.state.pos);let Y=this.state.curPosition(),W=this.state.pos===J?h:i;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(q.MissingUnicodeEscape,this.state.curPosition()),Q=this.state.pos-1;continue}++this.state.pos;let j=this.readCodePoint(!0);if(j!==null){if(!W(j))this.raise(q.EscapedCharNotAnIdentifier,Y);X+=String.fromCodePoint(j)}Q=this.state.pos}else break}return X+this.input.slice(Q,this.state.pos)}readWord(Z){let X=this.readWord1(Z),J=AJ.get(X);if(J!==void 0)this.finishToken(J,c(J));else this.finishToken(132,X)}checkKeywordEscapes(){let{type:Z}=this.state;if(gJ(Z)&&this.state.containsEsc)this.raise(q.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:c(Z)})}raise(Z,X,J={}){let Q=X instanceof E?X:X.loc.start,V=Z(Q,J);if(!(this.optionFlags&2048))throw V;if(!this.isLookahead)this.state.errors.push(V);return V}raiseOverwrite(Z,X,J={}){let Q=X instanceof E?X:X.loc.start,V=Q.index,Y=this.state.errors;for(let W=Y.length-1;W>=0;W--){let j=Y[W];if(j.loc.index===V)return Y[W]=Z(Q,J);if(j.loc.index<V)break}return this.raise(Z,X,J)}updateContext(Z){}unexpected(Z,X){throw this.raise(q.UnexpectedToken,Z!=null?Z:this.state.startLoc,{expected:X?c(X):null})}expectPlugin(Z,X){if(this.hasPlugin(Z))return!0;throw this.raise(q.MissingPlugin,X!=null?X:this.state.startLoc,{missingPlugin:[Z]})}expectOnePlugin(Z){if(!Z.some((X)=>this.hasPlugin(X)))throw this.raise(q.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:Z})}errorBuilder(Z){return(X,J,Q)=>{this.raise(Z,r(X,J,Q))}}}class nZ{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class rZ{constructor(Z){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=Z}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new nZ)}exit(){let Z=this.stack.pop(),X=this.current();for(let[J,Q]of Array.from(Z.undefinedPrivateNames))if(X){if(!X.undefinedPrivateNames.has(J))X.undefinedPrivateNames.set(J,Q)}else this.parser.raise(q.InvalidPrivateFieldResolution,Q,{identifierName:J})}declarePrivateName(Z,X,J){let{privateNames:Q,loneAccessors:V,undefinedPrivateNames:Y}=this.current(),W=Q.has(Z);if(X&3){let j=W&&V.get(Z);if(j){let U=j&4,R=X&4,H=j&3,K=X&3;if(W=H===K||U!==R,!W)V.delete(Z)}else if(!W)V.set(Z,X)}if(W)this.parser.raise(q.PrivateNameRedeclaration,J,{identifierName:Z});Q.add(Z),Y.delete(Z)}usePrivateName(Z,X){let J;for(J of this.stack)if(J.privateNames.has(Z))return;if(J)J.undefinedPrivateNames.set(Z,X);else this.parser.raise(q.InvalidPrivateFieldResolution,X,{identifierName:Z})}}class YJ{constructor(Z=0){this.type=Z}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class EJ extends YJ{constructor(Z){super(Z);this.declarationErrors=new Map}recordDeclarationError(Z,X){let J=X.index;this.declarationErrors.set(J,[Z,X])}clearDeclarationError(Z){this.declarationErrors.delete(Z)}iterateErrors(Z){this.declarationErrors.forEach(Z)}}class oZ{constructor(Z){this.parser=void 0,this.stack=[new YJ],this.parser=Z}enter(Z){this.stack.push(Z)}exit(){this.stack.pop()}recordParameterInitializerError(Z,X){let J=X.loc.start,{stack:Q}=this,V=Q.length-1,Y=Q[V];while(!Y.isCertainlyParameterDeclaration()){if(Y.canBeArrowParameterDeclaration())Y.recordDeclarationError(Z,J);else return;Y=Q[--V]}this.parser.raise(Z,J)}recordArrowParameterBindingError(Z,X){let{stack:J}=this,Q=J[J.length-1],V=X.loc.start;if(Q.isCertainlyParameterDeclaration())this.parser.raise(Z,V);else if(Q.canBeArrowParameterDeclaration())Q.recordDeclarationError(Z,V);else return}recordAsyncArrowParametersError(Z){let{stack:X}=this,J=X.length-1,Q=X[J];while(Q.canBeArrowParameterDeclaration()){if(Q.type===2)Q.recordDeclarationError(q.AwaitBindingIdentifier,Z);Q=X[--J]}}validateAsPattern(){let{stack:Z}=this,X=Z[Z.length-1];if(!X.canBeArrowParameterDeclaration())return;X.iterateErrors(([J,Q])=>{this.parser.raise(J,Q);let V=Z.length-2,Y=Z[V];while(Y.canBeArrowParameterDeclaration())Y.clearDeclarationError(Q.index),Y=Z[--V]})}}function O1(){return new YJ(3)}function B1(){return new EJ(1)}function D1(){return new EJ(2)}function eZ(){return new YJ}class J0 extends sZ{addExtra(Z,X,J,Q=!0){if(!Z)return;let{extra:V}=Z;if(V==null)V={},Z.extra=V;if(Q)V[X]=J;else Object.defineProperty(V,X,{enumerable:Q,value:J})}isContextual(Z){return this.state.type===Z&&!this.state.containsEsc}isUnparsedContextual(Z,X){if(this.input.startsWith(X,Z)){let J=this.input.charCodeAt(Z+X.length);return!(i(J)||(J&64512)===55296)}return!1}isLookaheadContextual(Z){let X=this.nextTokenStart();return this.isUnparsedContextual(X,Z)}eatContextual(Z){if(this.isContextual(Z))return this.next(),!0;return!1}expectContextual(Z,X){if(!this.eatContextual(Z)){if(X!=null)throw this.raise(X,this.state.startLoc);this.unexpected(null,Z)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return CZ(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return CZ(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(Z=!0){if(Z?this.isLineTerminator():this.eat(13))return;this.raise(q.MissingSemicolon,this.state.lastTokEndLoc)}expect(Z,X){if(!this.eat(Z))this.unexpected(X,Z)}tryParse(Z,X=this.state.clone()){let J={node:null};try{let Q=Z((V=null)=>{throw J.node=V,J});if(this.state.errors.length>X.errors.length){let V=this.state;return this.state=X,this.state.tokensLength=V.tokensLength,{node:Q,error:V.errors[X.errors.length],thrown:!1,aborted:!1,failState:V}}return{node:Q,error:null,thrown:!1,aborted:!1,failState:null}}catch(Q){let V=this.state;if(this.state=X,Q instanceof SyntaxError)return{node:null,error:Q,thrown:!0,aborted:!1,failState:V};if(Q===J)return{node:J.node,error:null,thrown:!1,aborted:!0,failState:V};throw Q}}checkExpressionErrors(Z,X){if(!Z)return!1;let{shorthandAssignLoc:J,doubleProtoLoc:Q,privateKeyLoc:V,optionalParametersLoc:Y,voidPatternLoc:W}=Z,j=!!J||!!Q||!!Y||!!V||!!W;if(!X)return j;if(J!=null)this.raise(q.InvalidCoverInitializedName,J);if(Q!=null)this.raise(q.DuplicateProto,Q);if(V!=null)this.raise(q.UnexpectedPrivateField,V);if(Y!=null)this.unexpected(Y);if(W!=null)this.raise(q.InvalidCoverDiscardElement,W)}isLiteralPropertyName(){return LZ(this.state.type)}isPrivateName(Z){return Z.type==="PrivateName"}getPrivateNameSV(Z){return Z.id.name}hasPropertyAsPrivateName(Z){return(Z.type==="MemberExpression"||Z.type==="OptionalMemberExpression")&&this.isPrivateName(Z.property)}isObjectProperty(Z){return Z.type==="ObjectProperty"}isObjectMethod(Z){return Z.type==="ObjectMethod"}initializeScopes(Z=this.options.sourceType==="module"){let X=this.state.labels;this.state.labels=[];let J=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let Q=this.inModule;this.inModule=Z;let V=this.scope,Y=this.getScopeHandler();this.scope=new Y(this,Z);let W=this.prodParam;this.prodParam=new lZ;let j=this.classScope;this.classScope=new rZ(this);let U=this.expressionScope;return this.expressionScope=new oZ(this),()=>{this.state.labels=X,this.exportedIdentifiers=J,this.inModule=Q,this.scope=V,this.prodParam=W,this.classScope=j,this.expressionScope=U}}enterInitialScopes(){let Z=0;if(this.inModule||this.optionFlags&1)Z|=2;if(this.optionFlags&32)Z|=1;let X=!this.inModule&&this.options.sourceType==="commonjs";if(X||this.optionFlags&2)Z|=4;this.prodParam.enter(Z);let J=X?514:1;if(this.optionFlags&4)J|=512;this.scope.enter(J)}checkDestructuringPrivate(Z){let{privateKeyLoc:X}=Z;if(X!==null)this.expectPlugin("destructuringPrivate",X)}}class ZJ{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}}class VJ{constructor(Z,X,J){if(this.type="",this.start=X,this.end=0,this.loc=new QJ(J),(Z==null?void 0:Z.optionFlags)&128)this.range=[X,0];if(Z!=null&&Z.filename)this.loc.filename=Z.filename}}var MJ=VJ.prototype;MJ.__clone=function(){let Z=new VJ(void 0,this.start,this.loc.start),X=Object.keys(this);for(let J=0,Q=X.length;J<Q;J++){let V=X[J];if(V!=="leadingComments"&&V!=="trailingComments"&&V!=="innerComments")Z[V]=this[V]}return Z};class Z0 extends J0{startNode(){let Z=this.state.startLoc;return new VJ(this,Z.index,Z)}startNodeAt(Z){return new VJ(this,Z.index,Z)}startNodeAtNode(Z){return this.startNodeAt(Z.loc.start)}finishNode(Z,X){return this.finishNodeAt(Z,X,this.state.lastTokEndLoc)}finishNodeAt(Z,X,J){if(Z.type=X,Z.end=J.index,Z.loc.end=J,this.optionFlags&128)Z.range[1]=J.index;if(this.optionFlags&4096)this.processComment(Z);return Z}resetStartLocation(Z,X){if(Z.start=X.index,Z.loc.start=X,this.optionFlags&128)Z.range[0]=X.index}resetEndLocation(Z,X=this.state.lastTokEndLoc){if(Z.end=X.index,Z.loc.end=X,this.optionFlags&128)Z.range[1]=X.index}resetStartLocationFromNode(Z,X){this.resetStartLocation(Z,X.loc.start)}castNodeTo(Z,X){return Z.type=X,Z}cloneIdentifier(Z){let{type:X,start:J,end:Q,loc:V,range:Y,name:W}=Z,j=Object.create(MJ);if(j.type=X,j.start=J,j.end=Q,j.loc=V,j.range=Y,j.name=W,Z.extra)j.extra=Z.extra;return j}cloneStringLiteral(Z){let{type:X,start:J,end:Q,loc:V,range:Y,extra:W}=Z,j=Object.create(MJ);return j.type=X,j.start=J,j.end=Q,j.loc=V,j.range=Y,j.extra=W,j.value=Z.value,j}}var $J=(Z)=>{return Z.type==="ParenthesizedExpression"?$J(Z.expression):Z};class Q0 extends Z0{toAssignable(Z,X=!1){var J,Q;let V=void 0;if(Z.type==="ParenthesizedExpression"||(J=Z.extra)!=null&&J.parenthesized)if(V=$J(Z),X){if(V.type==="Identifier")this.expressionScope.recordArrowParameterBindingError(q.InvalidParenthesizedAssignment,Z);else if(V.type!=="CallExpression"&&V.type!=="MemberExpression"&&!this.isOptionalMemberExpression(V))this.raise(q.InvalidParenthesizedAssignment,Z)}else this.raise(q.InvalidParenthesizedAssignment,Z);switch(Z.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(Z,"ObjectPattern");for(let W=0,j=Z.properties.length,U=j-1;W<j;W++){var Y;let R=Z.properties[W],H=W===U;if(this.toAssignableObjectExpressionProp(R,H,X),H&&R.type==="RestElement"&&(Y=Z.extra)!=null&&Y.trailingCommaLoc)this.raise(q.RestTrailingComma,Z.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:W,value:j}=Z;if(this.isPrivateName(W))this.classScope.usePrivateName(this.getPrivateNameSV(W),W.loc.start);this.toAssignable(j,X);break}case"SpreadElement":throw Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(Z,"ArrayPattern"),this.toAssignableList(Z.elements,(Q=Z.extra)==null?void 0:Q.trailingCommaLoc,X);break;case"AssignmentExpression":if(Z.operator!=="=")this.raise(q.MissingEqInAssignment,Z.left.loc.end);if(this.castNodeTo(Z,"AssignmentPattern"),delete Z.operator,Z.left.type==="VoidPattern")this.raise(q.VoidPatternInitializer,Z.left);this.toAssignable(Z.left,X);break;case"ParenthesizedExpression":this.toAssignable(V,X);break}}toAssignableObjectExpressionProp(Z,X,J){if(Z.type==="ObjectMethod")this.raise(Z.kind==="get"||Z.kind==="set"?q.PatternHasAccessor:q.PatternHasMethod,Z.key);else if(Z.type==="SpreadElement"){this.castNodeTo(Z,"RestElement");let Q=Z.argument;if(this.checkToRestConversion(Q,!1),this.toAssignable(Q,J),!X)this.raise(q.RestTrailingComma,Z)}else this.toAssignable(Z,J)}toAssignableList(Z,X,J){let Q=Z.length-1;for(let V=0;V<=Q;V++){let Y=Z[V];if(!Y)continue;if(this.toAssignableListItem(Z,V,J),Y.type==="RestElement"){if(V<Q)this.raise(q.RestTrailingComma,Y);else if(X)this.raise(q.RestTrailingComma,X)}}}toAssignableListItem(Z,X,J){let Q=Z[X];if(Q.type==="SpreadElement"){this.castNodeTo(Q,"RestElement");let V=Q.argument;this.checkToRestConversion(V,!0),this.toAssignable(V,J)}else this.toAssignable(Q,J)}isAssignable(Z,X){switch(Z.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let J=Z.properties.length-1;return Z.properties.every((Q,V)=>{return Q.type!=="ObjectMethod"&&(V===J||Q.type!=="SpreadElement")&&this.isAssignable(Q)})}case"ObjectProperty":return this.isAssignable(Z.value);case"SpreadElement":return this.isAssignable(Z.argument);case"ArrayExpression":return Z.elements.every((J)=>J===null||this.isAssignable(J));case"AssignmentExpression":return Z.operator==="=";case"ParenthesizedExpression":return this.isAssignable(Z.expression);case"MemberExpression":case"OptionalMemberExpression":return!X;default:return!1}}toReferencedList(Z,X){return Z}toReferencedListDeep(Z,X){this.toReferencedList(Z,X);for(let J of Z)if((J==null?void 0:J.type)==="ArrayExpression")this.toReferencedListDeep(J.elements)}parseSpread(Z){let X=this.startNode();return this.next(),X.argument=this.parseMaybeAssignAllowIn(Z,void 0),this.finishNode(X,"SpreadElement")}parseRestBinding(){let Z=this.startNode();this.next();let X=this.parseBindingAtom();if(X.type==="VoidPattern")this.raise(q.UnexpectedVoidPattern,X);return Z.argument=X,this.finishNode(Z,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let Z=this.startNode();return this.next(),Z.elements=this.parseBindingList(3,93,1),this.finishNode(Z,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(Z,X,J){let Q=J&1,V=[],Y=!0;while(!this.eat(Z)){if(Y)Y=!1;else this.expect(12);if(Q&&this.match(12))V.push(null);else if(this.eat(Z))break;else if(this.match(21)){let W=this.parseRestBinding();if(this.hasPlugin("flow")||J&2)W=this.parseFunctionParamType(W);if(V.push(W),!this.checkCommaAfterRest(X)){this.expect(Z);break}}else{let W=[];if(J&2){if(this.match(26)&&this.hasPlugin("decorators"))this.raise(q.UnsupportedParameterDecorator,this.state.startLoc);while(this.match(26))W.push(this.parseDecorator())}V.push(this.parseBindingElement(J,W))}}return V}parseBindingRestProperty(Z){if(this.next(),this.hasPlugin("discardBinding")&&this.match(88))Z.argument=this.parseVoidPattern(null),this.raise(q.UnexpectedVoidPattern,Z.argument);else Z.argument=this.parseIdentifier();return this.checkCommaAfterRest(125),this.finishNode(Z,"RestElement")}parseBindingProperty(){let{type:Z,startLoc:X}=this.state;if(Z===21)return this.parseBindingRestProperty(this.startNode());let J=this.startNode();if(Z===139)this.expectPlugin("destructuringPrivate",X),this.classScope.usePrivateName(this.state.value,X),J.key=this.parsePrivateName();else this.parsePropertyName(J);return J.method=!1,this.parseObjPropValue(J,X,!1,!1,!0,!1)}parseBindingElement(Z,X){let J=this.parseMaybeDefault();if(this.hasPlugin("flow")||Z&2)this.parseFunctionParamType(J);if(X.length)J.decorators=X,this.resetStartLocationFromNode(J,X[0]);return this.parseMaybeDefault(J.loc.start,J)}parseFunctionParamType(Z){return Z}parseMaybeDefault(Z,X){if(Z!=null||(Z=this.state.startLoc),X=X!=null?X:this.parseBindingAtom(),!this.eat(29))return X;let J=this.startNodeAt(Z);if(X.type==="VoidPattern")this.raise(q.VoidPatternInitializer,X);return J.left=X,J.right=this.parseMaybeAssignAllowIn(),this.finishNode(J,"AssignmentPattern")}isValidLVal(Z,X,J,Q){switch(Z){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!X&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(Z){return Z.type==="OptionalMemberExpression"}checkLVal(Z,X,J=64,Q=!1,V=!1,Y=!1,W=!1){var j;let U=Z.type;if(this.isObjectMethod(Z))return;let R=this.isOptionalMemberExpression(Z);if(R||U==="MemberExpression"){if(R){if(this.expectPlugin("optionalChainingAssign",Z.loc.start),X.type!=="AssignmentExpression")this.raise(q.InvalidLhsOptionalChaining,Z,{ancestor:X})}if(J!==64)this.raise(q.InvalidPropertyBindingPattern,Z);return}if(U==="Identifier"){this.checkIdentifier(Z,J,V);let{name:N}=Z;if(Q)if(Q.has(N))this.raise(q.ParamDupe,Z);else Q.add(N);return}else if(U==="VoidPattern"&&X.type==="CatchClause")this.raise(q.VoidPatternCatchClauseParam,Z);let H=$J(Z);W||(W=H.type==="CallExpression"&&(H.callee.type==="Import"||H.callee.type==="Super"));let K=this.isValidLVal(U,W,!(Y||(j=Z.extra)!=null&&j.parenthesized)&&X.type==="AssignmentExpression",J);if(K===!0)return;if(K===!1){let N=J===64?q.InvalidLhs:q.InvalidLhsBinding;this.raise(N,Z,{ancestor:X});return}let G,F;if(typeof K==="string")G=K,F=U==="ParenthesizedExpression";else[G,F]=K;let v=U==="ArrayPattern"||U==="ObjectPattern"?{type:U}:X,M=Z[G];if(Array.isArray(M)){for(let N of M)if(N)this.checkLVal(N,v,J,Q,V,F,!0)}else if(M)this.checkLVal(M,v,J,Q,V,F,W)}checkIdentifier(Z,X,J=!1){if(this.state.strict&&(J?fZ(Z.name,this.inModule):EZ(Z.name)))if(X===64)this.raise(q.StrictEvalArguments,Z,{referenceName:Z.name});else this.raise(q.StrictEvalArgumentsBinding,Z,{bindingName:Z.name});if(X&8192&&Z.name==="let")this.raise(q.LetInLexicalBinding,Z);if(!(X&64))this.declareNameFromIdentifier(Z,X)}declareNameFromIdentifier(Z,X){this.scope.declareName(Z.name,X,Z.loc.start)}checkToRestConversion(Z,X){switch(Z.type){case"ParenthesizedExpression":this.checkToRestConversion(Z.expression,X);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(X)break;default:this.raise(q.InvalidRestAssignmentPattern,Z)}}checkCommaAfterRest(Z){if(!this.match(12))return!1;return this.raise(this.lookaheadCharCode()===Z?q.RestTrailingComma:q.ElementAfterRest,this.state.startLoc),!0}}var vJ=/in(?:stanceof)?|as|satisfies/y;function v1(Z){if(Z==null)throw Error(`Unexpected ${Z} value.`);return Z}function SZ(Z){if(!Z)throw Error("Assert fail")}var O=g`typescript`({AbstractMethodHasImplementation:({methodName:Z})=>`Method '${Z}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:Z})=>`Property '${Z}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:Z})=>`'declare' is not allowed in ${Z}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:Z})=>`Accessibility modifier already seen: '${Z}'.`,DuplicateModifier:({modifier:Z})=>`Duplicate modifier: '${Z}'.`,EmptyHeritageClauseType:({token:Z})=>`'${Z}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:Z})=>`'${Z[0]}' modifier cannot be used with '${Z[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:Z})=>`Index signatures cannot have an accessibility modifier ('${Z}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:Z})=>`'${Z}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:(Z)=>`'${Z}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:Z})=>`'${Z}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:Z})=>`'${Z}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:Z})=>`'${Z}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:(Z)=>`'${Z}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:Z})=>`'${Z[0]}' modifier must precede '${Z[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:Z})=>`Private elements cannot have an accessibility modifier ('${Z}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:Z})=>`Single type parameter ${Z} should have a trailing comma. Example usage: <${Z},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:Z})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${Z}.`,UsingDeclarationInAmbientContext:(Z)=>`'${Z}' declarations are not allowed in ambient contexts.`});function N1(Z){switch(Z){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function AZ(Z){return Z==="private"||Z==="public"||Z==="protected"}function T1(Z){return Z==="in"||Z==="out"}var I1=(Z)=>class extends Z{constructor(...J){super(...J);this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:O.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:O.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:O.InvalidModifierOnTypeParameter})}getScopeHandler(){return cZ}tsIsIdentifier(){return S(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){if(this.next(),this.hasPrecedingLineBreak())return!1;return this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){if(this.match(106))return this.next(),this.tsTokenCanFollowModifier();return this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(J,Q,V){if(!S(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let Y=this.state.value;if(J.includes(Y)){if(V&&this.match(106))return;if(Q&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return Y}return}tsParseModifiers({allowedModifiers:J,disallowedModifiers:Q,stopOnStartOfClassStaticBlock:V,errorTemplate:Y=O.InvalidModifierOnTypeMember},W){let j=(R,H,K,G)=>{if(H===K&&W[G])this.raise(O.InvalidModifiersOrder,R,{orderedModifiers:[K,G]})},U=(R,H,K,G)=>{if(W[K]&&H===G||W[G]&&H===K)this.raise(O.IncompatibleModifiers,R,{modifiers:[K,G]})};for(;;){let{startLoc:R}=this.state,H=this.tsParseModifier(J.concat(Q!=null?Q:[]),V,W.static);if(!H)break;if(AZ(H))if(W.accessibility)this.raise(O.DuplicateAccessibilityModifier,R,{modifier:H});else j(R,H,H,"override"),j(R,H,H,"static"),j(R,H,H,"readonly"),W.accessibility=H;else if(T1(H)){if(W[H])this.raise(O.DuplicateModifier,R,{modifier:H});W[H]=!0,j(R,H,"in","out")}else{if(hasOwnProperty.call(W,H))this.raise(O.DuplicateModifier,R,{modifier:H});else j(R,H,"static","readonly"),j(R,H,"static","override"),j(R,H,"override","readonly"),j(R,H,"abstract","override"),U(R,H,"declare","override"),U(R,H,"static","abstract");W[H]=!0}if(Q!=null&&Q.includes(H))this.raise(Y,R,{modifier:H})}}tsIsListTerminator(J){switch(J){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(J,Q){let V=[];while(!this.tsIsListTerminator(J))V.push(Q());return V}tsParseDelimitedList(J,Q,V){return v1(this.tsParseDelimitedListWorker(J,Q,!0,V))}tsParseDelimitedListWorker(J,Q,V,Y){let W=[],j=-1;for(;;){if(this.tsIsListTerminator(J))break;j=-1;let U=Q();if(U==null)return;if(W.push(U),this.eat(12)){j=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(J))break;if(V)this.expect(12);return}if(Y)Y.value=j;return W}tsParseBracketedList(J,Q,V,Y,W){if(!Y)if(V)this.expect(0);else this.expect(47);let j=this.tsParseDelimitedList(J,Q,W);if(V)this.expect(3);else this.expect(48);return j}tsParseImportType(){let J=this.startNode();if(this.expect(83),this.expect(10),!this.match(134))this.raise(O.UnsupportedImportTypeArgument,this.state.startLoc),J.argument=super.parseExprAtom();else J.argument=this.parseStringLiteral(this.state.value);if(this.eat(12))J.options=this.tsParseImportTypeOptions();else J.options=null;if(this.expect(11),this.eat(16))J.qualifier=this.tsParseEntityName(3);if(this.match(47))J.typeParameters=this.tsParseTypeArguments();return this.finishNode(J,"TSImportType")}tsParseImportTypeOptions(){let J=this.startNode();this.expect(5);let Q=this.startNode();if(this.isContextual(76))Q.method=!1,Q.key=this.parseIdentifier(!0),Q.computed=!1,Q.shorthand=!1;else this.unexpected(null,76);return this.expect(14),Q.value=this.tsParseImportTypeWithPropertyValue(),J.properties=[this.finishObjectProperty(Q)],this.eat(12),this.expect(8),this.finishNode(J,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let J=this.startNode(),Q=[];this.expect(5);while(!this.match(8)){let V=this.state.type;if(S(V)||V===134)Q.push(super.parsePropertyDefinition(null));else this.unexpected();this.eat(12)}return J.properties=Q,this.next(),this.finishNode(J,"ObjectExpression")}tsParseEntityName(J){let Q;if(J&1&&this.match(78))if(J&2)Q=this.parseIdentifier(!0);else{let V=this.startNode();this.next(),Q=this.finishNode(V,"ThisExpression")}else Q=this.parseIdentifier(!!(J&1));while(this.eat(16)){let V=this.startNodeAtNode(Q);V.left=Q,V.right=this.parseIdentifier(!!(J&1)),Q=this.finishNode(V,"TSQualifiedName")}return Q}tsParseTypeReference(){let J=this.startNode();if(J.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47))J.typeParameters=this.tsParseTypeArguments();return this.finishNode(J,"TSTypeReference")}tsParseThisTypePredicate(J){this.next();let Q=this.startNodeAtNode(J);return Q.parameterName=J,Q.typeAnnotation=this.tsParseTypeAnnotation(!1),Q.asserts=!1,this.finishNode(Q,"TSTypePredicate")}tsParseThisTypeNode(){let J=this.startNode();return this.next(),this.finishNode(J,"TSThisType")}tsParseTypeQuery(){let J=this.startNode();if(this.expect(87),this.match(83))J.exprName=this.tsParseImportType();else J.exprName=this.tsParseEntityName(3);if(!this.hasPrecedingLineBreak()&&this.match(47))J.typeParameters=this.tsParseTypeArguments();return this.finishNode(J,"TSTypeQuery")}tsParseTypeParameter(J){let Q=this.startNode();return J(Q),Q.name=this.tsParseTypeParameterName(),Q.constraint=this.tsEatThenParseType(81),Q.default=this.tsEatThenParseType(29),this.finishNode(Q,"TSTypeParameter")}tsTryParseTypeParameters(J){if(this.match(47))return this.tsParseTypeParameters(J)}tsParseTypeParameters(J){let Q=this.startNode();if(this.match(47)||this.match(143))this.next();else this.unexpected();let V={value:-1};if(Q.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,J),!1,!0,V),Q.params.length===0)this.raise(O.EmptyTypeParameters,Q);if(V.value!==-1)this.addExtra(Q,"trailingComma",V.value);return this.finishNode(Q,"TSTypeParameterDeclaration")}tsFillSignature(J,Q){let V=J===19,Y="parameters",W="typeAnnotation";if(Q.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),Q.parameters=this.tsParseBindingListForSignature(),V)Q.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(J);else if(this.match(J))Q.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(J)}tsParseBindingListForSignature(){let J=super.parseBindingList(11,41,2);for(let Q of J){let{type:V}=Q;if(V==="AssignmentPattern"||V==="TSParameterProperty")this.raise(O.UnsupportedSignatureParameterKind,Q,{type:V})}return J}tsParseTypeMemberSemicolon(){if(!this.eat(12)&&!this.isLineTerminator())this.expect(13)}tsParseSignatureMember(J,Q){return this.tsFillSignature(14,Q),this.tsParseTypeMemberSemicolon(),this.finishNode(Q,J)}tsIsUnambiguouslyIndexSignature(){if(this.next(),S(this.state.type))return this.next(),this.match(14);return!1}tsTryParseIndexSignature(J){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let Q=this.parseIdentifier();Q.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(Q),this.expect(3),J.parameters=[Q];let V=this.tsTryParseTypeAnnotation();if(V)J.typeAnnotation=V;return this.tsParseTypeMemberSemicolon(),this.finishNode(J,"TSIndexSignature")}tsParsePropertyOrMethodSignature(J,Q){if(this.eat(17))J.optional=!0;if(this.match(10)||this.match(47)){if(Q)this.raise(O.ReadonlyForMethodSignature,J);let V=J;if(V.kind&&this.match(47))this.raise(O.AccessorCannotHaveTypeParameters,this.state.curPosition());this.tsFillSignature(14,V),this.tsParseTypeMemberSemicolon();let Y="parameters",W="typeAnnotation";if(V.kind==="get"){if(V[Y].length>0){if(this.raise(q.BadGetterArity,this.state.curPosition()),this.isThisParam(V[Y][0]))this.raise(O.AccessorCannotDeclareThisParameter,this.state.curPosition())}}else if(V.kind==="set"){if(V[Y].length!==1)this.raise(q.BadSetterArity,this.state.curPosition());else{let j=V[Y][0];if(this.isThisParam(j))this.raise(O.AccessorCannotDeclareThisParameter,this.state.curPosition());if(j.type==="Identifier"&&j.optional)this.raise(O.SetAccessorCannotHaveOptionalParameter,this.state.curPosition());if(j.type==="RestElement")this.raise(O.SetAccessorCannotHaveRestParameter,this.state.curPosition())}if(V[W])this.raise(O.SetAccessorCannotHaveReturnType,V[W])}else V.kind="method";return this.finishNode(V,"TSMethodSignature")}else{let V=J;if(Q)V.readonly=!0;let Y=this.tsTryParseTypeAnnotation();if(Y)V.typeAnnotation=Y;return this.tsParseTypeMemberSemicolon(),this.finishNode(V,"TSPropertySignature")}}tsParseTypeMember(){let J=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",J);if(this.match(77)){let V=this.startNode();if(this.next(),this.match(10)||this.match(47))return this.tsParseSignatureMember("TSConstructSignatureDeclaration",J);else return J.key=this.createIdentifier(V,"new"),this.tsParsePropertyOrMethodSignature(J,!1)}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},J);let Q=this.tsTryParseIndexSignature(J);if(Q)return Q;if(super.parsePropertyName(J),!J.computed&&J.key.type==="Identifier"&&(J.key.name==="get"||J.key.name==="set")&&this.tsTokenCanFollowModifier()){if(J.kind=J.key.name,super.parsePropertyName(J),!this.match(10)&&!this.match(47))this.unexpected(null,10)}return this.tsParsePropertyOrMethodSignature(J,!!J.readonly)}tsParseTypeLiteral(){let J=this.startNode();return J.members=this.tsParseObjectTypeMembers(),this.finishNode(J,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let J=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),J}tsIsStartOfMappedType(){if(this.next(),this.eat(53))return this.isContextual(122);if(this.isContextual(122))this.next();if(!this.match(0))return!1;if(this.next(),!this.tsIsIdentifier())return!1;return this.next(),this.match(58)}tsParseMappedType(){let J=this.startNode();if(this.expect(5),this.match(53))J.readonly=this.state.value,this.next(),this.expectContextual(122);else if(this.eatContextual(122))J.readonly=!0;this.expect(0);let Q=this.startNode();if(Q.name=this.tsParseTypeParameterName(),Q.constraint=this.tsExpectThenParseType(58),J.typeParameter=this.finishNode(Q,"TSTypeParameter"),J.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53))J.optional=this.state.value,this.next(),this.expect(17);else if(this.eat(17))J.optional=!0;return J.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(J,"TSMappedType")}tsParseTupleType(){let J=this.startNode();J.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let Q=!1;return J.elementTypes.forEach((V)=>{let{type:Y}=V;if(Q&&Y!=="TSRestType"&&Y!=="TSOptionalType"&&!(Y==="TSNamedTupleMember"&&V.optional))this.raise(O.OptionalTypeBeforeRequired,V);Q||(Q=Y==="TSNamedTupleMember"&&V.optional||Y==="TSOptionalType")}),this.finishNode(J,"TSTupleType")}tsParseTupleElementType(){let J=this.state.startLoc,Q=this.eat(21),{startLoc:V}=this.state,Y,W,j,U,H=k(this.state.type)?this.lookaheadCharCode():null;if(H===58)Y=!0,j=!1,W=this.parseIdentifier(!0),this.expect(14),U=this.tsParseType();else if(H===63){j=!0;let K=this.state.value,G=this.tsParseNonArrayType();if(this.lookaheadCharCode()===58)Y=!0,W=this.createIdentifier(this.startNodeAt(V),K),this.expect(17),this.expect(14),U=this.tsParseType();else Y=!1,U=G,this.expect(17)}else U=this.tsParseType(),j=this.eat(17),Y=this.eat(14);if(Y){let K;if(W){if(K=this.startNodeAt(V),K.optional=j,K.label=W,K.elementType=U,this.eat(17))K.optional=!0,this.raise(O.TupleOptionalAfterType,this.state.lastTokStartLoc)}else K=this.startNodeAt(V),K.optional=j,this.raise(O.InvalidTupleMemberLabel,U),K.label=U,K.elementType=this.tsParseType();U=this.finishNode(K,"TSNamedTupleMember")}else if(j){let K=this.startNodeAt(V);K.typeAnnotation=U,U=this.finishNode(K,"TSOptionalType")}if(Q){let K=this.startNodeAt(J);K.typeAnnotation=U,U=this.finishNode(K,"TSRestType")}return U}tsParseParenthesizedType(){let J=this.startNode();return this.expect(10),J.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(J,"TSParenthesizedType")}tsParseFunctionOrConstructorType(J,Q){let V=this.startNode();if(J==="TSConstructorType"){if(V.abstract=!!Q,Q)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,V)),this.finishNode(V,J)}tsParseLiteralTypeNode(){let J=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:J.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(J,"TSLiteralType")}tsParseTemplateLiteralType(){let J=this.startNode();return J.literal=super.parseTemplate(!1),this.finishNode(J,"TSLiteralType")}parseTemplateSubstitution(){if(this.state.inType)return this.tsParseType();return super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let J=this.tsParseThisTypeNode();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.tsParseThisTypePredicate(J);else return J}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let J=this.startNode(),Q=this.lookahead();if(Q.type!==135&&Q.type!==136)this.unexpected();return J.literal=this.parseMaybeUnary(),this.finishNode(J,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:J}=this.state;if(S(J)||J===88||J===84){let Q=J===88?"TSVoidKeyword":J===84?"TSNullKeyword":N1(this.state.value);if(Q!==void 0&&this.lookaheadCharCode()!==46){let V=this.startNode();return this.next(),this.finishNode(V,Q)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:J}=this.state,Q=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(0))if(this.match(3)){let V=this.startNodeAt(J);V.elementType=Q,this.expect(3),Q=this.finishNode(V,"TSArrayType")}else{let V=this.startNodeAt(J);V.objectType=Q,V.indexType=this.tsParseType(),this.expect(3),Q=this.finishNode(V,"TSIndexedAccessType")}return Q}tsParseTypeOperator(){let J=this.startNode(),Q=this.state.value;if(this.next(),J.operator=Q,J.typeAnnotation=this.tsParseTypeOperatorOrHigher(),Q==="readonly")this.tsCheckTypeAnnotationForReadOnly(J);return this.finishNode(J,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(J){switch(J.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(O.UnexpectedReadonly,J)}}tsParseInferType(){let J=this.startNode();this.expectContextual(115);let Q=this.startNode();return Q.name=this.tsParseTypeParameterName(),Q.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),J.typeParameter=this.finishNode(Q,"TSTypeParameter"),this.finishNode(J,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let J=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return J}}tsParseTypeOperatorOrHigher(){return c0(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(J,Q,V){let Y=this.startNode(),W=this.eat(V),j=[];do j.push(Q());while(this.eat(V));if(j.length===1&&!W)return j[0];return Y.types=j,this.finishNode(Y,J)}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){if(this.match(47))return!0;return this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(S(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:J}=this.state,Q=J.length;try{return this.parseObjectLike(8,!0),J.length===Q}catch(V){return!1}}if(this.match(0)){this.next();let{errors:J}=this.state,Q=J.length;try{return super.parseBindingList(3,93,1),J.length===Q}catch(V){return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)){if(this.next(),this.match(19))return!0}}return!1}tsParseTypeOrTypePredicateAnnotation(J){return this.tsInType(()=>{let Q=this.startNode();this.expect(J);let V=this.startNode(),Y=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(Y&&this.match(78)){let U=this.tsParseThisTypeOrThisTypePredicate();if(U.type==="TSThisType")V.parameterName=U,V.asserts=!0,V.typeAnnotation=null,U=this.finishNode(V,"TSTypePredicate");else this.resetStartLocationFromNode(U,V),U.asserts=!0;return Q.typeAnnotation=U,this.finishNode(Q,"TSTypeAnnotation")}let W=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!W){if(!Y)return this.tsParseTypeAnnotation(!1,Q);return V.parameterName=this.parseIdentifier(),V.asserts=Y,V.typeAnnotation=null,Q.typeAnnotation=this.finishNode(V,"TSTypePredicate"),this.finishNode(Q,"TSTypeAnnotation")}let j=this.tsParseTypeAnnotation(!1);return V.parameterName=W,V.typeAnnotation=j,V.asserts=Y,Q.typeAnnotation=this.finishNode(V,"TSTypePredicate"),this.finishNode(Q,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let J=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),J}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let J=this.state.containsEsc;if(this.next(),!S(this.state.type)&&!this.match(78))return!1;if(J)this.raise(q.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"});return!0}tsParseTypeAnnotation(J=!0,Q=this.startNode()){return this.tsInType(()=>{if(J)this.expect(14);Q.typeAnnotation=this.tsParseType()}),this.finishNode(Q,"TSTypeAnnotation")}tsParseType(){SZ(this.state.inType);let J=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return J;let Q=this.startNodeAtNode(J);return Q.checkType=J,Q.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),Q.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),Q.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(Q,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType())return this.tsParseFunctionOrConstructorType("TSFunctionType");if(this.match(77))return this.tsParseFunctionOrConstructorType("TSConstructorType");else if(this.isAbstractConstructorSignature())return this.tsParseFunctionOrConstructorType("TSConstructorType",!0);return this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){if(this.getPluginOption("typescript","disallowAmbiguousJSXLike"))this.raise(O.ReservedTypeAssertion,this.state.startLoc);let J=this.startNode();return J.typeAnnotation=this.tsInType(()=>{return this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()}),this.expect(48),J.expression=this.parseMaybeUnary(),this.finishNode(J,"TSTypeAssertion")}tsParseHeritageClause(J){let Q=this.state.startLoc,V=this.tsParseDelimitedList("HeritageClauseElement",()=>{let Y=this.startNode();if(Y.expression=this.tsParseEntityName(3),this.match(47))Y.typeParameters=this.tsParseTypeArguments();return this.finishNode(Y,"TSExpressionWithTypeArguments")});if(!V.length)this.raise(O.EmptyHeritageClauseType,Q,{token:J});return V}tsParseInterfaceDeclaration(J,Q={}){if(this.hasFollowingLineBreak())return null;if(this.expectContextual(129),Q.declare)J.declare=!0;if(S(this.state.type))J.id=this.parseIdentifier(),this.checkIdentifier(J.id,130);else J.id=null,this.raise(O.MissingInterfaceName,this.state.startLoc);if(J.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81))J.extends=this.tsParseHeritageClause("extends");let V=this.startNode();return V.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),J.body=this.finishNode(V,"TSInterfaceBody"),this.finishNode(J,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(J){return J.id=this.parseIdentifier(),this.checkIdentifier(J.id,2),J.typeAnnotation=this.tsInType(()=>{if(J.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let Q=this.startNode();return this.next(),this.finishNode(Q,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(J,"TSTypeAliasDeclaration")}tsInTopLevelContext(J){if(this.curContext()!==$.brace){let Q=this.state.context;this.state.context=[Q[0]];try{return J()}finally{this.state.context=Q}}else return J()}tsInType(J){let Q=this.state.inType;this.state.inType=!0;try{return J()}finally{this.state.inType=Q}}tsInDisallowConditionalTypesContext(J){let Q=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return J()}finally{this.state.inDisallowConditionalTypesContext=Q}}tsInAllowConditionalTypesContext(J){let Q=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return J()}finally{this.state.inDisallowConditionalTypesContext=Q}}tsEatThenParseType(J){if(this.match(J))return this.tsNextThenParseType()}tsExpectThenParseType(J){return this.tsInType(()=>{return this.expect(J),this.tsParseType()})}tsNextThenParseType(){return this.tsInType(()=>{return this.next(),this.tsParseType()})}tsParseEnumMember(){let J=this.startNode();if(J.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29))J.initializer=super.parseMaybeAssignAllowIn();return this.finishNode(J,"TSEnumMember")}tsParseEnumDeclaration(J,Q={}){if(Q.const)J.const=!0;if(Q.declare)J.declare=!0;return this.expectContextual(126),J.id=this.parseIdentifier(),this.checkIdentifier(J.id,J.const?8971:8459),this.expect(5),J.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(J,"TSEnumDeclaration")}tsParseEnumBody(){let J=this.startNode();return this.expect(5),J.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(J,"TSEnumBody")}tsParseModuleBlock(){let J=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(J.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(J,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(J,Q=!1){if(J.id=this.parseIdentifier(),!Q)this.checkIdentifier(J.id,1024);if(this.eat(16)){let V=this.startNode();this.tsParseModuleOrNamespaceDeclaration(V,!0),J.body=V}else this.scope.enter(1024),this.prodParam.enter(0),J.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(J,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(J){if(this.isContextual(112))J.kind="global",J.global=!0,J.id=this.parseIdentifier();else if(this.match(134))J.kind="module",J.id=super.parseStringLiteral(this.state.value);else this.unexpected();if(this.match(5))this.scope.enter(1024),this.prodParam.enter(0),J.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();else this.semicolon();return this.finishNode(J,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(J,Q,V){J.isExport=V||!1,J.id=Q||this.parseIdentifier(),this.checkIdentifier(J.id,4096),this.expect(29);let Y=this.tsParseModuleReference();if(J.importKind==="type"&&Y.type!=="TSExternalModuleReference")this.raise(O.ImportAliasHasImportType,Y);return J.moduleReference=Y,this.semicolon(),this.finishNode(J,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let J=this.startNode();if(this.expectContextual(119),this.expect(10),!this.match(134))this.unexpected();return J.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(J,"TSExternalModuleReference")}tsLookAhead(J){let Q=this.state.clone(),V=J();return this.state=Q,V}tsTryParseAndCatch(J){let Q=this.tryParse((V)=>J()||V());if(Q.aborted||!Q.node)return;if(Q.error)this.state=Q.failState;return Q.node}tsTryParse(J){let Q=this.state.clone(),V=J();if(V!==void 0&&V!==!1)return V;this.state=Q}tsTryParseDeclare(J){if(this.isLineTerminator())return;let Q=this.state.type;return this.tsInAmbientContext(()=>{switch(Q){case 68:return J.declare=!0,super.parseFunctionStatement(J,!1,!1);case 80:return J.declare=!0,this.parseClass(J,!0,!1);case 126:return this.tsParseEnumDeclaration(J,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(J);case 100:if(this.state.containsEsc)return;case 75:case 74:if(!this.match(75)||!this.isLookaheadContextual("enum"))return J.declare=!0,this.parseVarStatement(J,this.state.value,!0);return this.expect(75),this.tsParseEnumDeclaration(J,{const:!0,declare:!0});case 107:if(this.isUsing())return this.raise(O.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),J.declare=!0,this.parseVarStatement(J,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(O.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),J.declare=!0,this.next(),this.parseVarStatement(J,"await using",!0);break;case 129:{let V=this.tsParseInterfaceDeclaration(J,{declare:!0});if(V)return V}default:if(S(Q))return this.tsParseDeclaration(J,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(J,Q,V,Y){switch(Q){case 124:if(this.tsCheckLineTerminator(V)&&(this.match(80)||S(this.state.type)))return this.tsParseAbstractDeclaration(J,Y);break;case 127:if(this.tsCheckLineTerminator(V)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(J);else if(S(this.state.type))return J.kind="module",this.tsParseModuleOrNamespaceDeclaration(J)}break;case 128:if(this.tsCheckLineTerminator(V)&&S(this.state.type))return J.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(J);break;case 130:if(this.tsCheckLineTerminator(V)&&S(this.state.type))return this.tsParseTypeAliasDeclaration(J);break}}tsCheckLineTerminator(J){if(J){if(this.hasFollowingLineBreak())return!1;return this.next(),!0}return!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(J){if(!this.match(47))return;let Q=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let V=this.tsTryParseAndCatch(()=>{let Y=this.startNodeAt(J);return Y.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(Y),Y.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),Y});if(this.state.maybeInArrowParameters=Q,!V)return;return super.parseArrowExpression(V,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==47)return;return this.tsParseTypeArguments()}tsParseTypeArguments(){let J=this.startNode();if(J.params=this.tsInType(()=>this.tsInTopLevelContext(()=>{return this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))})),J.params.length===0)this.raise(O.EmptyTypeArguments,J);else if(!this.state.inType&&this.curContext()===$.brace)this.reScan_lt_gt();return this.expect(48),this.finishNode(J,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return l0(this.state.type)}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;return super.isExportDefaultSpecifier()}parseBindingElement(J,Q){let V=Q.length?Q[0].loc.start:this.state.startLoc,Y={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},Y);let{accessibility:W,override:j,readonly:U}=Y;if(!(J&4)&&(W||U||j))this.raise(O.UnexpectedParameterModifier,V);let R=this.parseMaybeDefault();if(J&2)this.parseFunctionParamType(R);let H=this.parseMaybeDefault(R.loc.start,R);if(W||U||j){let K=this.startNodeAt(V);if(Q.length)K.decorators=Q;if(W)K.accessibility=W;if(U)K.readonly=U;if(j)K.override=j;if(H.type!=="Identifier"&&H.type!=="AssignmentPattern")this.raise(O.UnsupportedParameterPropertyKind,K);return K.parameter=H,this.finishNode(K,"TSParameterProperty")}if(Q.length)R.decorators=Q;return H}isSimpleParameter(J){return J.type==="TSParameterProperty"&&super.isSimpleParameter(J.parameter)||super.isSimpleParameter(J)}tsDisallowOptionalPattern(J){for(let Q of J.params)if(Q.type!=="Identifier"&&Q.optional&&!this.state.isAmbientContext)this.raise(O.PatternIsOptional,Q)}setArrowFunctionParameters(J,Q,V){super.setArrowFunctionParameters(J,Q,V),this.tsDisallowOptionalPattern(J)}parseFunctionBodyAndFinish(J,Q,V=!1){if(this.match(14))J.returnType=this.tsParseTypeOrTypePredicateAnnotation(14);let Y=Q==="FunctionDeclaration"?"TSDeclareFunction":Q==="ClassMethod"||Q==="ClassPrivateMethod"?"TSDeclareMethod":void 0;if(Y&&!this.match(5)&&this.isLineTerminator())return this.finishNode(J,Y);if(Y==="TSDeclareFunction"&&this.state.isAmbientContext){if(this.raise(O.DeclareFunctionHasImplementation,J),J.declare)return super.parseFunctionBodyAndFinish(J,Y,V)}return this.tsDisallowOptionalPattern(J),super.parseFunctionBodyAndFinish(J,Q,V)}registerFunctionStatementId(J){if(!J.body&&J.id)this.checkIdentifier(J.id,1024);else super.registerFunctionStatementId(J)}tsCheckForInvalidTypeCasts(J){J.forEach((Q)=>{if((Q==null?void 0:Q.type)==="TSTypeCastExpression")this.raise(O.UnexpectedTypeAnnotation,Q.typeAnnotation)})}toReferencedList(J,Q){return this.tsCheckForInvalidTypeCasts(J),J}parseArrayLike(J,Q,V){let Y=super.parseArrayLike(J,Q,V);if(Y.type==="ArrayExpression")this.tsCheckForInvalidTypeCasts(Y.elements);return Y}parseSubscript(J,Q,V,Y){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let j=this.startNodeAt(Q);return j.expression=J,this.finishNode(j,"TSNonNullExpression")}let W=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(V)return Y.stop=!0,J;Y.optionalChainMember=W=!0,this.next()}if(this.match(47)||this.match(51)){let j,U=this.tsTryParseAndCatch(()=>{if(!V&&this.atPossibleAsyncArrow(J)){let G=this.tsTryParseGenericAsyncArrowFunction(Q);if(G)return Y.stop=!0,G}let R=this.tsParseTypeArgumentsInExpression();if(!R)return;if(W&&!this.match(10)){j=this.state.curPosition();return}if(KJ(this.state.type)){let G=super.parseTaggedTemplateExpression(J,Q,Y);return G.typeParameters=R,G}if(!V&&this.eat(10)){let G=this.startNodeAt(Q);if(G.callee=J,G.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(G.arguments),G.typeParameters=R,Y.optionalChainMember)G.optional=W;return this.finishCallExpression(G,Y.optionalChainMember)}let H=this.state.type;if(H===48||H===52||H!==10&&H!==93&&H!==120&&o(H)&&!this.hasPrecedingLineBreak())return;let K=this.startNodeAt(Q);return K.expression=J,K.typeParameters=R,this.finishNode(K,"TSInstantiationExpression")});if(j)this.unexpected(j,10);if(U){if(U.type==="TSInstantiationExpression"){if(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)this.raise(O.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc);if(!this.match(16)&&!this.match(18))U.expression=super.stopParseSubscript(J,Y)}return U}}return super.parseSubscript(J,Q,V,Y)}parseNewCallee(J){var Q;super.parseNewCallee(J);let{callee:V}=J;if(V.type==="TSInstantiationExpression"&&!((Q=V.extra)!=null&&Q.parenthesized))J.typeParameters=V.typeParameters,J.callee=V.expression}parseExprOp(J,Q,V){let Y;if(qJ(58)>V&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(Y=this.isContextual(120)))){let W=this.startNodeAt(Q);return W.expression=J,W.typeAnnotation=this.tsInType(()=>{if(this.next(),this.match(75)){if(Y)this.raise(q.UnexpectedKeyword,this.state.startLoc,{keyword:"const"});return this.tsParseTypeReference()}return this.tsParseType()}),this.finishNode(W,Y?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(W,Q,V)}return super.parseExprOp(J,Q,V)}checkReservedWord(J,Q,V,Y){if(!this.state.isAmbientContext)super.checkReservedWord(J,Q,V,Y)}checkImportReflection(J){if(super.checkImportReflection(J),J.module&&J.importKind!=="value")this.raise(O.ImportReflectionHasImportType,J.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(J){if(super.isPotentialImportPhase(J))return!0;if(this.isContextual(130)){let Q=this.lookaheadCharCode();return J?Q===123||Q===42:Q!==61}return!J&&this.isContextual(87)}applyImportPhase(J,Q,V,Y){if(super.applyImportPhase(J,Q,V,Y),Q)J.exportKind=V==="type"?"type":"value";else J.importKind=V==="type"||V==="typeof"?V:"value"}parseImport(J){if(this.match(134))return J.importKind="value",super.parseImport(J);let Q;if(S(this.state.type)&&this.lookaheadCharCode()===61)return J.importKind="value",this.tsParseImportEqualsDeclaration(J);else if(this.isContextual(130)){let V=this.parseMaybeImportPhase(J,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(J,V);else Q=super.parseImportSpecifiersAndAfter(J,V)}else Q=super.parseImport(J);if(Q.importKind==="type"&&Q.specifiers.length>1&&Q.specifiers[0].type==="ImportDefaultSpecifier")this.raise(O.TypeImportCannotSpecifyDefaultAndNamed,Q);return Q}parseExport(J,Q){if(this.match(83)){let V=J;this.next();let Y=null;if(this.isContextual(130)&&this.isPotentialImportPhase(!1))Y=this.parseMaybeImportPhase(V,!1);else V.importKind="value";return this.tsParseImportEqualsDeclaration(V,Y,!0)}else if(this.eat(29)){let V=J;return V.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(V,"TSExportAssignment")}else if(this.eatContextual(93)){let V=J;return this.expectContextual(128),V.id=this.parseIdentifier(),this.semicolon(),this.finishNode(V,"TSNamespaceExportDeclaration")}else return super.parseExport(J,Q)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let J=this.startNode();return this.next(),J.abstract=!0,this.parseClass(J,!0,!0)}if(this.match(129)){let J=this.tsParseInterfaceDeclaration(this.startNode());if(J)return J}return super.parseExportDefaultExpression()}parseVarStatement(J,Q,V=!1){let{isAmbientContext:Y}=this.state,W=super.parseVarStatement(J,Q,V||Y);if(!Y)return W;if(!J.declare&&(Q==="using"||Q==="await using"))return this.raiseOverwrite(O.UsingDeclarationInAmbientContext,J,Q),W;for(let{id:j,init:U}of W.declarations){if(!U)continue;if(Q==="var"||Q==="let"||!!j.typeAnnotation)this.raise(O.InitializerNotAllowedInAmbientContext,U);else if(!M1(U,this.hasPlugin("estree")))this.raise(O.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,U)}return W}parseStatementContent(J,Q){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let V=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(V,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let V=this.state.type,Y=this.startNode();this.next();let W=V===125?this.tsTryParseDeclare(Y):this.tsParseAbstractDeclaration(Y,Q);if(W){if(V===125)W.declare=!0;return W}else return Y.expression=this.createIdentifier(this.startNodeAt(Y.loc.start),V===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(Y,"ExpressionStatement")}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let Y=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(Y)}break}case 129:{let V=this.tsParseInterfaceDeclaration(this.startNode());if(V)return V;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let V=this.startNode();return this.next(),this.tsParseDeclaration(V,127,!1,Q)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let V=this.startNode();return this.next(),this.tsParseDeclaration(V,128,!1,Q)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let V=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(V)}break}}return super.parseStatementContent(J,Q)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(J,Q){return Q.some((V)=>{if(AZ(V))return J.accessibility===V;return!!J[V]})}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(J,Q,V){let Y=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:Y,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:O.InvalidModifierOnTypeParameterPositions},Q);let W=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(Q,Y))this.raise(O.StaticBlockCannotHaveModifier,this.state.curPosition());super.parseClassStaticBlock(J,Q)}else this.parseClassMemberWithIsStatic(J,Q,V,!!Q.static)};if(Q.declare)this.tsInAmbientContext(W);else W()}parseClassMemberWithIsStatic(J,Q,V,Y){let W=this.tsTryParseIndexSignature(Q);if(W){if(J.body.push(W),Q.abstract)this.raise(O.IndexSignatureHasAbstract,Q);if(Q.accessibility)this.raise(O.IndexSignatureHasAccessibility,Q,{modifier:Q.accessibility});if(Q.declare)this.raise(O.IndexSignatureHasDeclare,Q);if(Q.override)this.raise(O.IndexSignatureHasOverride,Q);return}if(!this.state.inAbstractClass&&Q.abstract)this.raise(O.NonAbstractClassHasAbstractMethod,Q);if(Q.override){if(!V.hadSuperClass)this.raise(O.OverrideNotInSubClass,Q)}super.parseClassMemberWithIsStatic(J,Q,V,Y)}parsePostMemberNameModifiers(J){if(this.eat(17))J.optional=!0;if(J.readonly&&this.match(10))this.raise(O.ClassMethodHasReadonly,J);if(J.declare&&this.match(10))this.raise(O.ClassMethodHasDeclare,J)}shouldParseExportDeclaration(){if(this.tsIsDeclarationStart())return!0;return super.shouldParseExportDeclaration()}parseConditional(J,Q,V){if(!this.match(17))return J;if(this.state.maybeInArrowParameters){let Y=this.lookaheadCharCode();if(Y===44||Y===61||Y===58||Y===41)return this.setOptionalParametersError(V),J}return super.parseConditional(J,Q,V)}parseParenItem(J,Q){let V=super.parseParenItem(J,Q);if(this.eat(17))V.optional=!0,this.resetEndLocation(J);if(this.match(14)){let Y=this.startNodeAt(Q);return Y.expression=J,Y.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(Y,"TSTypeCastExpression")}return J}parseExportDeclaration(J){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(J));let Q=this.state.startLoc,V=this.eatContextual(125);if(V&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(O.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let W=S(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(J);if(!W)return null;if(W.type==="TSInterfaceDeclaration"||W.type==="TSTypeAliasDeclaration"||V)J.exportKind="type";if(V&&W.type!=="TSImportEqualsDeclaration")this.resetStartLocation(W,Q),W.declare=!0;return W}parseClassId(J,Q,V,Y){if((!Q||V)&&this.isContextual(113))return;super.parseClassId(J,Q,V,J.declare?1024:8331);let W=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);if(W)J.typeParameters=W}parseClassPropertyAnnotation(J){if(!J.optional){if(this.eat(35))J.definite=!0;else if(this.eat(17))J.optional=!0}let Q=this.tsTryParseTypeAnnotation();if(Q)J.typeAnnotation=Q}parseClassProperty(J){if(this.parseClassPropertyAnnotation(J),this.state.isAmbientContext&&!(J.readonly&&!J.typeAnnotation)&&this.match(29))this.raise(O.DeclareClassFieldHasInitializer,this.state.startLoc);if(J.abstract&&this.match(29)){let{key:Q}=J;this.raise(O.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:Q.type==="Identifier"&&!J.computed?Q.name:`[${this.input.slice(this.offsetToSourcePos(Q.start),this.offsetToSourcePos(Q.end))}]`})}return super.parseClassProperty(J)}parseClassPrivateProperty(J){if(J.abstract)this.raise(O.PrivateElementHasAbstract,J);if(J.accessibility)this.raise(O.PrivateElementHasAccessibility,J,{modifier:J.accessibility});return this.parseClassPropertyAnnotation(J),super.parseClassPrivateProperty(J)}parseClassAccessorProperty(J){if(this.parseClassPropertyAnnotation(J),J.optional)this.raise(O.AccessorCannotBeOptional,J);return super.parseClassAccessorProperty(J)}pushClassMethod(J,Q,V,Y,W,j){let U=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(U&&W)this.raise(O.ConstructorHasTypeParameters,U);let{declare:R=!1,kind:H}=Q;if(R&&(H==="get"||H==="set"))this.raise(O.DeclareAccessor,Q,{kind:H});if(U)Q.typeParameters=U;super.pushClassMethod(J,Q,V,Y,W,j)}pushClassPrivateMethod(J,Q,V,Y){let W=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(W)Q.typeParameters=W;super.pushClassPrivateMethod(J,Q,V,Y)}declareClassPrivateMethodInScope(J,Q){if(J.type==="TSDeclareMethod")return;if(J.type==="MethodDefinition"&&J.value.body==null)return;super.declareClassPrivateMethodInScope(J,Q)}parseClassSuper(J){if(super.parseClassSuper(J),J.superClass){if(J.superClass.type==="TSInstantiationExpression"){let Q=J.superClass,V=Q.expression;this.takeSurroundingComments(V,V.start,V.end);let Y=Q.typeParameters;this.takeSurroundingComments(Y,Y.start,Y.end),J.superClass=V,J.superTypeParameters=Y}else if(this.match(47)||this.match(51))J.superTypeParameters=this.tsParseTypeArgumentsInExpression()}if(this.eatContextual(113))J.implements=this.tsParseHeritageClause("implements")}parseObjPropValue(J,Q,V,Y,W,j,U){let R=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(R)J.typeParameters=R;return super.parseObjPropValue(J,Q,V,Y,W,j,U)}parseFunctionParams(J,Q){let V=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(V)J.typeParameters=V;super.parseFunctionParams(J,Q)}parseVarId(J,Q){if(super.parseVarId(J,Q),J.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35))J.definite=!0;let V=this.tsTryParseTypeAnnotation();if(V)J.id.typeAnnotation=V,this.resetEndLocation(J.id)}parseAsyncArrowFromCallExpression(J,Q){if(this.match(14))J.returnType=this.tsParseTypeAnnotation();return super.parseAsyncArrowFromCallExpression(J,Q)}parseMaybeAssign(J,Q){var V,Y,W,j,U;let R,H,K;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(R=this.state.clone(),H=this.tryParse(()=>super.parseMaybeAssign(J,Q),R),!H.error)return H.node;let{context:v}=this.state,M=v[v.length-1];if(M===$.j_oTag||M===$.j_expr)v.pop()}if(!((V=H)!=null&&V.error)&&!this.match(47))return super.parseMaybeAssign(J,Q);if(!R||R===this.state)R=this.state.clone();let G,F=this.tryParse((v)=>{var M,N;G=this.tsParseTypeParameters(this.tsParseConstModifier);let A=super.parseMaybeAssign(J,Q);if(A.type!=="ArrowFunctionExpression"||(M=A.extra)!=null&&M.parenthesized)v();if(((N=G)==null?void 0:N.params.length)!==0)this.resetStartLocationFromNode(A,G);return A.typeParameters=G,A},R);if(!F.error&&!F.aborted){if(G)this.reportReservedArrowTypeParam(G);return F.node}if(!H){if(SZ(!this.hasPlugin("jsx")),K=this.tryParse(()=>super.parseMaybeAssign(J,Q),R),!K.error)return K.node}if((Y=H)!=null&&Y.node)return this.state=H.failState,H.node;if(F.node){if(this.state=F.failState,G)this.reportReservedArrowTypeParam(G);return F.node}if((W=K)!=null&&W.node)return this.state=K.failState,K.node;throw((j=H)==null?void 0:j.error)||F.error||((U=K)==null?void 0:U.error)}reportReservedArrowTypeParam(J){var Q;if(J.params.length===1&&!J.params[0].constraint&&!((Q=J.extra)!=null&&Q.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike"))this.raise(O.ReservedArrowTypeParam,J)}parseMaybeUnary(J,Q){if(!this.hasPlugin("jsx")&&this.match(47))return this.tsParseTypeAssertion();return super.parseMaybeUnary(J,Q)}parseArrow(J){if(this.match(14)){let Q=this.tryParse((V)=>{let Y=this.tsParseTypeOrTypePredicateAnnotation(14);if(this.canInsertSemicolon()||!this.match(19))V();return Y});if(Q.aborted)return;if(!Q.thrown){if(Q.error)this.state=Q.failState;J.returnType=Q.node}}return super.parseArrow(J)}parseFunctionParamType(J){if(this.eat(17))J.optional=!0;let Q=this.tsTryParseTypeAnnotation();if(Q)J.typeAnnotation=Q;return this.resetEndLocation(J),J}isAssignable(J,Q){switch(J.type){case"TSTypeCastExpression":return this.isAssignable(J.expression,Q);case"TSParameterProperty":return!0;default:return super.isAssignable(J,Q)}}toAssignable(J,Q=!1){switch(J.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(J,Q);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(Q)this.expressionScope.recordArrowParameterBindingError(O.UnexpectedTypeCastInParameter,J);else this.raise(O.UnexpectedTypeCastInParameter,J);this.toAssignable(J.expression,Q);break;case"AssignmentExpression":if(!Q&&J.left.type==="TSTypeCastExpression")J.left=this.typeCastToParameter(J.left);default:super.toAssignable(J,Q)}}toAssignableParenthesizedExpression(J,Q){switch(J.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(J.expression,Q);break;default:super.toAssignable(J,Q)}}checkToRestConversion(J,Q){switch(J.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(J.expression,!1);break;default:super.checkToRestConversion(J,Q)}}isValidLVal(J,Q,V,Y){switch(J){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(Y!==64||!V)&&["expression",!0];default:return super.isValidLVal(J,Q,V,Y)}}parseBindingAtom(){if(this.state.type===78)return this.parseIdentifier(!0);return super.parseBindingAtom()}parseMaybeDecoratorArguments(J,Q){if(this.match(47)||this.match(51)){let V=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let Y=super.parseMaybeDecoratorArguments(J,Q);return Y.typeParameters=V,Y}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(J,Q)}checkCommaAfterRest(J){if(this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===J)return this.next(),!1;return super.checkCommaAfterRest(J)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(J,Q){let V=super.parseMaybeDefault(J,Q);if(V.type==="AssignmentPattern"&&V.typeAnnotation&&V.right.start<V.typeAnnotation.start)this.raise(O.TypeAnnotationAfterAssign,V.typeAnnotation);return V}getTokenFromCode(J){if(this.state.inType){if(J===62){this.finishOp(48,1);return}if(J===60){this.finishOp(47,1);return}}super.getTokenFromCode(J)}reScan_lt_gt(){let{type:J}=this.state;if(J===47)this.state.pos-=1,this.readToken_lt();else if(J===48)this.state.pos-=1,this.readToken_gt()}reScan_lt(){let{type:J}=this.state;if(J===51)return this.state.pos-=2,this.finishOp(47,1),47;return J}toAssignableListItem(J,Q,V){let Y=J[Q];if(Y.type==="TSTypeCastExpression")J[Q]=this.typeCastToParameter(Y);super.toAssignableListItem(J,Q,V)}typeCastToParameter(J){return J.expression.typeAnnotation=J.typeAnnotation,this.resetEndLocation(J.expression,J.typeAnnotation.loc.end),J.expression}shouldParseArrow(J){if(this.match(14))return J.every((Q)=>this.isAssignable(Q,!0));return super.shouldParseArrow(J)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(J){if(this.match(47)||this.match(51)){let Q=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(Q)J.typeParameters=Q}return super.jsxParseOpeningElementAfterName(J)}getGetterSetterExpectedParamCount(J){let Q=super.getGetterSetterExpectedParamCount(J),Y=this.getObjectOrClassMethodParams(J)[0];return Y&&this.isThisParam(Y)?Q+1:Q}parseCatchClauseParam(){let J=super.parseCatchClauseParam(),Q=this.tsTryParseTypeAnnotation();if(Q)J.typeAnnotation=Q,this.resetEndLocation(J);return J}tsInAmbientContext(J){let{isAmbientContext:Q,strict:V}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return J()}finally{this.state.isAmbientContext=Q,this.state.strict=V}}parseClass(J,Q,V){let Y=this.state.inAbstractClass;this.state.inAbstractClass=!!J.abstract;try{return super.parseClass(J,Q,V)}finally{this.state.inAbstractClass=Y}}tsParseAbstractDeclaration(J,Q){if(this.match(80))return J.abstract=!0,this.maybeTakeDecorators(Q,this.parseClass(J,!0,!1));else if(this.isContextual(129))if(!this.hasFollowingLineBreak())return J.abstract=!0,this.raise(O.NonClassMethodPropertyHasAbstractModifier,J),this.tsParseInterfaceDeclaration(J);else return null;throw this.unexpected(null,80)}parseMethod(J,Q,V,Y,W,j,U){let R=super.parseMethod(J,Q,V,Y,W,j,U);if(R.abstract||R.type==="TSAbstractMethodDefinition"){if((this.hasPlugin("estree")?R.value:R).body){let{key:G}=R;this.raise(O.AbstractMethodHasImplementation,R,{methodName:G.type==="Identifier"&&!R.computed?G.name:`[${this.input.slice(this.offsetToSourcePos(G.start),this.offsetToSourcePos(G.end))}]`})}}return R}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){if(this.shouldParseAsAmbientContext())this.state.isAmbientContext=!0;return super.parse()}getExpression(){if(this.shouldParseAsAmbientContext())this.state.isAmbientContext=!0;return super.getExpression()}parseExportSpecifier(J,Q,V,Y){if(!Q&&Y)return this.parseTypeOnlyImportExportSpecifier(J,!1,V),this.finishNode(J,"ExportSpecifier");return J.exportKind="value",super.parseExportSpecifier(J,Q,V,Y)}parseImportSpecifier(J,Q,V,Y,W){if(!Q&&Y)return this.parseTypeOnlyImportExportSpecifier(J,!0,V),this.finishNode(J,"ImportSpecifier");return J.importKind="value",super.parseImportSpecifier(J,Q,V,Y,V?4098:4096)}parseTypeOnlyImportExportSpecifier(J,Q,V){let Y=Q?"imported":"local",W=Q?"local":"exported",j=J[Y],U,R=!1,H=!0,K=j.loc.start;if(this.isContextual(93)){let F=this.parseIdentifier();if(this.isContextual(93)){let v=this.parseIdentifier();if(k(this.state.type))R=!0,j=F,U=Q?this.parseIdentifier():this.parseModuleExportName(),H=!1;else U=v,H=!1}else if(k(this.state.type))H=!1,U=Q?this.parseIdentifier():this.parseModuleExportName();else R=!0,j=F}else if(k(this.state.type))if(R=!0,Q){if(j=this.parseIdentifier(!0),!this.isContextual(93))this.checkReservedWord(j.name,j.loc.start,!0,!0)}else j=this.parseModuleExportName();if(R&&V)this.raise(Q?O.TypeModifierIsUsedInTypeImports:O.TypeModifierIsUsedInTypeExports,K);J[Y]=j,J[W]=U;let G=Q?"importKind":"exportKind";if(J[G]=R?"type":"value",H&&this.eatContextual(93))J[W]=Q?this.parseIdentifier():this.parseModuleExportName();if(!J[W])J[W]=this.cloneIdentifier(J[Y]);if(Q)this.checkIdentifier(J[W],R?4098:4096)}fillOptionalPropertiesForTSESLint(J){var Q,V,Y,W,j,U,R,H,K,G,F,v,M,N,A,P,l,y,yJ,xJ,mJ,cJ,lJ,pJ,iJ,aJ,dJ,tJ,sJ,nJ,rJ,oJ,eJ,JZ,ZZ,QZ,XZ,VZ,YZ,WZ,jZ,RZ,UZ,qZ,HZ,KZ,GZ,zZ;switch(J.type){case"ExpressionStatement":(Q=J.directive)!=null||(J.directive=void 0);return;case"RestElement":J.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(V=J.decorators)!=null||(J.decorators=[]),(Y=J.optional)!=null||(J.optional=!1),(W=J.typeAnnotation)!=null||(J.typeAnnotation=void 0);return;case"TSParameterProperty":(j=J.accessibility)!=null||(J.accessibility=void 0),(U=J.decorators)!=null||(J.decorators=[]),(R=J.override)!=null||(J.override=!1),(H=J.readonly)!=null||(J.readonly=!1),(K=J.static)!=null||(J.static=!1);return;case"TSEmptyBodyFunctionExpression":J.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(G=J.declare)!=null||(J.declare=!1),(F=J.returnType)!=null||(J.returnType=void 0),(v=J.typeParameters)!=null||(J.typeParameters=void 0);return;case"Property":(M=J.optional)!=null||(J.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(N=J.optional)!=null||(J.optional=!1);case"TSIndexSignature":(A=J.accessibility)!=null||(J.accessibility=void 0),(P=J.readonly)!=null||(J.readonly=!1),(l=J.static)!=null||(J.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(y=J.declare)!=null||(J.declare=!1),(yJ=J.definite)!=null||(J.definite=!1),(xJ=J.readonly)!=null||(J.readonly=!1),(mJ=J.typeAnnotation)!=null||(J.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(cJ=J.accessibility)!=null||(J.accessibility=void 0),(lJ=J.decorators)!=null||(J.decorators=[]),(pJ=J.override)!=null||(J.override=!1),(iJ=J.optional)!=null||(J.optional=!1);return;case"ClassExpression":(aJ=J.id)!=null||(J.id=null);case"ClassDeclaration":(dJ=J.abstract)!=null||(J.abstract=!1),(tJ=J.declare)!=null||(J.declare=!1),(sJ=J.decorators)!=null||(J.decorators=[]),(nJ=J.implements)!=null||(J.implements=[]),(rJ=J.superTypeArguments)!=null||(J.superTypeArguments=void 0),(oJ=J.typeParameters)!=null||(J.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(eJ=J.declare)!=null||(J.declare=!1);return;case"VariableDeclarator":(JZ=J.definite)!=null||(J.definite=!1);return;case"TSEnumDeclaration":(ZZ=J.const)!=null||(J.const=!1),(QZ=J.declare)!=null||(J.declare=!1);return;case"TSEnumMember":(XZ=J.computed)!=null||(J.computed=!1);return;case"TSImportType":(VZ=J.qualifier)!=null||(J.qualifier=null),(YZ=J.options)!=null||(J.options=null);return;case"TSInterfaceDeclaration":(WZ=J.declare)!=null||(J.declare=!1),(jZ=J.extends)!=null||(J.extends=[]);return;case"TSMappedType":(RZ=J.optional)!=null||(J.optional=!1),(UZ=J.readonly)!=null||(J.readonly=void 0);return;case"TSModuleDeclaration":(qZ=J.declare)!=null||(J.declare=!1),(HZ=J.global)!=null||(J.global=J.kind==="global");return;case"TSTypeParameter":(KZ=J.const)!=null||(J.const=!1),(GZ=J.in)!=null||(J.in=!1),(zZ=J.out)!=null||(J.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(J,Q){if(h(J)){if(vJ.lastIndex=Q,vJ.test(this.input)){let V=this.codePointAtPos(vJ.lastIndex);if(!i(V)&&V!==92)return!1}return!0}else if(J===92)return!0;else return!1}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let J=this.nextTokenInLineStart(),Q=this.codePointAtPos(J);return this.chStartsBindingIdentifierAndNotRelationalOperator(Q,J)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let J=this.nextTokenInLineStart(),Q=this.codePointAtPos(J);return this.chStartsBindingIdentifier(Q,J)||Q===34||Q===39}};function C1(Z){if(Z.type!=="MemberExpression")return!1;let{computed:X,property:J}=Z;if(X&&J.type!=="StringLiteral"&&(J.type!=="TemplateLiteral"||J.expressions.length>0))return!1;return V0(Z.object)}function M1(Z,X){var J;let{type:Q}=Z;if((J=Z.extra)!=null&&J.parenthesized)return!1;if(X){if(Q==="Literal"){let{value:V}=Z;if(typeof V==="string"||typeof V==="boolean")return!0}}else if(Q==="StringLiteral"||Q==="BooleanLiteral")return!0;if(X0(Z,X)||$1(Z,X))return!0;if(Q==="TemplateLiteral"&&Z.expressions.length===0)return!0;if(C1(Z))return!0;return!1}function X0(Z,X){if(X)return Z.type==="Literal"&&(typeof Z.value==="number"||("bigint"in Z));return Z.type==="NumericLiteral"||Z.type==="BigIntLiteral"}function $1(Z,X){if(Z.type==="UnaryExpression"){let{operator:J,argument:Q}=Z;if(J==="-"&&X0(Q,X))return!0}return!1}function V0(Z){if(Z.type==="Identifier")return!0;if(Z.type!=="MemberExpression"||Z.computed)return!1;return V0(Z.object)}var PZ=g`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),S1=(Z)=>class extends Z{parsePlaceholder(J){if(this.match(133)){let Q=this.startNode();return this.next(),this.assertNoSpace(),Q.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(Q,J)}}finishPlaceholder(J,Q){let V=J;if(!V.expectedNode||!V.type)V=this.finishNode(V,"Placeholder");return V.expectedNode=Q,V}getTokenFromCode(J){if(J===37&&this.input.charCodeAt(this.state.pos+1)===37)this.finishOp(133,2);else super.getTokenFromCode(J)}parseExprAtom(J){return this.parsePlaceholder("Expression")||super.parseExprAtom(J)}parseIdentifier(J){return this.parsePlaceholder("Identifier")||super.parseIdentifier(J)}checkReservedWord(J,Q,V,Y){if(J!==void 0)super.checkReservedWord(J,Q,V,Y)}cloneIdentifier(J){let Q=super.cloneIdentifier(J);if(Q.type==="Placeholder")Q.expectedNode=J.expectedNode;return Q}cloneStringLiteral(J){if(J.type==="Placeholder")return this.cloneIdentifier(J);return super.cloneStringLiteral(J)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(J,Q,V,Y){return J==="Placeholder"||super.isValidLVal(J,Q,V,Y)}toAssignable(J,Q){if(J&&J.type==="Placeholder"&&J.expectedNode==="Expression")J.expectedNode="Pattern";else super.toAssignable(J,Q)}chStartsBindingIdentifier(J,Q){if(super.chStartsBindingIdentifier(J,Q))return!0;let V=this.nextTokenStart();if(this.input.charCodeAt(V)===37&&this.input.charCodeAt(V+1)===37)return!0;return!1}verifyBreakContinue(J,Q){var V;if(((V=J.label)==null?void 0:V.type)==="Placeholder")return;super.verifyBreakContinue(J,Q)}parseExpressionStatement(J,Q){var V;if(Q.type!=="Placeholder"||(V=Q.extra)!=null&&V.parenthesized)return super.parseExpressionStatement(J,Q);if(this.match(14)){let W=J;return W.label=this.finishPlaceholder(Q,"Identifier"),this.next(),W.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(W,"LabeledStatement")}this.semicolon();let Y=J;return Y.name=Q.name,this.finishPlaceholder(Y,"Statement")}parseBlock(J,Q,V){return this.parsePlaceholder("BlockStatement")||super.parseBlock(J,Q,V)}parseFunctionId(J){return this.parsePlaceholder("Identifier")||super.parseFunctionId(J)}parseClass(J,Q,V){let Y=Q?"ClassDeclaration":"ClassExpression";this.next();let W=this.state.strict,j=this.parsePlaceholder("Identifier");if(j)if(this.match(81)||this.match(133)||this.match(5))J.id=j;else if(V||!Q)return J.id=null,J.body=this.finishPlaceholder(j,"ClassBody"),this.finishNode(J,Y);else throw this.raise(PZ.ClassNameIsRequired,this.state.startLoc);else this.parseClassId(J,Q,V);return super.parseClassSuper(J),J.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!J.superClass,W),this.finishNode(J,Y)}parseExport(J,Q){let V=this.parsePlaceholder("Identifier");if(!V)return super.parseExport(J,Q);let Y=J;if(!this.isContextual(98)&&!this.match(12))return Y.specifiers=[],Y.source=null,Y.declaration=this.finishPlaceholder(V,"Declaration"),this.finishNode(Y,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let W=this.startNode();return W.exported=V,Y.specifiers=[this.finishNode(W,"ExportDefaultSpecifier")],super.parseExport(Y,Q)}isExportDefaultSpecifier(){if(this.match(65)){let J=this.nextTokenStart();if(this.isUnparsedContextual(J,"from")){if(this.input.startsWith(c(133),this.nextTokenStartSince(J+4)))return!0}}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(J,Q){var V;if((V=J.specifiers)!=null&&V.length)return!0;return super.maybeParseExportDefaultSpecifier(J,Q)}checkExport(J){let{specifiers:Q}=J;if(Q!=null&&Q.length)J.specifiers=Q.filter((V)=>V.exported.type==="Placeholder");super.checkExport(J),J.specifiers=Q}parseImport(J){let Q=this.parsePlaceholder("Identifier");if(!Q)return super.parseImport(J);if(J.specifiers=[],!this.isContextual(98)&&!this.match(12))return J.source=this.finishPlaceholder(Q,"StringLiteral"),this.semicolon(),this.finishNode(J,"ImportDeclaration");let V=this.startNodeAtNode(Q);if(V.local=Q,J.specifiers.push(this.finishNode(V,"ImportDefaultSpecifier")),this.eat(12)){if(!this.maybeParseStarImportSpecifier(J))this.parseNamedImportSpecifiers(J)}return this.expectContextual(98),J.source=this.parseImportSource(),this.semicolon(),this.finishNode(J,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){if(this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index))this.raise(PZ.UnexpectedSpace,this.state.lastTokEndLoc)}},A1=(Z)=>class extends Z{parseV8Intrinsic(){if(this.match(54)){let J=this.state.startLoc,Q=this.startNode();if(this.next(),S(this.state.type)){let V=this.parseIdentifierName(),Y=this.createIdentifier(Q,V);if(this.castNodeTo(Y,"V8IntrinsicIdentifier"),this.match(10))return Y}this.unexpected(J)}}parseExprAtom(J){return this.parseV8Intrinsic()||super.parseExprAtom(J)}},wZ=["minimal","fsharp","hack","smart"],_Z=["^^","@@","^","%","#"];function P1(Z){if(Z.has("decorators")){if(Z.has("decorators-legacy"))throw Error("Cannot use the decorators and decorators-legacy plugin together");let Q=Z.get("decorators").decoratorsBeforeExport;if(Q!=null&&typeof Q!=="boolean")throw Error("'decoratorsBeforeExport' must be a boolean, if specified.");let V=Z.get("decorators").allowCallParenthesized;if(V!=null&&typeof V!=="boolean")throw Error("'allowCallParenthesized' must be a boolean.")}if(Z.has("flow")&&Z.has("typescript"))throw Error("Cannot combine flow and typescript plugins.");if(Z.has("placeholders")&&Z.has("v8intrinsic"))throw Error("Cannot combine placeholders and v8intrinsic plugins.");if(Z.has("pipelineOperator")){var X;let Q=Z.get("pipelineOperator").proposal;if(!wZ.includes(Q)){let V=wZ.map((Y)=>`"${Y}"`).join(", ");throw Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${V}.`)}if(Q==="hack"){var J;if(Z.has("placeholders"))throw Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Z.has("v8intrinsic"))throw Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let V=Z.get("pipelineOperator").topicToken;if(!_Z.includes(V)){let Y=_Z.map((W)=>`"${W}"`).join(", ");throw Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${Y}.`)}if(V==="#"&&((J=Z.get("recordAndTuple"))==null?void 0:J.syntaxType)==="hash")throw Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",Z.get("recordAndTuple")])}\`.`)}else if(Q==="smart"&&((X=Z.get("recordAndTuple"))==null?void 0:X.syntaxType)==="hash")throw Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",Z.get("recordAndTuple")])}\`.`)}if(Z.has("moduleAttributes")){if(Z.has("deprecatedImportAssert")||Z.has("importAssertions"))throw Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(Z.get("moduleAttributes").version!=="may-2020")throw Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Z.has("importAssertions")){if(Z.has("deprecatedImportAssert"))throw Error("Cannot combine importAssertions and deprecatedImportAssert plugins.")}if(Z.has("deprecatedImportAssert"));else if(Z.has("importAttributes")&&Z.get("importAttributes").deprecatedAssertSyntax)Z.set("deprecatedImportAssert",{});if(Z.has("recordAndTuple")){let Q=Z.get("recordAndTuple").syntaxType;if(Q!=null){let V=["hash","bar"];if(!V.includes(Q))throw Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+V.map((Y)=>`'${Y}'`).join(", "))}}if(Z.has("asyncDoExpressions")&&!Z.has("doExpressions")){let Q=Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw Q.missingPlugins="doExpressions",Q}if(Z.has("optionalChainingAssign")&&Z.get("optionalChainingAssign").version!=="2023-07")throw Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(Z.has("discardBinding")&&Z.get("discardBinding").syntaxType!=="void")throw Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}var Y0={estree:L0,jsx:q1,flow:W1,typescript:I1,v8intrinsic:A1,placeholders:S1},w1=Object.keys(Y0);class W0 extends Q0{checkProto(Z,X,J,Q){if(Z.type==="SpreadElement"||this.isObjectMethod(Z)||Z.computed||Z.shorthand)return J;let V=Z.key;if((V.type==="Identifier"?V.name:V.value)==="__proto__"){if(X)return this.raise(q.RecordNoProto,V),!0;if(J)if(Q){if(Q.doubleProtoLoc===null)Q.doubleProtoLoc=V.loc.start}else this.raise(q.DuplicateProto,V);return!0}return J}shouldExitDescending(Z,X){return Z.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(Z.start)===X}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(q.ParseExpressionEmptyInput,this.state.startLoc);let Z=this.parseExpression();if(!this.match(140))throw this.raise(q.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});if(this.finalizeRemainingComments(),Z.comments=this.comments,Z.errors=this.state.errors,this.optionFlags&256)Z.tokens=this.tokens;return Z}parseExpression(Z,X){if(Z)return this.disallowInAnd(()=>this.parseExpressionBase(X));return this.allowInAnd(()=>this.parseExpressionBase(X))}parseExpressionBase(Z){let X=this.state.startLoc,J=this.parseMaybeAssign(Z);if(this.match(12)){let Q=this.startNodeAt(X);Q.expressions=[J];while(this.eat(12))Q.expressions.push(this.parseMaybeAssign(Z));return this.toReferencedList(Q.expressions),this.finishNode(Q,"SequenceExpression")}return J}parseMaybeAssignDisallowIn(Z,X){return this.disallowInAnd(()=>this.parseMaybeAssign(Z,X))}parseMaybeAssignAllowIn(Z,X){return this.allowInAnd(()=>this.parseMaybeAssign(Z,X))}setOptionalParametersError(Z){Z.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(Z,X){let J=this.state.startLoc,Q=this.isContextual(108);if(Q){if(this.prodParam.hasYield){this.next();let j=this.parseYield(J);if(X)j=X.call(this,j,J);return j}}let V;if(Z)V=!1;else Z=new ZJ,V=!0;let{type:Y}=this.state;if(Y===10||S(Y))this.state.potentialArrowAt=this.state.start;let W=this.parseMaybeConditional(Z);if(X)W=X.call(this,W,J);if(E0(this.state.type)){let j=this.startNodeAt(J),U=this.state.value;if(j.operator=U,this.match(29)){this.toAssignable(W,!0),j.left=W;let R=J.index;if(Z.doubleProtoLoc!=null&&Z.doubleProtoLoc.index>=R)Z.doubleProtoLoc=null;if(Z.shorthandAssignLoc!=null&&Z.shorthandAssignLoc.index>=R)Z.shorthandAssignLoc=null;if(Z.privateKeyLoc!=null&&Z.privateKeyLoc.index>=R)this.checkDestructuringPrivate(Z),Z.privateKeyLoc=null;if(Z.voidPatternLoc!=null&&Z.voidPatternLoc.index>=R)Z.voidPatternLoc=null}else j.left=W;return this.next(),j.right=this.parseMaybeAssign(),this.checkLVal(W,this.finishNode(j,"AssignmentExpression"),void 0,void 0,void 0,void 0,U==="||="||U==="&&="||U==="??="),j}else if(V)this.checkExpressionErrors(Z,!0);if(Q){let{type:j}=this.state;if((this.hasPlugin("v8intrinsic")?o(j):o(j)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(q.YieldNotInGeneratorFunction,J),this.parseYield(J)}return W}parseMaybeConditional(Z){let X=this.state.startLoc,J=this.state.potentialArrowAt,Q=this.parseExprOps(Z);if(this.shouldExitDescending(Q,J))return Q;return this.parseConditional(Q,X,Z)}parseConditional(Z,X,J){if(this.eat(17)){let Q=this.startNodeAt(X);return Q.test=Z,Q.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),Q.alternate=this.parseMaybeAssign(),this.finishNode(Q,"ConditionalExpression")}return Z}parseMaybeUnaryOrPrivate(Z){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(Z)}parseExprOps(Z){let X=this.state.startLoc,J=this.state.potentialArrowAt,Q=this.parseMaybeUnaryOrPrivate(Z);if(this.shouldExitDescending(Q,J))return Q;return this.parseExprOp(Q,X,-1)}parseExprOp(Z,X,J){if(this.isPrivateName(Z)){let V=this.getPrivateNameSV(Z);if(J>=qJ(58)||!this.prodParam.hasIn||!this.match(58))this.raise(q.PrivateInExpectedIn,Z,{identifierName:V});this.classScope.usePrivateName(V,Z.loc.start)}let Q=this.state.type;if(y0(Q)&&(this.prodParam.hasIn||!this.match(58))){let V=qJ(Q);if(V>J){if(Q===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return Z;this.checkPipelineAtInfixOperator(Z,X)}let Y=this.startNodeAt(X);Y.left=Z,Y.operator=this.state.value;let W=Q===41||Q===42,j=Q===40;if(j)V=qJ(42);if(this.next(),Q===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])){if(this.state.type===96&&this.prodParam.hasAwait)throw this.raise(q.UnexpectedAwaitAfterPipelineBody,this.state.startLoc)}Y.right=this.parseExprOpRightExpr(Q,V);let U=this.finishNode(Y,W||j?"LogicalExpression":"BinaryExpression"),R=this.state.type;if(j&&(R===41||R===42)||W&&R===40)throw this.raise(q.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(U,X,J)}}return Z}parseExprOpRightExpr(Z,X){let J=this.state.startLoc;switch(Z){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>{return this.parseHackPipeBody()});case"fsharp":return this.withSoloAwaitPermittingContext(()=>{return this.parseFSharpPipelineBody(X)})}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(q.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(Z,X),J)});default:return this.parseExprOpBaseRightExpr(Z,X)}}parseExprOpBaseRightExpr(Z,X){let J=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),J,p0(Z)?X-1:X)}parseHackPipeBody(){var Z;let{startLoc:X}=this.state,J=this.parseMaybeAssign();if($0.has(J.type)&&!((Z=J.extra)!=null&&Z.parenthesized))this.raise(q.PipeUnparenthesizedBody,X,{type:J.type});if(!this.topicReferenceWasUsedInCurrentContext())this.raise(q.PipeTopicUnused,X);return J}checkExponentialAfterUnary(Z){if(this.match(57))this.raise(q.UnexpectedTokenUnaryExponentiation,Z.argument)}parseMaybeUnary(Z,X){let J=this.state.startLoc,Q=this.isContextual(96);if(Q&&this.recordAwaitIfAllowed()){this.next();let j=this.parseAwait(J);if(!X)this.checkExponentialAfterUnary(j);return j}let V=this.match(34),Y=this.startNode();if(m0(this.state.type)){if(Y.operator=this.state.value,Y.prefix=!0,this.match(72))this.expectPlugin("throwExpressions");let j=this.match(89);if(this.next(),Y.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(Z,!0),this.state.strict&&j){let U=Y.argument;if(U.type==="Identifier")this.raise(q.StrictDelete,Y);else if(this.hasPropertyAsPrivateName(U))this.raise(q.DeletePrivateField,Y)}if(!V){if(!X)this.checkExponentialAfterUnary(Y);return this.finishNode(Y,"UnaryExpression")}}let W=this.parseUpdate(Y,V,Z);if(Q){let{type:j}=this.state;if((this.hasPlugin("v8intrinsic")?o(j):o(j)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(q.AwaitNotInAsyncContext,J),this.parseAwait(J)}return W}parseUpdate(Z,X,J){if(X){let Y=Z;return this.checkLVal(Y.argument,this.finishNode(Y,"UpdateExpression")),Z}let Q=this.state.startLoc,V=this.parseExprSubscripts(J);if(this.checkExpressionErrors(J,!1))return V;while(x0(this.state.type)&&!this.canInsertSemicolon()){let Y=this.startNodeAt(Q);Y.operator=this.state.value,Y.prefix=!1,Y.argument=V,this.next(),this.checkLVal(V,V=this.finishNode(Y,"UpdateExpression"))}return V}parseExprSubscripts(Z){let X=this.state.startLoc,J=this.state.potentialArrowAt,Q=this.parseExprAtom(Z);if(this.shouldExitDescending(Q,J))return Q;return this.parseSubscripts(Q,X)}parseSubscripts(Z,X,J){let Q={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(Z),stop:!1};do Z=this.parseSubscript(Z,X,J,Q),Q.maybeAsyncArrow=!1;while(!Q.stop);return Z}parseSubscript(Z,X,J,Q){let{type:V}=this.state;if(!J&&V===15)return this.parseBind(Z,X,J,Q);else if(KJ(V))return this.parseTaggedTemplateExpression(Z,X,Q);let Y=!1;if(V===18){if(J){if(this.raise(q.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40)return this.stopParseSubscript(Z,Q)}Q.optionalChainMember=Y=!0,this.next()}if(!J&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(Z,X,Q,Y);else{let W=this.eat(0);if(W||Y||this.eat(16))return this.parseMember(Z,X,Q,W,Y);else return this.stopParseSubscript(Z,Q)}}stopParseSubscript(Z,X){return X.stop=!0,Z}parseMember(Z,X,J,Q,V){let Y=this.startNodeAt(X);if(Y.object=Z,Y.computed=Q,Q)Y.property=this.parseExpression(),this.expect(3);else if(this.match(139)){if(Z.type==="Super")this.raise(q.SuperPrivateField,X);this.classScope.usePrivateName(this.state.value,this.state.startLoc),Y.property=this.parsePrivateName()}else Y.property=this.parseIdentifier(!0);if(J.optionalChainMember)return Y.optional=V,this.finishNode(Y,"OptionalMemberExpression");else return this.finishNode(Y,"MemberExpression")}parseBind(Z,X,J,Q){let V=this.startNodeAt(X);return V.object=Z,this.next(),V.callee=this.parseNoCallExpr(),Q.stop=!0,this.parseSubscripts(this.finishNode(V,"BindExpression"),X,J)}parseCoverCallAndAsyncArrowHead(Z,X,J,Q){let V=this.state.maybeInArrowParameters,Y=null;this.state.maybeInArrowParameters=!0,this.next();let W=this.startNodeAt(X);W.callee=Z;let{maybeAsyncArrow:j,optionalChainMember:U}=J;if(j)this.expressionScope.enter(D1()),Y=new ZJ;if(U)W.optional=Q;if(Q)W.arguments=this.parseCallExpressionArguments();else W.arguments=this.parseCallExpressionArguments(Z.type!=="Super",W,Y);let R=this.finishCallExpression(W,U);if(j&&this.shouldParseAsyncArrow()&&!Q)J.stop=!0,this.checkDestructuringPrivate(Y),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),R=this.parseAsyncArrowFromCallExpression(this.startNodeAt(X),R);else{if(j)this.checkExpressionErrors(Y,!0),this.expressionScope.exit();this.toReferencedArguments(R)}return this.state.maybeInArrowParameters=V,R}toReferencedArguments(Z,X){this.toReferencedListDeep(Z.arguments,X)}parseTaggedTemplateExpression(Z,X,J){let Q=this.startNodeAt(X);if(Q.tag=Z,Q.quasi=this.parseTemplate(!0),J.optionalChainMember)this.raise(q.OptionalChainingNoTemplate,X);return this.finishNode(Q,"TaggedTemplateExpression")}atPossibleAsyncArrow(Z){return Z.type==="Identifier"&&Z.name==="async"&&this.state.lastTokEndLoc.index===Z.end&&!this.canInsertSemicolon()&&Z.end-Z.start===5&&this.offsetToSourcePos(Z.start)===this.state.potentialArrowAt}finishCallExpression(Z,X){if(Z.callee.type==="Import"){if(Z.arguments.length===0||Z.arguments.length>2)this.raise(q.ImportCallArity,Z);else for(let J of Z.arguments)if(J.type==="SpreadElement")this.raise(q.ImportCallSpreadArgument,J)}return this.finishNode(Z,X?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(Z,X,J){let Q=[],V=!0,Y=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;while(!this.eat(11)){if(V)V=!1;else if(this.expect(12),this.match(11)){if(X)this.addTrailingCommaExtraToNode(X);this.next();break}Q.push(this.parseExprListItem(11,!1,J,Z))}return this.state.inFSharpPipelineDirectBody=Y,Q}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(Z,X){var J;if(this.resetPreviousNodeTrailingComments(X),this.expect(19),this.parseArrowExpression(Z,X.arguments,!0,(J=X.extra)==null?void 0:J.trailingCommaLoc),X.innerComments)XJ(Z,X.innerComments);if(X.callee.trailingComments)XJ(Z,X.callee.trailingComments);return Z}parseNoCallExpr(){let Z=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),Z,!0)}parseExprAtom(Z){let X,J=null,{type:Q}=this.state;switch(Q){case 79:return this.parseSuper();case 83:if(X=this.startNode(),this.next(),this.match(16))return this.parseImportMetaPropertyOrPhaseCall(X);if(this.match(10))if(this.optionFlags&512)return this.parseImportCall(X);else return this.finishNode(X,"Import");else return this.raise(q.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(X,"Import");case 78:return X=this.startNode(),this.next(),this.finishNode(X,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let V=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(V)}case 0:return this.parseArrayLike(3,!1,Z);case 5:return this.parseObjectLike(8,!1,!1,Z);case 68:return this.parseFunctionOrFunctionSent();case 26:J=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(J,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{X=this.startNode(),this.next(),X.object=null;let V=X.callee=this.parseNoCallExpr();if(V.type==="MemberExpression")return this.finishNode(X,"BindExpression");else throw this.raise(q.UnsupportedBind,V)}case 139:return this.raise(q.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let V=this.getPluginOption("pipelineOperator","proposal");if(V)return this.parseTopicReference(V);throw this.unexpected()}case 47:{let V=this.input.codePointAt(this.nextTokenStart());if(h(V)||V===62)throw this.expectOnePlugin(["jsx","flow","typescript"]);throw this.unexpected()}default:if(Q===137)return this.parseDecimalLiteral(this.state.value);else if(Q===2||Q===1)return this.parseArrayLike(this.state.type===2?4:3,!0);else if(Q===6||Q===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0);if(S(Q)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let V=this.state.potentialArrowAt===this.state.start,Y=this.state.containsEsc,W=this.parseIdentifier();if(!Y&&W.name==="async"&&!this.canInsertSemicolon()){let{type:j}=this.state;if(j===68)return this.resetPreviousNodeTrailingComments(W),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(W));else if(S(j))if(V&&this.lookaheadCharCode()===61)return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(W));else return W;else if(j===90)return this.resetPreviousNodeTrailingComments(W),this.parseDo(this.startNodeAtNode(W),!0)}if(V&&this.match(19)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(W),[W],!1);return W}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(Z,X){let J=this.getPluginOption("pipelineOperator","proposal");if(J)return this.state.type=Z,this.state.value=X,this.state.pos--,this.state.end--,this.state.endLoc=_(this.state.endLoc,-1),this.parseTopicReference(J);throw this.unexpected()}parseTopicReference(Z){let X=this.startNode(),J=this.state.startLoc,Q=this.state.type;return this.next(),this.finishTopicReference(X,J,Z,Q)}finishTopicReference(Z,X,J,Q){if(this.testTopicReferenceConfiguration(J,X,Q))if(J==="hack"){if(!this.topicReferenceIsAllowedInCurrentContext())this.raise(q.PipeTopicUnbound,X);return this.registerTopicReference(),this.finishNode(Z,"TopicReference")}else{if(!this.topicReferenceIsAllowedInCurrentContext())this.raise(q.PrimaryTopicNotAllowed,X);return this.registerTopicReference(),this.finishNode(Z,"PipelinePrimaryTopicReference")}else throw this.raise(q.PipeTopicUnconfiguredToken,X,{token:c(Q)})}testTopicReferenceConfiguration(Z,X,J){switch(Z){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:c(J)}]);case"smart":return J===27;default:throw this.raise(q.PipeTopicRequiresHackPipes,X)}}parseAsyncArrowUnaryFunction(Z){this.prodParam.enter(HJ(!0,this.prodParam.hasYield));let X=[this.parseIdentifier()];if(this.prodParam.exit(),this.hasPrecedingLineBreak())this.raise(q.LineTerminatorBeforeArrow,this.state.curPosition());return this.expect(19),this.parseArrowExpression(Z,X,!0)}parseDo(Z,X){if(this.expectPlugin("doExpressions"),X)this.expectPlugin("asyncDoExpressions");Z.async=X,this.next();let J=this.state.labels;if(this.state.labels=[],X)this.prodParam.enter(2),Z.body=this.parseBlock(),this.prodParam.exit();else Z.body=this.parseBlock();return this.state.labels=J,this.finishNode(Z,"DoExpression")}parseSuper(){let Z=this.startNode();if(this.next(),this.match(10)&&!this.scope.allowDirectSuper){if(!(this.optionFlags&16))this.raise(q.SuperNotAllowed,Z)}else if(!this.scope.allowSuper){if(!(this.optionFlags&16))this.raise(q.UnexpectedSuper,Z)}if(!this.match(10)&&!this.match(0)&&!this.match(16))this.raise(q.UnsupportedSuper,Z);return this.finishNode(Z,"Super")}parsePrivateName(){let Z=this.startNode(),X=this.startNodeAt(_(this.state.startLoc,1)),J=this.state.value;return this.next(),Z.id=this.createIdentifier(X,J),this.finishNode(Z,"PrivateName")}parseFunctionOrFunctionSent(){let Z=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let X=this.createIdentifier(this.startNodeAtNode(Z),"function");if(this.next(),this.match(103))this.expectPlugin("functionSent");else if(!this.hasPlugin("functionSent"))this.unexpected();return this.parseMetaProperty(Z,X,"sent")}return this.parseFunction(Z)}parseMetaProperty(Z,X,J){Z.meta=X;let Q=this.state.containsEsc;if(Z.property=this.parseIdentifier(!0),Z.property.name!==J||Q)this.raise(q.UnsupportedMetaProperty,Z.property,{target:X.name,onlyValidPropertyName:J});return this.finishNode(Z,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(Z){if(this.next(),this.isContextual(105)||this.isContextual(97)){let X=this.isContextual(105);return this.expectPlugin(X?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),Z.phase=X?"source":"defer",this.parseImportCall(Z)}else{let X=this.createIdentifierAt(this.startNodeAtNode(Z),"import",this.state.lastTokStartLoc);if(this.isContextual(101)){if(!this.inModule)this.raise(q.ImportMetaOutsideModule,X);this.sawUnambiguousESM=!0}return this.parseMetaProperty(Z,X,"meta")}}parseLiteralAtNode(Z,X,J){return this.addExtra(J,"rawValue",Z),this.addExtra(J,"raw",this.input.slice(this.offsetToSourcePos(J.start),this.state.end)),J.value=Z,this.next(),this.finishNode(J,X)}parseLiteral(Z,X){let J=this.startNode();return this.parseLiteralAtNode(Z,X,J)}parseStringLiteral(Z){return this.parseLiteral(Z,"StringLiteral")}parseNumericLiteral(Z){return this.parseLiteral(Z,"NumericLiteral")}parseBigIntLiteral(Z){return this.parseLiteral(Z,"BigIntLiteral")}parseDecimalLiteral(Z){return this.parseLiteral(Z,"DecimalLiteral")}parseRegExpLiteral(Z){let X=this.startNode();return this.addExtra(X,"raw",this.input.slice(this.offsetToSourcePos(X.start),this.state.end)),X.pattern=Z.pattern,X.flags=Z.flags,this.next(),this.finishNode(X,"RegExpLiteral")}parseBooleanLiteral(Z){let X=this.startNode();return X.value=Z,this.next(),this.finishNode(X,"BooleanLiteral")}parseNullLiteral(){let Z=this.startNode();return this.next(),this.finishNode(Z,"NullLiteral")}parseParenAndDistinguishExpression(Z){let X=this.state.startLoc,J;this.next(),this.expressionScope.enter(B1());let Q=this.state.maybeInArrowParameters,V=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let Y=this.state.startLoc,W=[],j=new ZJ,U=!0,R,H;while(!this.match(11)){if(U)U=!1;else if(this.expect(12,j.optionalParametersLoc===null?null:j.optionalParametersLoc),this.match(11)){H=this.state.startLoc;break}if(this.match(21)){let F=this.state.startLoc;if(R=this.state.startLoc,W.push(this.parseParenItem(this.parseRestBinding(),F)),!this.checkCommaAfterRest(41))break}else W.push(this.parseMaybeAssignAllowInOrVoidPattern(11,j,this.parseParenItem))}let K=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=Q,this.state.inFSharpPipelineDirectBody=V;let G=this.startNodeAt(X);if(Z&&this.shouldParseArrow(W)&&(G=this.parseArrow(G)))return this.checkDestructuringPrivate(j),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(G,W,!1),G;if(this.expressionScope.exit(),!W.length)this.unexpected(this.state.lastTokStartLoc);if(H)this.unexpected(H);if(R)this.unexpected(R);if(this.checkExpressionErrors(j,!0),this.toReferencedListDeep(W,!0),W.length>1)J=this.startNodeAt(Y),J.expressions=W,this.finishNode(J,"SequenceExpression"),this.resetEndLocation(J,K);else J=W[0];return this.wrapParenthesis(X,J)}wrapParenthesis(Z,X){if(!(this.optionFlags&1024))return this.addExtra(X,"parenthesized",!0),this.addExtra(X,"parenStart",Z.index),this.takeSurroundingComments(X,Z.index,this.state.lastTokEndLoc.index),X;let J=this.startNodeAt(Z);return J.expression=X,this.finishNode(J,"ParenthesizedExpression")}shouldParseArrow(Z){return!this.canInsertSemicolon()}parseArrow(Z){if(this.eat(19))return Z}parseParenItem(Z,X){return Z}parseNewOrNewTarget(){let Z=this.startNode();if(this.next(),this.match(16)){let X=this.createIdentifier(this.startNodeAtNode(Z),"new");this.next();let J=this.parseMetaProperty(Z,X,"target");if(!this.scope.allowNewTarget)this.raise(q.UnexpectedNewTarget,J);return J}return this.parseNew(Z)}parseNew(Z){if(this.parseNewCallee(Z),this.eat(10)){let X=this.parseExprList(11);this.toReferencedList(X),Z.arguments=X}else Z.arguments=[];return this.finishNode(Z,"NewExpression")}parseNewCallee(Z){let X=this.match(83),J=this.parseNoCallExpr();if(Z.callee=J,X&&(J.type==="Import"||J.type==="ImportExpression"))this.raise(q.ImportCallNotNewExpression,J)}parseTemplateElement(Z){let{start:X,startLoc:J,end:Q,value:V}=this.state,Y=X+1,W=this.startNodeAt(_(J,1));if(V===null){if(!Z)this.raise(q.InvalidEscapeSequenceTemplate,_(this.state.firstInvalidTemplateEscapePos,1))}let j=this.match(24),U=j?-1:-2,R=Q+U;W.value={raw:this.input.slice(Y,R).replace(/\r\n?/g,`
|
|
9
9
|
`),cooked:V===null?null:V.slice(1,U)},W.tail=j,this.next();let H=this.finishNode(W,"TemplateElement");return this.resetEndLocation(H,_(this.state.lastTokEndLoc,U)),H}parseTemplate(Z){let X=this.startNode(),J=this.parseTemplateElement(Z),Q=[J],V=[];while(!J.tail)V.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),Q.push(J=this.parseTemplateElement(Z));return X.expressions=V,X.quasis=Q,this.finishNode(X,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(Z,X,J,Q){if(J)this.expectPlugin("recordAndTuple");let V=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let Y=!1,W=!0,j=this.startNode();j.properties=[],this.next();while(!this.match(Z)){if(W)W=!1;else if(this.expect(12),this.match(Z)){this.addTrailingCommaExtraToNode(j);break}let R;if(X)R=this.parseBindingProperty();else R=this.parsePropertyDefinition(Q),Y=this.checkProto(R,J,Y,Q);if(J&&!this.isObjectProperty(R)&&R.type!=="SpreadElement")this.raise(q.InvalidRecordProperty,R);if(R.shorthand)this.addExtra(R,"shorthand",!0);j.properties.push(R)}this.next(),this.state.inFSharpPipelineDirectBody=V;let U="ObjectExpression";if(X)U="ObjectPattern";else if(J)U="RecordExpression";return this.finishNode(j,U)}addTrailingCommaExtraToNode(Z){this.addExtra(Z,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(Z,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(Z){return!Z.computed&&Z.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(Z){let X=[];if(this.match(26)){if(this.hasPlugin("decorators"))this.raise(q.UnsupportedPropertyDecorator,this.state.startLoc);while(this.match(26))X.push(this.parseDecorator())}let J=this.startNode(),Q=!1,V=!1,Y;if(this.match(21)){if(X.length)this.unexpected();return this.parseSpread()}if(X.length)J.decorators=X,X=[];if(J.method=!1,Z)Y=this.state.startLoc;let W=this.eat(55);this.parsePropertyNamePrefixOperator(J);let j=this.state.containsEsc;if(this.parsePropertyName(J,Z),!W&&!j&&this.maybeAsyncOrAccessorProp(J)){let{key:U}=J,R=U.name;if(R==="async"&&!this.hasPrecedingLineBreak())Q=!0,this.resetPreviousNodeTrailingComments(U),W=this.eat(55),this.parsePropertyName(J);if(R==="get"||R==="set"){if(V=!0,this.resetPreviousNodeTrailingComments(U),J.kind=R,this.match(55))W=!0,this.raise(q.AccessorIsGenerator,this.state.curPosition(),{kind:R}),this.next();this.parsePropertyName(J)}}return this.parseObjPropValue(J,Y,W,Q,!1,V,Z)}getGetterSetterExpectedParamCount(Z){return Z.kind==="get"?0:1}getObjectOrClassMethodParams(Z){return Z.params}checkGetterSetterParams(Z){var X;let J=this.getGetterSetterExpectedParamCount(Z),Q=this.getObjectOrClassMethodParams(Z);if(Q.length!==J)this.raise(Z.kind==="get"?q.BadGetterArity:q.BadSetterArity,Z);if(Z.kind==="set"&&((X=Q[Q.length-1])==null?void 0:X.type)==="RestElement")this.raise(q.BadSetterRestParameter,Z)}parseObjectMethod(Z,X,J,Q,V){if(V){let Y=this.parseMethod(Z,X,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(Y),Y}if(J||X||this.match(10)){if(Q)this.unexpected();return Z.kind="method",Z.method=!0,this.parseMethod(Z,X,J,!1,!1,"ObjectMethod")}}parseObjectProperty(Z,X,J,Q){if(Z.shorthand=!1,this.eat(14))return Z.value=J?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,Q),this.finishObjectProperty(Z);if(!Z.computed&&Z.key.type==="Identifier"){if(this.checkReservedWord(Z.key.name,Z.key.loc.start,!0,!1),J)Z.value=this.parseMaybeDefault(X,this.cloneIdentifier(Z.key));else if(this.match(29)){let V=this.state.startLoc;if(Q!=null){if(Q.shorthandAssignLoc===null)Q.shorthandAssignLoc=V}else this.raise(q.InvalidCoverInitializedName,V);Z.value=this.parseMaybeDefault(X,this.cloneIdentifier(Z.key))}else Z.value=this.cloneIdentifier(Z.key);return Z.shorthand=!0,this.finishObjectProperty(Z)}}finishObjectProperty(Z){return this.finishNode(Z,"ObjectProperty")}parseObjPropValue(Z,X,J,Q,V,Y,W){let j=this.parseObjectMethod(Z,J,Q,V,Y)||this.parseObjectProperty(Z,X,V,W);if(!j)this.unexpected();return j}parsePropertyName(Z,X){if(this.eat(0))Z.computed=!0,Z.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:J,value:Q}=this.state,V;if(k(J))V=this.parseIdentifier(!0);else switch(J){case 135:V=this.parseNumericLiteral(Q);break;case 134:V=this.parseStringLiteral(Q);break;case 136:V=this.parseBigIntLiteral(Q);break;case 139:{let Y=this.state.startLoc;if(X!=null){if(X.privateKeyLoc===null)X.privateKeyLoc=Y}else this.raise(q.UnexpectedPrivateField,Y);V=this.parsePrivateName();break}default:if(J===137){V=this.parseDecimalLiteral(Q);break}this.unexpected()}if(Z.key=V,J!==139)Z.computed=!1}}initFunction(Z,X){Z.id=null,Z.generator=!1,Z.async=X}parseMethod(Z,X,J,Q,V,Y,W=!1){this.initFunction(Z,J),Z.generator=X,this.scope.enter(530|(W?576:0)|(V?32:0)),this.prodParam.enter(HJ(J,Z.generator)),this.parseFunctionParams(Z,Q);let j=this.parseFunctionBodyAndFinish(Z,Y,!0);return this.prodParam.exit(),this.scope.exit(),j}parseArrayLike(Z,X,J){if(X)this.expectPlugin("recordAndTuple");let Q=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let V=this.startNode();return this.next(),V.elements=this.parseExprList(Z,!X,J,V),this.state.inFSharpPipelineDirectBody=Q,this.finishNode(V,X?"TupleExpression":"ArrayExpression")}parseArrowExpression(Z,X,J,Q){this.scope.enter(518);let V=HJ(J,!1);if(!this.match(5)&&this.prodParam.hasIn)V|=8;this.prodParam.enter(V),this.initFunction(Z,J);let Y=this.state.maybeInArrowParameters;if(X)this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(Z,X,Q);return this.state.maybeInArrowParameters=!1,this.parseFunctionBody(Z,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=Y,this.finishNode(Z,"ArrowFunctionExpression")}setArrowFunctionParameters(Z,X,J){this.toAssignableList(X,J,!1),Z.params=X}parseFunctionBodyAndFinish(Z,X,J=!1){return this.parseFunctionBody(Z,!1,J),this.finishNode(Z,X)}parseFunctionBody(Z,X,J=!1){let Q=X&&!this.match(5);if(this.expressionScope.enter(eZ()),Q)Z.body=this.parseMaybeAssign(),this.checkParams(Z,!1,X,!1);else{let V=this.state.strict,Y=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),Z.body=this.parseBlock(!0,!1,(W)=>{let j=!this.isSimpleParamList(Z.params);if(W&&j)this.raise(q.IllegalLanguageModeDirective,(Z.kind==="method"||Z.kind==="constructor")&&!!Z.key?Z.key.loc.end:Z);let U=!V&&this.state.strict;if(this.checkParams(Z,!this.state.strict&&!X&&!J&&!j,X,U),this.state.strict&&Z.id)this.checkIdentifier(Z.id,65,U)}),this.prodParam.exit(),this.state.labels=Y}this.expressionScope.exit()}isSimpleParameter(Z){return Z.type==="Identifier"}isSimpleParamList(Z){for(let X=0,J=Z.length;X<J;X++)if(!this.isSimpleParameter(Z[X]))return!1;return!0}checkParams(Z,X,J,Q=!0){let V=!X&&new Set,Y={type:"FormalParameters"};for(let W of Z.params)this.checkLVal(W,Y,5,V,Q)}parseExprList(Z,X,J,Q){let V=[],Y=!0;while(!this.eat(Z)){if(Y)Y=!1;else if(this.expect(12),this.match(Z)){if(Q)this.addTrailingCommaExtraToNode(Q);this.next();break}V.push(this.parseExprListItem(Z,X,J))}return V}parseExprListItem(Z,X,J,Q){let V;if(this.match(12)){if(!X)this.raise(q.UnexpectedToken,this.state.curPosition(),{unexpected:","});V=null}else if(this.match(21)){let Y=this.state.startLoc;V=this.parseParenItem(this.parseSpread(J),Y)}else if(this.match(17)){if(this.expectPlugin("partialApplication"),!Q)this.raise(q.UnexpectedArgumentPlaceholder,this.state.startLoc);let Y=this.startNode();this.next(),V=this.finishNode(Y,"ArgumentPlaceholder")}else V=this.parseMaybeAssignAllowInOrVoidPattern(Z,J,this.parseParenItem);return V}parseIdentifier(Z){let X=this.startNode(),J=this.parseIdentifierName(Z);return this.createIdentifier(X,J)}createIdentifier(Z,X){return Z.name=X,Z.loc.identifierName=X,this.finishNode(Z,"Identifier")}createIdentifierAt(Z,X,J){return Z.name=X,Z.loc.identifierName=X,this.finishNodeAt(Z,"Identifier",J)}parseIdentifierName(Z){let X,{startLoc:J,type:Q}=this.state;if(k(Q))X=this.state.value;else this.unexpected();let V=b0(Q);if(Z){if(V)this.replaceToken(132)}else this.checkReservedWord(X,J,V,!1);return this.next(),X}checkReservedWord(Z,X,J,Q){if(Z.length>10)return;if(!J1(Z))return;if(J&&r0(Z)){this.raise(q.UnexpectedKeyword,X,{keyword:Z});return}if((!this.state.strict?bZ:Q?fZ:uZ)(Z,this.inModule)){this.raise(q.UnexpectedReservedWord,X,{reservedWord:Z});return}else if(Z==="yield"){if(this.prodParam.hasYield){this.raise(q.YieldBindingIdentifier,X);return}}else if(Z==="await"){if(this.prodParam.hasAwait){this.raise(q.AwaitBindingIdentifier,X);return}if(this.scope.inStaticBlock){this.raise(q.AwaitBindingIdentifierInStaticBlock,X);return}this.expressionScope.recordAsyncArrowParametersError(X)}else if(Z==="arguments"){if(this.scope.inClassAndNotInNonArrowFunction){this.raise(q.ArgumentsInClass,X);return}}}recordAwaitIfAllowed(){let Z=this.prodParam.hasAwait;if(Z&&!this.scope.inFunction)this.state.hasTopLevelAwait=!0;return Z}parseAwait(Z){let X=this.startNodeAt(Z);if(this.expressionScope.recordParameterInitializerError(q.AwaitExpressionFormalParameter,X),this.eat(55))this.raise(q.ObsoleteAwaitStar,X);if(!this.scope.inFunction&&!(this.optionFlags&1))if(this.isAmbiguousPrefixOrIdentifier())this.ambiguousScriptDifferentAst=!0;else this.sawUnambiguousESM=!0;if(!this.state.soloAwait)X.argument=this.parseMaybeUnary(null,!0);return this.finishNode(X,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:Z}=this.state;return Z===53||Z===10||Z===0||KJ(Z)||Z===102&&!this.state.containsEsc||Z===138||Z===56||this.hasPlugin("v8intrinsic")&&Z===54}parseYield(Z){let X=this.startNodeAt(Z);this.expressionScope.recordParameterInitializerError(q.YieldInParameter,X);let J=!1,Q=null;if(!this.hasPrecedingLineBreak())switch(J=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!J)break;default:Q=this.parseMaybeAssign()}return X.delegate=J,X.argument=Q,this.finishNode(X,"YieldExpression")}parseImportCall(Z){if(this.next(),Z.source=this.parseMaybeAssignAllowIn(),Z.options=null,this.eat(12))if(!this.match(11)){if(Z.options=this.parseMaybeAssignAllowIn(),this.eat(12)){if(this.addTrailingCommaExtraToNode(Z.options),!this.match(11)){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(q.ImportCallArity,Z)}}}else this.addTrailingCommaExtraToNode(Z.source);return this.expect(11),this.finishNode(Z,"ImportExpression")}checkPipelineAtInfixOperator(Z,X){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){if(Z.type==="SequenceExpression")this.raise(q.PipelineHeadSequenceExpression,X)}}parseSmartPipelineBodyInStyle(Z,X){if(this.isSimpleReference(Z)){let J=this.startNodeAt(X);return J.callee=Z,this.finishNode(J,"PipelineBareFunction")}else{let J=this.startNodeAt(X);return this.checkSmartPipeTopicBodyEarlyErrors(X),J.expression=Z,this.finishNode(J,"PipelineTopicExpression")}}isSimpleReference(Z){switch(Z.type){case"MemberExpression":return!Z.computed&&this.isSimpleReference(Z.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(Z){if(this.match(19))throw this.raise(q.PipelineBodyNoArrow,this.state.startLoc);if(!this.topicReferenceWasUsedInCurrentContext())this.raise(q.PipelineTopicUnused,Z)}withTopicBindingContext(Z){let X=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return Z()}finally{this.state.topicContext=X}}withSmartMixTopicForbiddingContext(Z){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let X=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return Z()}finally{this.state.topicContext=X}}else return Z()}withSoloAwaitPermittingContext(Z){let X=this.state.soloAwait;this.state.soloAwait=!0;try{return Z()}finally{this.state.soloAwait=X}}allowInAnd(Z){let X=this.prodParam.currentFlags();if(8&~X){this.prodParam.enter(X|8);try{return Z()}finally{this.prodParam.exit()}}return Z()}disallowInAnd(Z){let X=this.prodParam.currentFlags();if(8&X){this.prodParam.enter(X&-9);try{return Z()}finally{this.prodParam.exit()}}return Z()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(Z){let X=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let J=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let Q=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),X,Z);return this.state.inFSharpPipelineDirectBody=J,Q}parseModuleExpression(){this.expectPlugin("moduleBlocks");let Z=this.startNode();if(this.next(),!this.match(5))this.unexpected(null,5);let X=this.startNodeAt(this.state.endLoc);this.next();let J=this.initializeScopes(!0);this.enterInitialScopes();try{Z.body=this.parseProgram(X,8,"module")}finally{J()}return this.finishNode(Z,"ModuleExpression")}parseVoidPattern(Z){this.expectPlugin("discardBinding");let X=this.startNode();if(Z!=null)Z.voidPatternLoc=this.state.startLoc;return this.next(),this.finishNode(X,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(Z,X,J){if(X!=null&&this.match(88)){let Q=this.lookaheadCharCode();if(Q===44||Q===(Z===3?93:Z===8?125:41)||Q===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(X))}return this.parseMaybeAssignAllowIn(X,J)}parsePropertyNamePrefixOperator(Z){}}var NJ={kind:1},_1={kind:2},k1=/[\uD800-\uDFFF]/u,TJ=/in(?:stanceof)?/y;function L1(Z,X,J){for(let Q=0;Q<Z.length;Q++){let V=Z[Q],{type:Y}=V;if(typeof Y==="number"){if(Y===139){let{loc:W,start:j,value:U,end:R}=V,H=j+1,K=_(W.start,1);Z.splice(Q,1,new u({type:b(27),value:"#",start:j,end:H,startLoc:W.start,endLoc:K}),new u({type:b(132),value:U,start:H,end:R,startLoc:K,endLoc:W.end})),Q++;continue}if(KJ(Y)){let{loc:W,start:j,value:U,end:R}=V,H=j+1,K=_(W.start,1),G;if(X.charCodeAt(j-J)===96)G=new u({type:b(22),value:"`",start:j,end:H,startLoc:W.start,endLoc:K});else G=new u({type:b(8),value:"}",start:j,end:H,startLoc:W.start,endLoc:K});let F,v,M,N;if(Y===24)v=R-1,M=_(W.end,-1),F=U===null?null:U.slice(1,-1),N=new u({type:b(22),value:"`",start:v,end:R,startLoc:M,endLoc:W.end});else v=R-2,M=_(W.end,-2),F=U===null?null:U.slice(1,-2),N=new u({type:b(23),value:"${",start:v,end:R,startLoc:M,endLoc:W.end});Z.splice(Q,1,G,new u({type:b(20),value:F,start:H,end:v,startLoc:K,endLoc:M}),N),Q+=2;continue}V.type=b(Y)}}return Z}class j0 extends W0{parseTopLevel(Z,X){if(Z.program=this.parseProgram(X,140,this.options.sourceType==="module"?"module":"script"),Z.comments=this.comments,this.optionFlags&256)Z.tokens=L1(this.tokens,this.input,this.startIndex);return this.finishNode(Z,"File")}parseProgram(Z,X,J){if(Z.sourceType=J,Z.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(Z,!0,!0,X),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[V,Y]of Array.from(this.scope.undefinedExports))this.raise(q.ModuleExportUndefined,Y,{localName:V});this.addExtra(Z,"topLevelAwait",this.state.hasTopLevelAwait)}let Q;if(X===140)Q=this.finishNode(Z,"Program");else Q=this.finishNodeAt(Z,"Program",_(this.state.startLoc,-1));return Q}stmtToDirective(Z){let X=this.castNodeTo(Z,"Directive"),J=this.castNodeTo(Z.expression,"DirectiveLiteral"),Q=J.value,V=this.input.slice(this.offsetToSourcePos(J.start),this.offsetToSourcePos(J.end)),Y=J.value=V.slice(1,-1);return this.addExtra(J,"raw",V),this.addExtra(J,"rawValue",Y),this.addExtra(J,"expressionValue",Q),X.value=J,delete Z.expression,X}parseInterpreterDirective(){if(!this.match(28))return null;let Z=this.startNode();return Z.value=this.state.value,this.next(),this.finishNode(Z,"InterpreterDirective")}isLet(){if(!this.isContextual(100))return!1;return this.hasFollowingBindingAtom()}isUsing(){if(!this.isContextual(107))return!1;return this.nextTokenIsIdentifierOnSameLine()}isForUsing(){if(!this.isContextual(107))return!1;let Z=this.nextTokenInLineStart(),X=this.codePointAtPos(Z);if(this.isUnparsedContextual(Z,"of")){let J=this.lookaheadCharCodeSince(Z+2);if(J!==61&&J!==58&&J!==59)return!1}if(this.chStartsBindingIdentifier(X,Z)||this.isUnparsedContextual(Z,"void"))return!0;return!1}nextTokenIsIdentifierOnSameLine(){let Z=this.nextTokenInLineStart(),X=this.codePointAtPos(Z);return this.chStartsBindingIdentifier(X,Z)}isAwaitUsing(){if(!this.isContextual(96))return!1;let Z=this.nextTokenInLineStart();if(this.isUnparsedContextual(Z,"using")){Z=this.nextTokenInLineStartSince(Z+5);let X=this.codePointAtPos(Z);if(this.chStartsBindingIdentifier(X,Z))return!0}return!1}chStartsBindingIdentifier(Z,X){if(h(Z)){if(TJ.lastIndex=X,TJ.test(this.input)){let J=this.codePointAtPos(TJ.lastIndex);if(!i(J)&&J!==92)return!1}return!0}else if(Z===92)return!0;else return!1}chStartsBindingPattern(Z){return Z===91||Z===123}hasFollowingBindingAtom(){let Z=this.nextTokenStart(),X=this.codePointAtPos(Z);return this.chStartsBindingPattern(X)||this.chStartsBindingIdentifier(X,Z)}hasInLineFollowingBindingIdentifierOrBrace(){let Z=this.nextTokenInLineStart(),X=this.codePointAtPos(Z);return X===123||this.chStartsBindingIdentifier(X,Z)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(Z=!1){let X=0;if(this.options.annexB&&!this.state.strict){if(X|=4,Z)X|=8}return this.parseStatementLike(X)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(Z){let X=null;if(this.match(26))X=this.parseDecorators(!0);return this.parseStatementContent(Z,X)}parseStatementContent(Z,X){let J=this.state.type,Q=this.startNode(),V=!!(Z&2),Y=!!(Z&4),W=Z&1;switch(J){case 60:return this.parseBreakContinueStatement(Q,!0);case 63:return this.parseBreakContinueStatement(Q,!1);case 64:return this.parseDebuggerStatement(Q);case 90:return this.parseDoWhileStatement(Q);case 91:return this.parseForStatement(Q);case 68:if(this.lookaheadCharCode()===46)break;if(!Y)this.raise(this.state.strict?q.StrictFunction:this.options.annexB?q.SloppyFunctionAnnexB:q.SloppyFunction,this.state.startLoc);return this.parseFunctionStatement(Q,!1,!V&&Y);case 80:if(!V)this.unexpected();return this.parseClass(this.maybeTakeDecorators(X,Q),!0);case 69:return this.parseIfStatement(Q);case 70:return this.parseReturnStatement(Q);case 71:return this.parseSwitchStatement(Q);case 72:return this.parseThrowStatement(Q);case 73:return this.parseTryStatement(Q);case 96:if(this.isAwaitUsing()){if(!this.allowsUsing())this.raise(q.UnexpectedUsingDeclaration,Q);else if(!V)this.raise(q.UnexpectedLexicalDeclaration,Q);else if(!this.recordAwaitIfAllowed())this.raise(q.AwaitUsingNotInAsyncContext,Q);return this.next(),this.parseVarStatement(Q,"await using")}break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;if(!this.allowsUsing())this.raise(q.UnexpectedUsingDeclaration,this.state.startLoc);else if(!V)this.raise(q.UnexpectedLexicalDeclaration,this.state.startLoc);return this.parseVarStatement(Q,"using");case 100:{if(this.state.containsEsc)break;let R=this.nextTokenStart(),H=this.codePointAtPos(R);if(H!==91){if(!V&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(H,R)&&H!==123)break}}case 75:if(!V)this.raise(q.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let R=this.state.value;return this.parseVarStatement(Q,R)}case 92:return this.parseWhileStatement(Q);case 76:return this.parseWithStatement(Q);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(Q);case 83:{let R=this.lookaheadCharCode();if(R===40||R===46)break}case 82:{if(!(this.optionFlags&8)&&!W)this.raise(q.UnexpectedImportExport,this.state.startLoc);this.next();let R;if(J===83)R=this.parseImport(Q);else R=this.parseExport(Q,X);return this.assertModuleNodeAllowed(R),R}default:if(this.isAsyncFunction()){if(!V)this.raise(q.AsyncFunctionInSingleStatementContext,this.state.startLoc);return this.next(),this.parseFunctionStatement(Q,!0,!V&&Y)}}let j=this.state.value,U=this.parseExpression();if(S(J)&&U.type==="Identifier"&&this.eat(14))return this.parseLabeledStatement(Q,j,U,Z);else return this.parseExpressionStatement(Q,U,X)}assertModuleNodeAllowed(Z){if(!(this.optionFlags&8)&&!this.inModule)this.raise(q.ImportOutsideModule,Z)}decoratorsEnabledBeforeExport(){if(this.hasPlugin("decorators-legacy"))return!0;return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(Z,X,J){if(Z){var Q;if((Q=X.decorators)!=null&&Q.length){if(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!=="boolean")this.raise(q.DecoratorsBeforeAfterExport,X.decorators[0]);X.decorators.unshift(...Z)}else X.decorators=Z;if(this.resetStartLocationFromNode(X,Z[0]),J)this.resetStartLocationFromNode(J,X)}return X}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(Z){let X=[];do X.push(this.parseDecorator());while(this.match(26));if(this.match(82)){if(!Z)this.unexpected();if(!this.decoratorsEnabledBeforeExport())this.raise(q.DecoratorExportClass,this.state.startLoc)}else if(!this.canHaveLeadingDecorator())throw this.raise(q.UnexpectedLeadingDecorator,this.state.startLoc);return X}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let Z=this.startNode();if(this.next(),this.hasPlugin("decorators")){let X=this.state.startLoc,J;if(this.match(10)){let Q=this.state.startLoc;this.next(),J=this.parseExpression(),this.expect(11),J=this.wrapParenthesis(Q,J);let V=this.state.startLoc;if(Z.expression=this.parseMaybeDecoratorArguments(J,Q),this.getPluginOption("decorators","allowCallParenthesized")===!1&&Z.expression!==J)this.raise(q.DecoratorArgumentsOutsideParentheses,V)}else{J=this.parseIdentifier(!1);while(this.eat(16)){let Q=this.startNodeAt(X);if(Q.object=J,this.match(139))this.classScope.usePrivateName(this.state.value,this.state.startLoc),Q.property=this.parsePrivateName();else Q.property=this.parseIdentifier(!0);Q.computed=!1,J=this.finishNode(Q,"MemberExpression")}Z.expression=this.parseMaybeDecoratorArguments(J,X)}}else Z.expression=this.parseExprSubscripts();return this.finishNode(Z,"Decorator")}parseMaybeDecoratorArguments(Z,X){if(this.eat(10)){let J=this.startNodeAt(X);return J.callee=Z,J.arguments=this.parseCallExpressionArguments(),this.toReferencedList(J.arguments),this.finishNode(J,"CallExpression")}return Z}parseBreakContinueStatement(Z,X){if(this.next(),this.isLineTerminator())Z.label=null;else Z.label=this.parseIdentifier(),this.semicolon();return this.verifyBreakContinue(Z,X),this.finishNode(Z,X?"BreakStatement":"ContinueStatement")}verifyBreakContinue(Z,X){let J;for(J=0;J<this.state.labels.length;++J){let Q=this.state.labels[J];if(Z.label==null||Q.name===Z.label.name){if(Q.kind!=null&&(X||Q.kind===1))break;if(Z.label&&X)break}}if(J===this.state.labels.length){let Q=X?"BreakStatement":"ContinueStatement";this.raise(q.IllegalBreakContinue,Z,{type:Q})}}parseDebuggerStatement(Z){return this.next(),this.semicolon(),this.finishNode(Z,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let Z=this.parseExpression();return this.expect(11),Z}parseDoWhileStatement(Z){return this.next(),this.state.labels.push(NJ),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),Z.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(Z,"DoWhileStatement")}parseForStatement(Z){this.next(),this.state.labels.push(NJ);let X=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed())X=this.state.startLoc,this.next();if(this.scope.enter(0),this.expect(10),this.match(13)){if(X!==null)this.unexpected(X);return this.parseFor(Z,null)}let J=this.isContextual(100);{let j=this.isAwaitUsing(),U=j||this.isForUsing(),R=J&&this.hasFollowingBindingAtom()||U;if(this.match(74)||this.match(75)||R){let H=this.startNode(),K;if(j){if(K="await using",!this.recordAwaitIfAllowed())this.raise(q.AwaitUsingNotInAsyncContext,this.state.startLoc);this.next()}else K=this.state.value;this.next(),this.parseVar(H,!0,K);let G=this.finishNode(H,"VariableDeclaration"),F=this.match(58);if(F&&U)this.raise(q.ForInUsing,G);if((F||this.isContextual(102))&&G.declarations.length===1)return this.parseForIn(Z,G,X);if(X!==null)this.unexpected(X);return this.parseFor(Z,G)}}let Q=this.isContextual(95),V=new ZJ,Y=this.parseExpression(!0,V),W=this.isContextual(102);if(W){if(J)this.raise(q.ForOfLet,Y);if(X===null&&Q&&Y.type==="Identifier")this.raise(q.ForOfAsync,Y)}if(W||this.match(58)){this.checkDestructuringPrivate(V),this.toAssignable(Y,!0);let j=W?"ForOfStatement":"ForInStatement";return this.checkLVal(Y,{type:j}),this.parseForIn(Z,Y,X)}else this.checkExpressionErrors(V,!0);if(X!==null)this.unexpected(X);return this.parseFor(Z,Y)}parseFunctionStatement(Z,X,J){return this.next(),this.parseFunction(Z,1|(J?2:0)|(X?8:0))}parseIfStatement(Z){return this.next(),Z.test=this.parseHeaderExpression(),Z.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),Z.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(Z,"IfStatement")}parseReturnStatement(Z){if(!this.prodParam.hasReturn)this.raise(q.IllegalReturn,this.state.startLoc);if(this.next(),this.isLineTerminator())Z.argument=null;else Z.argument=this.parseExpression(),this.semicolon();return this.finishNode(Z,"ReturnStatement")}parseSwitchStatement(Z){this.next(),Z.discriminant=this.parseHeaderExpression();let X=Z.cases=[];this.expect(5),this.state.labels.push(_1),this.scope.enter(256);let J;for(let Q;!this.match(8);)if(this.match(61)||this.match(65)){let V=this.match(61);if(J)this.finishNode(J,"SwitchCase");if(X.push(J=this.startNode()),J.consequent=[],this.next(),V)J.test=this.parseExpression();else{if(Q)this.raise(q.MultipleDefaultsInSwitch,this.state.lastTokStartLoc);Q=!0,J.test=null}this.expect(14)}else if(J)J.consequent.push(this.parseStatementListItem());else this.unexpected();if(this.scope.exit(),J)this.finishNode(J,"SwitchCase");return this.next(),this.state.labels.pop(),this.finishNode(Z,"SwitchStatement")}parseThrowStatement(Z){if(this.next(),this.hasPrecedingLineBreak())this.raise(q.NewlineAfterThrow,this.state.lastTokEndLoc);return Z.argument=this.parseExpression(),this.semicolon(),this.finishNode(Z,"ThrowStatement")}parseCatchClauseParam(){let Z=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&Z.type==="Identifier"?8:0),this.checkLVal(Z,{type:"CatchClause"},9),Z}parseTryStatement(Z){if(this.next(),Z.block=this.parseBlock(),Z.handler=null,this.match(62)){let X=this.startNode();if(this.next(),this.match(10))this.expect(10),X.param=this.parseCatchClauseParam(),this.expect(11);else X.param=null,this.scope.enter(0);X.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),Z.handler=this.finishNode(X,"CatchClause")}if(Z.finalizer=this.eat(67)?this.parseBlock():null,!Z.handler&&!Z.finalizer)this.raise(q.NoCatchOrFinally,Z);return this.finishNode(Z,"TryStatement")}parseVarStatement(Z,X,J=!1){return this.next(),this.parseVar(Z,!1,X,J),this.semicolon(),this.finishNode(Z,"VariableDeclaration")}parseWhileStatement(Z){return this.next(),Z.test=this.parseHeaderExpression(),this.state.labels.push(NJ),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(Z,"WhileStatement")}parseWithStatement(Z){if(this.state.strict)this.raise(q.StrictWith,this.state.startLoc);return this.next(),Z.object=this.parseHeaderExpression(),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(Z,"WithStatement")}parseEmptyStatement(Z){return this.next(),this.finishNode(Z,"EmptyStatement")}parseLabeledStatement(Z,X,J,Q){for(let Y of this.state.labels)if(Y.name===X)this.raise(q.LabelRedeclaration,J,{labelName:X});let V=f0(this.state.type)?1:this.match(71)?2:null;for(let Y=this.state.labels.length-1;Y>=0;Y--){let W=this.state.labels[Y];if(W.statementStart===Z.start)W.statementStart=this.sourceToOffsetPos(this.state.start),W.kind=V;else break}return this.state.labels.push({name:X,kind:V,statementStart:this.sourceToOffsetPos(this.state.start)}),Z.body=Q&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),Z.label=J,this.finishNode(Z,"LabeledStatement")}parseExpressionStatement(Z,X,J){return Z.expression=X,this.semicolon(),this.finishNode(Z,"ExpressionStatement")}parseBlock(Z=!1,X=!0,J){let Q=this.startNode();if(Z)this.state.strictErrors.clear();if(this.expect(5),X)this.scope.enter(0);if(this.parseBlockBody(Q,Z,!1,8,J),X)this.scope.exit();return this.finishNode(Q,"BlockStatement")}isValidDirective(Z){return Z.type==="ExpressionStatement"&&Z.expression.type==="StringLiteral"&&!Z.expression.extra.parenthesized}parseBlockBody(Z,X,J,Q,V){let Y=Z.body=[],W=Z.directives=[];this.parseBlockOrModuleBlockBody(Y,X?W:void 0,J,Q,V)}parseBlockOrModuleBlockBody(Z,X,J,Q,V){let Y=this.state.strict,W=!1,j=!1;while(!this.match(Q)){let U=J?this.parseModuleItem():this.parseStatementListItem();if(X&&!j){if(this.isValidDirective(U)){let R=this.stmtToDirective(U);if(X.push(R),!W&&R.value.value==="use strict")W=!0,this.setStrict(!0);continue}j=!0,this.state.strictErrors.clear()}Z.push(U)}if(V==null||V.call(this,W),!Y)this.setStrict(!1);this.next()}parseFor(Z,X){return Z.init=X,this.semicolon(!1),Z.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),Z.update=this.match(11)?null:this.parseExpression(),this.expect(11),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(Z,"ForStatement")}parseForIn(Z,X,J){let Q=this.match(58);if(this.next(),Q){if(J!==null)this.unexpected(J)}else Z.await=J!==null;if(X.type==="VariableDeclaration"&&X.declarations[0].init!=null&&(!Q||!this.options.annexB||this.state.strict||X.kind!=="var"||X.declarations[0].id.type!=="Identifier"))this.raise(q.ForInOfLoopInitializer,X,{type:Q?"ForInStatement":"ForOfStatement"});if(X.type==="AssignmentPattern")this.raise(q.InvalidLhs,X,{ancestor:{type:"ForStatement"}});return Z.left=X,Z.right=Q?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(Z,Q?"ForInStatement":"ForOfStatement")}parseVar(Z,X,J,Q=!1){let V=Z.declarations=[];Z.kind=J;for(;;){let Y=this.startNode();if(this.parseVarId(Y,J),Y.init=!this.eat(29)?null:X?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn(),Y.init===null&&!Q){if(Y.id.type!=="Identifier"&&!(X&&(this.match(58)||this.isContextual(102))))this.raise(q.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"});else if((J==="const"||J==="using"||J==="await using")&&!(this.match(58)||this.isContextual(102)))this.raise(q.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:J})}if(V.push(this.finishNode(Y,"VariableDeclarator")),!this.eat(12))break}return Z}parseVarId(Z,X){let J=this.parseBindingAtom();if(X==="using"||X==="await using"){if(J.type==="ArrayPattern"||J.type==="ObjectPattern")this.raise(q.UsingDeclarationHasBindingPattern,J.loc.start)}else if(J.type==="VoidPattern")this.raise(q.UnexpectedVoidPattern,J.loc.start);this.checkLVal(J,{type:"VariableDeclarator"},X==="var"?5:8201),Z.id=J}parseAsyncFunctionExpression(Z){return this.parseFunction(Z,8)}parseFunction(Z,X=0){let J=X&2,Q=!!(X&1),V=Q&&!(X&4),Y=!!(X&8);if(this.initFunction(Z,Y),this.match(55)){if(J)this.raise(q.GeneratorInSingleStatementContext,this.state.startLoc);this.next(),Z.generator=!0}if(Q)Z.id=this.parseFunctionId(V);let W=this.state.maybeInArrowParameters;if(this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(HJ(Y,Z.generator)),!Q)Z.id=this.parseFunctionId();if(this.parseFunctionParams(Z,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(Z,Q?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),Q&&!J)this.registerFunctionStatementId(Z);return this.state.maybeInArrowParameters=W,Z}parseFunctionId(Z){return Z||S(this.state.type)?this.parseIdentifier():null}parseFunctionParams(Z,X){this.expect(10),this.expressionScope.enter(O1()),Z.params=this.parseBindingList(11,41,2|(X?4:0)),this.expressionScope.exit()}registerFunctionStatementId(Z){if(!Z.id)return;this.scope.declareName(Z.id.name,!this.options.annexB||this.state.strict||Z.generator||Z.async?this.scope.treatFunctionsAsVar?5:8201:17,Z.id.loc.start)}parseClass(Z,X,J){this.next();let Q=this.state.strict;return this.state.strict=!0,this.parseClassId(Z,X,J),this.parseClassSuper(Z),Z.body=this.parseClassBody(!!Z.superClass,Q),this.finishNode(Z,X?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(Z){return Z.type==="Identifier"&&Z.name==="constructor"||Z.type==="StringLiteral"&&Z.value==="constructor"}isNonstaticConstructor(Z){return!Z.computed&&!Z.static&&this.nameIsConstructor(Z.key)}parseClassBody(Z,X){this.classScope.enter();let J={hadConstructor:!1,hadSuperClass:Z},Q=[],V=this.startNode();if(V.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{while(!this.match(8)){if(this.eat(13)){if(Q.length>0)throw this.raise(q.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){Q.push(this.parseDecorator());continue}let Y=this.startNode();if(Q.length)Y.decorators=Q,this.resetStartLocationFromNode(Y,Q[0]),Q=[];if(this.parseClassMember(V,Y,J),Y.kind==="constructor"&&Y.decorators&&Y.decorators.length>0)this.raise(q.DecoratorConstructor,Y)}}),this.state.strict=X,this.next(),Q.length)throw this.raise(q.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(V,"ClassBody")}parseClassMemberFromModifier(Z,X){let J=this.parseIdentifier(!0);if(this.isClassMethod()){let Q=X;return Q.kind="method",Q.computed=!1,Q.key=J,Q.static=!1,this.pushClassMethod(Z,Q,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let Q=X;return Q.computed=!1,Q.key=J,Q.static=!1,Z.body.push(this.parseClassProperty(Q)),!0}return this.resetPreviousNodeTrailingComments(J),!1}parseClassMember(Z,X,J){let Q=this.isContextual(106);if(Q){if(this.parseClassMemberFromModifier(Z,X))return;if(this.eat(5)){this.parseClassStaticBlock(Z,X);return}}this.parseClassMemberWithIsStatic(Z,X,J,Q)}parseClassMemberWithIsStatic(Z,X,J,Q){let V=X,Y=X,W=X,j=X,U=X,R=V,H=V;if(X.static=Q,this.parsePropertyNamePrefixOperator(X),this.eat(55)){R.kind="method";let N=this.match(139);if(this.parseClassElementName(R),this.parsePostMemberNameModifiers(R),N){this.pushClassPrivateMethod(Z,Y,!0,!1);return}if(this.isNonstaticConstructor(V))this.raise(q.ConstructorIsGenerator,V.key);this.pushClassMethod(Z,V,!0,!1,!1,!1);return}let K=!this.state.containsEsc&&S(this.state.type),G=this.parseClassElementName(X),F=K?G.name:null,v=this.isPrivateName(G),M=this.state.startLoc;if(this.parsePostMemberNameModifiers(H),this.isClassMethod()){if(R.kind="method",v){this.pushClassPrivateMethod(Z,Y,!1,!1);return}let N=this.isNonstaticConstructor(V),A=!1;if(N){if(V.kind="constructor",J.hadConstructor&&!this.hasPlugin("typescript"))this.raise(q.DuplicateConstructor,G);if(N&&this.hasPlugin("typescript")&&X.override)this.raise(q.OverrideOnConstructor,G);J.hadConstructor=!0,A=J.hadSuperClass}this.pushClassMethod(Z,V,!1,!1,N,A)}else if(this.isClassProperty())if(v)this.pushClassPrivateProperty(Z,j);else this.pushClassProperty(Z,W);else if(F==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(G);let N=this.eat(55);if(H.optional)this.unexpected(M);R.kind="method";let A=this.match(139);if(this.parseClassElementName(R),this.parsePostMemberNameModifiers(H),A)this.pushClassPrivateMethod(Z,Y,N,!0);else{if(this.isNonstaticConstructor(V))this.raise(q.ConstructorIsAsync,V.key);this.pushClassMethod(Z,V,N,!0,!1,!1)}}else if((F==="get"||F==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(G),R.kind=F;let N=this.match(139);if(this.parseClassElementName(V),N)this.pushClassPrivateMethod(Z,Y,!1,!1);else{if(this.isNonstaticConstructor(V))this.raise(q.ConstructorIsAccessor,V.key);this.pushClassMethod(Z,V,!1,!1,!1,!1)}this.checkGetterSetterParams(V)}else if(F==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(G);let N=this.match(139);this.parseClassElementName(W),this.pushClassAccessorProperty(Z,U,N)}else if(this.isLineTerminator())if(v)this.pushClassPrivateProperty(Z,j);else this.pushClassProperty(Z,W);else this.unexpected()}parseClassElementName(Z){let{type:X,value:J}=this.state;if((X===132||X===134)&&Z.static&&J==="prototype")this.raise(q.StaticPrototype,this.state.startLoc);if(X===139){if(J==="constructor")this.raise(q.ConstructorClassPrivateField,this.state.startLoc);let Q=this.parsePrivateName();return Z.key=Q,Q}return this.parsePropertyName(Z),Z.key}parseClassStaticBlock(Z,X){var J;this.scope.enter(720);let Q=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let V=X.body=[];if(this.parseBlockOrModuleBlockBody(V,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=Q,Z.body.push(this.finishNode(X,"StaticBlock")),(J=X.decorators)!=null&&J.length)this.raise(q.DecoratorStaticBlock,X)}pushClassProperty(Z,X){if(!X.computed&&this.nameIsConstructor(X.key))this.raise(q.ConstructorClassField,X.key);Z.body.push(this.parseClassProperty(X))}pushClassPrivateProperty(Z,X){let J=this.parseClassPrivateProperty(X);Z.body.push(J),this.classScope.declarePrivateName(this.getPrivateNameSV(J.key),0,J.key.loc.start)}pushClassAccessorProperty(Z,X,J){if(!J&&!X.computed&&this.nameIsConstructor(X.key))this.raise(q.ConstructorClassField,X.key);let Q=this.parseClassAccessorProperty(X);if(Z.body.push(Q),J)this.classScope.declarePrivateName(this.getPrivateNameSV(Q.key),0,Q.key.loc.start)}pushClassMethod(Z,X,J,Q,V,Y){Z.body.push(this.parseMethod(X,J,Q,V,Y,"ClassMethod",!0))}pushClassPrivateMethod(Z,X,J,Q){let V=this.parseMethod(X,J,Q,!1,!1,"ClassPrivateMethod",!0);Z.body.push(V);let Y=V.kind==="get"?V.static?6:2:V.kind==="set"?V.static?5:1:0;this.declareClassPrivateMethodInScope(V,Y)}declareClassPrivateMethodInScope(Z,X){this.classScope.declarePrivateName(this.getPrivateNameSV(Z.key),X,Z.key.loc.start)}parsePostMemberNameModifiers(Z){}parseClassPrivateProperty(Z){return this.parseInitializer(Z),this.semicolon(),this.finishNode(Z,"ClassPrivateProperty")}parseClassProperty(Z){return this.parseInitializer(Z),this.semicolon(),this.finishNode(Z,"ClassProperty")}parseClassAccessorProperty(Z){return this.parseInitializer(Z),this.semicolon(),this.finishNode(Z,"ClassAccessorProperty")}parseInitializer(Z){this.scope.enter(592),this.expressionScope.enter(eZ()),this.prodParam.enter(0),Z.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(Z,X,J,Q=8331){if(S(this.state.type)){if(Z.id=this.parseIdentifier(),X)this.declareNameFromIdentifier(Z.id,Q)}else if(J||!X)Z.id=null;else throw this.raise(q.MissingClassName,this.state.startLoc)}parseClassSuper(Z){Z.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(Z,X){let J=this.parseMaybeImportPhase(Z,!0),Q=this.maybeParseExportDefaultSpecifier(Z,J),V=!Q||this.eat(12),Y=V&&this.eatExportStar(Z),W=Y&&this.maybeParseExportNamespaceSpecifier(Z),j=V&&(!W||this.eat(12)),U=Q||Y;if(Y&&!W){if(Q)this.unexpected();if(X)throw this.raise(q.UnsupportedDecoratorExport,Z);return this.parseExportFrom(Z,!0),this.sawUnambiguousESM=!0,this.finishNode(Z,"ExportAllDeclaration")}let R=this.maybeParseExportNamedSpecifiers(Z);if(Q&&V&&!Y&&!R)this.unexpected(null,5);if(W&&j)this.unexpected(null,98);let H;if(U||R){if(H=!1,X)throw this.raise(q.UnsupportedDecoratorExport,Z);this.parseExportFrom(Z,U)}else H=this.maybeParseExportDeclaration(Z);if(U||R||H){var K;let G=Z;if(this.checkExport(G,!0,!1,!!G.source),((K=G.declaration)==null?void 0:K.type)==="ClassDeclaration")this.maybeTakeDecorators(X,G.declaration,G);else if(X)throw this.raise(q.UnsupportedDecoratorExport,Z);return this.sawUnambiguousESM=!0,this.finishNode(G,"ExportNamedDeclaration")}if(this.eat(65)){let G=Z,F=this.parseExportDefaultExpression();if(G.declaration=F,F.type==="ClassDeclaration")this.maybeTakeDecorators(X,F,G);else if(X)throw this.raise(q.UnsupportedDecoratorExport,Z);return this.checkExport(G,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(G,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(Z){return this.eat(55)}maybeParseExportDefaultSpecifier(Z,X){if(X||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",X==null?void 0:X.loc.start);let J=X||this.parseIdentifier(!0),Q=this.startNodeAtNode(J);return Q.exported=J,Z.specifiers=[this.finishNode(Q,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(Z){if(this.isContextual(93)){var X,J;(J=(X=Z).specifiers)!=null||(X.specifiers=[]);let Q=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),Q.exported=this.parseModuleExportName(),Z.specifiers.push(this.finishNode(Q,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(Z){if(this.match(5)){let X=Z;if(!X.specifiers)X.specifiers=[];let J=X.exportKind==="type";if(X.specifiers.push(...this.parseExportSpecifiers(J)),X.source=null,this.hasPlugin("importAssertions"))X.assertions=[];else X.attributes=[];return X.declaration=null,!0}return!1}maybeParseExportDeclaration(Z){if(this.shouldParseExportDeclaration()){if(Z.specifiers=[],Z.source=null,this.hasPlugin("importAssertions"))Z.assertions=[];else Z.attributes=[];return Z.declaration=this.parseExportDeclaration(Z),!0}return!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let Z=this.nextTokenInLineStart();return this.isUnparsedContextual(Z,"function")}parseExportDefaultExpression(){let Z=this.startNode();if(this.match(68))return this.next(),this.parseFunction(Z,5);else if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(Z,13);if(this.match(80))return this.parseClass(Z,!0,!0);if(this.match(26)){if(this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0)this.raise(q.DecoratorBeforeExport,this.state.startLoc);return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0)}if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(q.UnsupportedDefaultExport,this.state.startLoc);let X=this.parseMaybeAssignAllowIn();return this.semicolon(),X}parseExportDeclaration(Z){if(this.match(80))return this.parseClass(this.startNode(),!0,!1);return this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:Z}=this.state;if(S(Z)){if(Z===95&&!this.state.containsEsc||Z===100)return!1;if((Z===130||Z===129)&&!this.state.containsEsc){let Q=this.nextTokenStart(),V=this.input.charCodeAt(Q);if(V===123||this.chStartsBindingIdentifier(V,Q)&&!this.input.startsWith("from",Q))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let X=this.nextTokenStart(),J=this.isUnparsedContextual(X,"from");if(this.input.charCodeAt(X)===44||S(this.state.type)&&J)return!0;if(this.match(65)&&J){let Q=this.input.charCodeAt(this.nextTokenStartSince(X+4));return Q===34||Q===39}return!1}parseExportFrom(Z,X){if(this.eatContextual(98))Z.source=this.parseImportSource(),this.checkExport(Z),this.maybeParseImportAttributes(Z),this.checkJSONModuleImport(Z);else if(X)this.unexpected();this.semicolon()}shouldParseExportDeclaration(){let{type:Z}=this.state;if(Z===26){if(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators")){if(this.getPluginOption("decorators","decoratorsBeforeExport")===!0)this.raise(q.DecoratorBeforeExport,this.state.startLoc);return!0}}if(this.isUsing())return this.raise(q.UsingDeclarationExport,this.state.startLoc),!0;if(this.isAwaitUsing())return this.raise(q.UsingDeclarationExport,this.state.startLoc),!0;return Z===74||Z===75||Z===68||Z===80||this.isLet()||this.isAsyncFunction()}checkExport(Z,X,J,Q){if(X){var V;if(J){if(this.checkDuplicateExports(Z,"default"),this.hasPlugin("exportDefaultFrom")){var Y;let W=Z.declaration;if(W.type==="Identifier"&&W.name==="from"&&W.end-W.start===4&&!((Y=W.extra)!=null&&Y.parenthesized))this.raise(q.ExportDefaultFromAsIdentifier,W)}}else if((V=Z.specifiers)!=null&&V.length)for(let W of Z.specifiers){let{exported:j}=W,U=j.type==="Identifier"?j.name:j.value;if(this.checkDuplicateExports(W,U),!Q&&W.local){let{local:R}=W;if(R.type!=="Identifier")this.raise(q.ExportBindingIsString,W,{localName:R.value,exportName:U});else this.checkReservedWord(R.name,R.loc.start,!0,!1),this.scope.checkLocalExport(R)}}else if(Z.declaration){let W=Z.declaration;if(W.type==="FunctionDeclaration"||W.type==="ClassDeclaration"){let{id:j}=W;if(!j)throw Error("Assertion failure");this.checkDuplicateExports(Z,j.name)}else if(W.type==="VariableDeclaration")for(let j of W.declarations)this.checkDeclaration(j.id)}}}checkDeclaration(Z){if(Z.type==="Identifier")this.checkDuplicateExports(Z,Z.name);else if(Z.type==="ObjectPattern")for(let X of Z.properties)this.checkDeclaration(X);else if(Z.type==="ArrayPattern"){for(let X of Z.elements)if(X)this.checkDeclaration(X)}else if(Z.type==="ObjectProperty")this.checkDeclaration(Z.value);else if(Z.type==="RestElement")this.checkDeclaration(Z.argument);else if(Z.type==="AssignmentPattern")this.checkDeclaration(Z.left)}checkDuplicateExports(Z,X){if(this.exportedIdentifiers.has(X))if(X==="default")this.raise(q.DuplicateDefaultExport,Z);else this.raise(q.DuplicateExport,Z,{exportName:X});this.exportedIdentifiers.add(X)}parseExportSpecifiers(Z){let X=[],J=!0;this.expect(5);while(!this.eat(8)){if(J)J=!1;else if(this.expect(12),this.eat(8))break;let Q=this.isContextual(130),V=this.match(134),Y=this.startNode();Y.local=this.parseModuleExportName(),X.push(this.parseExportSpecifier(Y,V,Z,Q))}return X}parseExportSpecifier(Z,X,J,Q){if(this.eatContextual(93))Z.exported=this.parseModuleExportName();else if(X)Z.exported=this.cloneStringLiteral(Z.local);else if(!Z.exported)Z.exported=this.cloneIdentifier(Z.local);return this.finishNode(Z,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let Z=this.parseStringLiteral(this.state.value),X=k1.exec(Z.value);if(X)this.raise(q.ModuleExportNameHasLoneSurrogate,Z,{surrogateCharCode:X[0].charCodeAt(0)});return Z}return this.parseIdentifier(!0)}isJSONModuleImport(Z){if(Z.assertions!=null)return Z.assertions.some(({key:X,value:J})=>{return J.value==="json"&&(X.type==="Identifier"?X.name==="type":X.value==="type")});return!1}checkImportReflection(Z){let{specifiers:X}=Z,J=X.length===1?X[0].type:null;if(Z.phase==="source"){if(J!=="ImportDefaultSpecifier")this.raise(q.SourcePhaseImportRequiresDefault,X[0].loc.start)}else if(Z.phase==="defer"){if(J!=="ImportNamespaceSpecifier")this.raise(q.DeferImportRequiresNamespace,X[0].loc.start)}else if(Z.module){var Q;if(J!=="ImportDefaultSpecifier")this.raise(q.ImportReflectionNotBinding,X[0].loc.start);if(((Q=Z.assertions)==null?void 0:Q.length)>0)this.raise(q.ImportReflectionHasAssertion,X[0].loc.start)}}checkJSONModuleImport(Z){if(this.isJSONModuleImport(Z)&&Z.type!=="ExportAllDeclaration"){let{specifiers:X}=Z;if(X!=null){let J=X.find((Q)=>{let V;if(Q.type==="ExportSpecifier")V=Q.local;else if(Q.type==="ImportSpecifier")V=Q.imported;if(V!==void 0)return V.type==="Identifier"?V.name!=="default":V.value!=="default"});if(J!==void 0)this.raise(q.ImportJSONBindingNotDefault,J.loc.start)}}}isPotentialImportPhase(Z){if(Z)return!1;return this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(Z,X,J,Q){if(X)return;if(J==="module")this.expectPlugin("importReflection",Q),Z.module=!0;else if(this.hasPlugin("importReflection"))Z.module=!1;if(J==="source")this.expectPlugin("sourcePhaseImports",Q),Z.phase="source";else if(J==="defer")this.expectPlugin("deferredImportEvaluation",Q),Z.phase="defer";else if(this.hasPlugin("sourcePhaseImports"))Z.phase=null}parseMaybeImportPhase(Z,X){if(!this.isPotentialImportPhase(X))return this.applyImportPhase(Z,X,null),null;let J=this.startNode(),Q=this.parseIdentifierName(!0),{type:V}=this.state;if(k(V)?V!==98||this.lookaheadCharCode()===102:V!==12)return this.applyImportPhase(Z,X,Q,J.loc.start),null;else return this.applyImportPhase(Z,X,null),this.createIdentifier(J,Q)}isPrecedingIdImportPhase(Z){let{type:X}=this.state;return S(X)?X!==98||this.lookaheadCharCode()===102:X!==12}parseImport(Z){if(this.match(134))return this.parseImportSourceAndAttributes(Z);return this.parseImportSpecifiersAndAfter(Z,this.parseMaybeImportPhase(Z,!1))}parseImportSpecifiersAndAfter(Z,X){Z.specifiers=[];let Q=!this.maybeParseDefaultImportSpecifier(Z,X)||this.eat(12),V=Q&&this.maybeParseStarImportSpecifier(Z);if(Q&&!V)this.parseNamedImportSpecifiers(Z);return this.expectContextual(98),this.parseImportSourceAndAttributes(Z)}parseImportSourceAndAttributes(Z){var X;return(X=Z.specifiers)!=null||(Z.specifiers=[]),Z.source=this.parseImportSource(),this.maybeParseImportAttributes(Z),this.checkImportReflection(Z),this.checkJSONModuleImport(Z),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(Z,"ImportDeclaration")}parseImportSource(){if(!this.match(134))this.unexpected();return this.parseExprAtom()}parseImportSpecifierLocal(Z,X,J){X.local=this.parseIdentifier(),Z.specifiers.push(this.finishImportSpecifier(X,J))}finishImportSpecifier(Z,X,J=8201){return this.checkLVal(Z.local,{type:X},J),this.finishNode(Z,X)}parseImportAttributes(){this.expect(5);let Z=[],X=new Set;do{if(this.match(8))break;let J=this.startNode(),Q=this.state.value;if(X.has(Q))this.raise(q.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:Q});if(X.add(Q),this.match(134))J.key=this.parseStringLiteral(Q);else J.key=this.parseIdentifier(!0);if(this.expect(14),!this.match(134))throw this.raise(q.ModuleAttributeInvalidValue,this.state.startLoc);J.value=this.parseStringLiteral(this.state.value),Z.push(this.finishNode(J,"ImportAttribute"))}while(this.eat(12));return this.expect(8),Z}parseModuleAttributes(){let Z=[],X=new Set;do{let J=this.startNode();if(J.key=this.parseIdentifier(!0),J.key.name!=="type")this.raise(q.ModuleAttributeDifferentFromType,J.key);if(X.has(J.key.name))this.raise(q.ModuleAttributesWithDuplicateKeys,J.key,{key:J.key.name});if(X.add(J.key.name),this.expect(14),!this.match(134))throw this.raise(q.ModuleAttributeInvalidValue,this.state.startLoc);J.value=this.parseStringLiteral(this.state.value),Z.push(this.finishNode(J,"ImportAttribute"))}while(this.eat(12));return Z}maybeParseImportAttributes(Z){let X;var J=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;if(this.next(),this.hasPlugin("moduleAttributes"))X=this.parseModuleAttributes(),this.addExtra(Z,"deprecatedWithLegacySyntax",!0);else X=this.parseImportAttributes();J=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak()){if(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions"))this.raise(q.ImportAttributesUseAssert,this.state.startLoc);if(!this.hasPlugin("importAssertions"))this.addExtra(Z,"deprecatedAssertSyntax",!0);this.next(),X=this.parseImportAttributes()}else X=[];if(!J&&this.hasPlugin("importAssertions"))Z.assertions=X;else Z.attributes=X}maybeParseDefaultImportSpecifier(Z,X){if(X){let J=this.startNodeAtNode(X);return J.local=X,Z.specifiers.push(this.finishImportSpecifier(J,"ImportDefaultSpecifier")),!0}else if(k(this.state.type))return this.parseImportSpecifierLocal(Z,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(Z){if(this.match(55)){let X=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(Z,X,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(Z){let X=!0;this.expect(5);while(!this.eat(8)){if(X)X=!1;else{if(this.eat(14))throw this.raise(q.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let J=this.startNode(),Q=this.match(134),V=this.isContextual(130);J.imported=this.parseModuleExportName();let Y=this.parseImportSpecifier(J,Q,Z.importKind==="type"||Z.importKind==="typeof",V,void 0);Z.specifiers.push(Y)}}parseImportSpecifier(Z,X,J,Q,V){if(this.eatContextual(93))Z.local=this.parseIdentifier();else{let{imported:Y}=Z;if(X)throw this.raise(q.ImportBindingIsString,Z,{importName:Y.value});if(this.checkReservedWord(Y.name,Z.loc.start,!0,!0),!Z.local)Z.local=this.cloneIdentifier(Y)}return this.finishImportSpecifier(Z,"ImportSpecifier",V)}isThisParam(Z){return Z.type==="Identifier"&&Z.name==="this"}}class fJ extends j0{constructor(Z,X,J){let Q=_0(Z);super(Q,X);this.options=Q,this.initializeScopes(),this.plugins=J,this.filename=Q.sourceFilename,this.startIndex=Q.startIndex;let V=0;if(Q.allowAwaitOutsideFunction)V|=1;if(Q.allowReturnOutsideFunction)V|=2;if(Q.allowImportExportEverywhere)V|=8;if(Q.allowSuperOutsideMethod)V|=16;if(Q.allowUndeclaredExports)V|=64;if(Q.allowNewTargetOutsideFunction)V|=4;if(Q.allowYieldOutsideFunction)V|=32;if(Q.ranges)V|=128;if(Q.tokens)V|=256;if(Q.createImportExpressions)V|=512;if(Q.createParenthesizedExpressions)V|=1024;if(Q.errorRecovery)V|=2048;if(Q.attachComment)V|=4096;if(Q.annexB)V|=8192;this.optionFlags=V}getScopeHandler(){return zJ}parse(){this.enterInitialScopes();let Z=this.startNode(),X=this.startNode();this.nextToken(),Z.errors=null;let J=this.parseTopLevel(Z,X);return J.errors=this.state.errors,J.comments.length=this.state.commentsLen,J}}function g1(Z,X){var J;if(((J=X)==null?void 0:J.sourceType)==="unambiguous"){X=Object.assign({},X);try{X.sourceType="module";let Q=e(X,Z),V=Q.parse();if(Q.sawUnambiguousESM)return V;if(Q.ambiguousScriptDifferentAst)try{return X.sourceType="script",e(X,Z).parse()}catch(Y){}else V.program.sourceType="script";return V}catch(Q){try{return X.sourceType="script",e(X,Z).parse()}catch(V){}throw Q}}else return e(X,Z).parse()}function h1(Z,X){let J=e(X,Z);if(J.options.strictMode)J.state.strict=!0;return J.getExpression()}function b1(Z){let X={};for(let J of Object.keys(Z))X[J]=b(Z[J]);return X}var u1=b1(h0);function e(Z,X){let J=fJ,Q=new Map;if(Z!=null&&Z.plugins){for(let V of Z.plugins){let Y,W;if(typeof V==="string")Y=V;else[Y,W]=V;if(!Q.has(Y))Q.set(Y,W||{})}P1(Q),J=E1(Q)}return new J(Z,X,Q)}var kZ=new Map;function E1(Z){let X=[];for(let V of w1)if(Z.has(V))X.push(V);let J=X.join("|"),Q=kZ.get(J);if(!Q){Q=fJ;for(let V of X)Q=Y0[V](Q);kZ.set(J,Q)}return Q}R0.parse=g1;R0.parseExpression=h1;R0.tokTypes=u1});var z0=WJ((H0)=>{Object.defineProperty(H0,"__esModule",{value:!0});H0.parse=H0.parser=void 0;var c1=q0(),l1=c1.__importDefault(FJ());H0.parser=function(){try{return U0()}catch(Z){try{return (()=>{throw new Error("Cannot require module "+"babylon");})()}catch(X){throw Error("Install @babel/parser to use the `typescript`, `flow`, or `babel` parsers")}}}();function p1(Z,X){var J=(0,l1.default)(X);return J.plugins.push("jsx","flow","decoratorAutoAccessors"),H0.parser.parse(Z,J)}H0.parse=p1});var s1=WJ((F0)=>{Object.defineProperty(F0,"__esModule",{value:!0});F0.parse=void 0;var i1=q0(),a1=z0(),d1=i1.__importDefault(FJ());function t1(Z,X){var J=(0,d1.default)(X);return J.plugins.push("typescript"),a1.parser.parse(Z,J)}F0.parse=t1});export default s1();
|
|
10
10
|
|
|
11
|
-
//# debugId=
|
|
11
|
+
//# debugId=57D5453E72A82FF764756E2164756E21
|